diff --git a/module/SystemProvider.js b/module/SystemProvider.js index 2962f5a..6b76063 100644 --- a/module/SystemProvider.js +++ b/module/SystemProvider.js @@ -1346,35 +1346,29 @@ export class cyphersystemProvider extends SystemProvider { id: actor.id, name: actor.name, type: actor.type, - might: data.pools?.might, - speed: data.pools?.speed, - intellect: data.pools?.intellect, - additional: data.pools?.additional, - additionalPool: data.additionalPool, - mightEdge: data.pools?.mightEdge, - speedEdge: data.pools?.speedEdge, - intellectEdge: data.pools?.intellectEdge, - tier: data.basic?.tier, - effort: data.basic?.effort, - xp: data.basic?.xp, - armorValueTotal: data.armor?.armorValueTotal, - speedCostTotal: data.armor?.speedCostTotal, - damageTrack: data.damage?.damageTrack, + might: data.pools.might, + speed: data.pools.speed, + intellect: data.pools.intellect, + additional: data.pools.additional, + additionalPool: { + active: data.settings.general.additionalPool.active, + name: data.settings.general.additionalPool.label, + pool: data.pools.additionalPool, + }, + tier: data.basic.tier, + effort: data.basic.effort, + xp: data.basic.xp, + armorValueTotal: data.combat.armor.ratingTotal, + speedCostTotal: data.combat.armor.costTotal, + damageTrack: data.combat.damageTrack.state, }; } getUpdate(actors) { - let showAdditional = false; - for (let actor of actors) { - if (actor.additionalPool?.active) { - showAdditional = true; - break; - } - } return [ actors, { - showAdditional: showAdditional, + showAdditional: actors.some(actor => actor.additionalPool.active), }, ]; } diff --git a/templates/cyphersystem.hbs b/templates/cyphersystem.hbs index b92e07d..4e0d870 100644 --- a/templates/cyphersystem.hbs +++ b/templates/cyphersystem.hbs @@ -18,20 +18,20 @@ {{#each actors as | actor | }} - {{#if (eq actor.type 'PC')}} + {{#if (eq actor.type 'pc')}}