From 996ac1c88db60891c0571d13ac136ae7fb167c0d Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 1 Jul 2022 16:00:49 +0200 Subject: [PATCH] Foundry v10 version --- module/actor/actor.js | 2 +- module/controllers/bol-rolls.js | 2 +- .../properties/item/alchemy-properties.hbs | 12 ++-- .../properties/item/capacity-properties.hbs | 12 ++-- .../properties/item/equipment-properties.hbs | 40 ++++++------- .../properties/item/protection-properties.hbs | 41 ++++++------- .../properties/item/spell-properties.hbs | 36 +++++------ .../properties/item/vehicle-properties.hbs | 8 +-- .../properties/item/weapon-properties.hbs | 60 +++++++++---------- 9 files changed, 100 insertions(+), 113 deletions(-) diff --git a/module/actor/actor.js b/module/actor/actor.js index a89b220..53bda5f 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -624,7 +624,7 @@ export class BoLActor extends Actor { /* -------------------------------------------- */ rollWeaponDamage(itemId) { - let weapon = duplicate(this.system.items.get(itemId)) + let weapon = duplicate(this.items.get(itemId)) if (weapon) { let r = new BoLDefaultRoll({ id: randomID(16), isSuccess: true, mode: "weapon", weapon: weapon, actorId: this.id, actor: this }) r.setSuccess(true) diff --git a/module/controllers/bol-rolls.js b/module/controllers/bol-rolls.js index 32fd720..3a24c76 100644 --- a/module/controllers/bol-rolls.js +++ b/module/controllers/bol-rolls.js @@ -574,7 +574,7 @@ export class BoLDefaultRoll { let actor = game.actors.get( (actorId) ? actorId: this.rollData.actorId) if (attrDamage.includes("vigor")) { - attrDamageValue = actor.data.data.attributes.vigor.value + attrDamageValue = actor.system.attributes.vigor.value if (attrDamage.includes("half")) { attrDamageValue = Math.floor(attrDamageValue / 2) } diff --git a/templates/item/parts/properties/item/alchemy-properties.hbs b/templates/item/parts/properties/item/alchemy-properties.hbs index 7eb5a43..ca974eb 100644 --- a/templates/item/parts/properties/item/alchemy-properties.hbs +++ b/templates/item/parts/properties/item/alchemy-properties.hbs @@ -2,8 +2,8 @@
- + {{#select item.system.properties.alchemytype}} {{#each config.alchemyType as |value id|}} {{/each}} @@ -13,8 +13,8 @@
- + {{#select item.system.properties.difficulty}} @@ -29,11 +29,11 @@
- +
- +
diff --git a/templates/item/parts/properties/item/capacity-properties.hbs b/templates/item/parts/properties/item/capacity-properties.hbs index 5faa3cb..bd343b2 100644 --- a/templates/item/parts/properties/item/capacity-properties.hbs +++ b/templates/item/parts/properties/item/capacity-properties.hbs @@ -3,23 +3,23 @@
-{{#if data.properties.weapon}} +{{#if item.system.properties.weapon}} {{> "systems/bol/templates/item/parts/properties/item/weapon-properties.hbs"}} {{/if}} -{{#if data.properties.protection}} +{{#if item.system.properties.protection}} {{> "systems/bol/templates/item/parts/properties/item/protection-properties.hbs"}} {{/if}} -{{#if data.properties.magical}} +{{#if item.system.properties.magical}} {{> "systems/bol/templates/item/parts/properties/item/magical-properties.hbs"}} {{/if}} diff --git a/templates/item/parts/properties/item/equipment-properties.hbs b/templates/item/parts/properties/item/equipment-properties.hbs index 4696b48..41aac28 100644 --- a/templates/item/parts/properties/item/equipment-properties.hbs +++ b/templates/item/parts/properties/item/equipment-properties.hbs @@ -3,8 +3,8 @@
- + {{#select item.system.subtype}} {{#each config.itemSubtypes as |item id|}} {{/each}} @@ -17,13 +17,13 @@
@@ -32,13 +32,13 @@
@@ -48,15 +48,15 @@
- + {{#select item.system.properties.slot}} {{#each config.equipmentSlots as |value id|}} {{/each}} @@ -70,37 +70,31 @@
- +
- +
{{/if}} - - - - - -
- +
-{{#if data.properties.weapon}} +{{#if item.system.properties.weapon}} {{> "systems/bol/templates/item/parts/properties/item/weapon-properties.hbs"}} {{/if}} -{{#if data.properties.protection}} +{{#if item.system.properties.protection}} {{> "systems/bol/templates/item/parts/properties/item/protection-properties.hbs"}} {{/if}} -{{#if data.properties.magical}} +{{#if item.system.properties.magical}} {{> "systems/bol/templates/item/parts/properties/item/magical-properties.hbs"}} {{/if}} diff --git a/templates/item/parts/properties/item/protection-properties.hbs b/templates/item/parts/properties/item/protection-properties.hbs index d82c9e1..d4f5c70 100644 --- a/templates/item/parts/properties/item/protection-properties.hbs +++ b/templates/item/parts/properties/item/protection-properties.hbs @@ -3,31 +3,24 @@

- - - - - - - - -{{#if data.properties.armor}} + +{{#if item.system.properties.armor}}
- + {{#select item.system.properties.armorQuality}} {{#each config.armorQualities as |value id|}} {{/each}} @@ -38,13 +31,13 @@
- +
- +
{{/if}} @@ -53,7 +46,7 @@
- +
{{/if}} @@ -62,17 +55,17 @@
- +
@@ -83,26 +76,26 @@
- +
- +
- +
diff --git a/templates/item/parts/properties/item/spell-properties.hbs b/templates/item/parts/properties/item/spell-properties.hbs index 1e3fd06..e04855b 100644 --- a/templates/item/parts/properties/item/spell-properties.hbs +++ b/templates/item/parts/properties/item/spell-properties.hbs @@ -2,8 +2,8 @@
- + {{#select item.system.properties.circle}} {{#each config.spellType as |value id|}} {{/each}} @@ -13,8 +13,8 @@
- + {{#select item.system.properties.difficulty}} @@ -29,18 +29,18 @@
- +
- +
- + {{#select item.system.properties.nbmandatoryconditions}} @@ -49,19 +49,19 @@
- {{#each data.properties.mandatoryconditions as |cond idx|}} - {{#if (lt idx @root.data.properties.nbmandatoryconditions)}} + {{#each item.system.properties.mandatoryconditions as |cond idx|}} + {{#if (lt idx @root.item.system.properties.nbmandatoryconditions)}}
- +
{{/if}} {{/each}}
- + {{#select item.system.properties.nboptionnalconditions}} @@ -74,11 +74,11 @@
- {{#each data.properties.optionnalconditions as |cond idx|}} - {{#if (lt idx @root.data.properties.nboptionnalconditions)}} + {{#each item.system.optionnalconditions as |cond idx|}} + {{#if (lt idx @root.item.system.properties.nboptionnalconditions)}}
- +
{{/if}} {{/each}} @@ -86,12 +86,12 @@
diff --git a/templates/item/parts/properties/item/vehicle-properties.hbs b/templates/item/parts/properties/item/vehicle-properties.hbs index 3b00be1..95c12e1 100644 --- a/templates/item/parts/properties/item/vehicle-properties.hbs +++ b/templates/item/parts/properties/item/vehicle-properties.hbs @@ -3,8 +3,8 @@
- + {{#select item.system.subtype}} {{#each config.vehicleSubtypes as |item id|}} {{/each}} @@ -16,13 +16,13 @@
- +
- +
diff --git a/templates/item/parts/properties/item/weapon-properties.hbs b/templates/item/parts/properties/item/weapon-properties.hbs index 3a5c337..d867689 100644 --- a/templates/item/parts/properties/item/weapon-properties.hbs +++ b/templates/item/parts/properties/item/weapon-properties.hbs @@ -3,16 +3,16 @@
@@ -21,33 +21,33 @@
{{#if data.properties.ranged}} {{/if}} {{#if data.properties.melee}} {{/if}}
@@ -57,8 +57,8 @@
- + {{#select item.system.properties.attackAttribute}} {{#each config.attackAttributes as |value id|}} {{/each}} @@ -69,8 +69,8 @@
- + {{#select item.system.properties.attackAptitude}} {{#each config.attackAptitudes as |value id|}} {{/each}} @@ -82,15 +82,15 @@
- +

- + {{#select item.system.properties.weaponSize}} {{#each config.weaponSizes as |value id|}} {{/each}} @@ -101,8 +101,8 @@
- + {{#select item.system.properties.damage}} {{#each config.damageValues as |value id|}} {{/each}} @@ -113,8 +113,8 @@
- + {{#select item.system.properties.damageAttribute}} {{#each config.damageAttributes as |value id|}} {{/each}} @@ -125,14 +125,14 @@
- +
- + {{#select item.system.properties.damageMultiplier}} {{#each config.damageMultiplier as |value id|}} {{/each}} @@ -144,17 +144,17 @@
-{{#if (or data.properties.throwing (or data.properties.ranged data.properties.throwable))}} +{{#if (or item.system.properties.throwing (or item.system.properties.ranged item.system.properties.throwable))}}
- +
{{/if}} @@ -162,7 +162,7 @@
- +
{{/if}}