RC-106 | Add equipped armour display
This commit is contained in:
parent
07f3b24897
commit
d1ce144114
5 changed files with 67 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
|
|||
|
||||
ctx = await HeroSummaryCardV1.prepareGuts(ctx);
|
||||
ctx = await HeroSummaryCardV1.prepareWeapons(ctx);
|
||||
ctx = await HeroSummaryCardV1.prepareArmor(ctx);
|
||||
ctx = await HeroSummaryCardV1.prepareFatePath(ctx);
|
||||
ctx = await HeroSummaryCardV1.prepareAbilityRow(ctx);
|
||||
ctx = await HeroSummaryCardV1.prepareSpeed(ctx);
|
||||
|
|
@ -136,6 +137,20 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
|
|||
return ctx;
|
||||
};
|
||||
|
||||
static async prepareArmor(ctx) {
|
||||
ctx.armours = {};
|
||||
const equipped = ctx.actor.system.equippedArmour;
|
||||
for (const slot of gameTerms.Anatomy) {
|
||||
const item = equipped[slot];
|
||||
ctx.armours[slot] = {
|
||||
name: item?.name ?? ``,
|
||||
uuid: item?.uuid ?? ``,
|
||||
defense: 0,
|
||||
};
|
||||
};
|
||||
return ctx;
|
||||
};
|
||||
|
||||
static async prepareWeapons(ctx) {
|
||||
const limit = ctx.actor.system.limit.weapons;
|
||||
const embedded = ctx.actor.itemTypes.weapon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue