Skip to content

Commit

Permalink
Inventor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed May 10, 2024
1 parent 8167964 commit eb62a48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.2

- Small improvement to Inventor Weapon detection based on improvements to Pathbuilder export data. (Thaks Redrazor!)

# 1.1.1

- Fix issue with Speciality Crafting failing to import selected choices correctly. @wintermute_wrath
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pathmuncher",
"version": "1.1.1",
"version": "1.1.2",
"author": "MrPrimate",
"description": "Foundry VTT module for integrating Pathfinder 2e Pathbuilder characters",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions src/app/Pathmuncher.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class Pathmuncher {
});
this.source.weapons
.filter((e) => e && e !== "undefined")
.forEach((e, i) => {
.forEach((e) => {
const name = Seasoning.getFoundryEquipmentName(e.name);
const item = mergeObject({
foundryName: name,
Expand All @@ -325,7 +325,7 @@ export class Pathmuncher {
sourceType: "weapons",
}, e);
// for now assume first weapon is the weapon innovation
if (i === 0 && this.source.specials.includes("Weapon Innovation")) {
if (e.isInventor) {
this.parsed.feats.push({
name,
extra: "",
Expand Down
1 change: 1 addition & 0 deletions src/hooks/sheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function registerSheetButton() {
Hooks.on("render" + sheetName, (app, html, data) => {
// only for GMs or the owner of this character
if (!data.owner || !data.actor) return;
if (!game.user.can("ACTOR_CREATE")) return;

const button = $(`<a class="pathmuncher-open" title="${CONSTANTS.MODULE_FULL_NAME}"><i class="fas fa-teeth-open"></i> ${CONSTANTS.MODULE_FULL_NAME}</a>`);

Expand Down

0 comments on commit eb62a48

Please sign in to comment.