Fix logic to display gear that can be equipped and editing the equipped attribute
This commit is contained in:
parent
a129b364a2
commit
aa05cdde46
3 changed files with 3 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ export class HeroSkillsCardV1 extends GenericAppMixin(HandlebarsApplicationMixin
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
if (!gameTerms.gearItemTypes.has(item.type)) { continue };
|
if (!gameTerms.gearItemTypes.has(item.type)) { continue };
|
||||||
|
|
||||||
if ( `equipped` in item.system && !item.system.equipped) { continue };
|
if (`equipped` in item.system && item.system.equipped) { continue };
|
||||||
ctx.gear.push({
|
ctx.gear.push({
|
||||||
index: ctx.gear.length,
|
index: ctx.gear.length,
|
||||||
uuid: item.uuid,
|
uuid: item.uuid,
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ export class ProtectorData extends foundry.abstract.TypeDataModel {
|
||||||
type: `boolean`,
|
type: `boolean`,
|
||||||
label: `RipCrypt.common.equipped`,
|
label: `RipCrypt.common.equipped`,
|
||||||
value: this.equipped,
|
value: this.equipped,
|
||||||
|
path: `system.equipped`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,7 @@ export class WeaponData extends foundry.abstract.TypeDataModel {
|
||||||
type: `boolean`,
|
type: `boolean`,
|
||||||
label: `RipCrypt.common.equipped`,
|
label: `RipCrypt.common.equipped`,
|
||||||
value: this.equipped,
|
value: this.equipped,
|
||||||
|
path: `system.equipped`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue