From 6b5011cfd6d8f91516f66500502d2fae215cfbc4 Mon Sep 17 00:00:00 2001 From: John Downey Date: Fri, 8 Apr 2022 19:11:54 -0500 Subject: [PATCH] Update codebase to be v9 compatible --- src/acks.css | 7 +- src/acks.js | 4 +- src/module/actor/actor-sheet.js | 10 +-- src/module/actor/character-sheet.js | 18 +++-- src/module/actor/entity.js | 41 +++++----- src/module/actor/monster-sheet.js | 27 ++++--- src/module/dialog/character-creation.js | 5 +- src/module/dice.js | 18 ++++- src/module/item/entity.js | 2 +- src/templates/actors/character-sheet.html | 4 +- src/templates/actors/monster-sheet.html | 6 +- .../partials/character-abilities-tab.html | 10 +-- .../partials/character-attributes-tab.html | 76 +++++++++---------- .../actors/partials/character-header.html | 26 +++---- .../partials/character-inventory-tab.html | 6 +- .../actors/partials/character-notes-tab.html | 6 +- .../actors/partials/character-spells-tab.html | 4 +- .../partials/monster-attributes-tab.html | 42 +++++----- .../actors/partials/monster-header.html | 12 +-- src/templates/items/ability-sheet.html | 14 ++-- src/templates/items/armor-sheet.html | 10 +-- src/templates/items/item-sheet.html | 10 +-- src/templates/items/spell-sheet.html | 14 ++-- src/templates/items/weapon-sheet.html | 30 ++++---- 24 files changed, 216 insertions(+), 186 deletions(-) diff --git a/src/acks.css b/src/acks.css index 1713fb2..ab6da9c 100644 --- a/src/acks.css +++ b/src/acks.css @@ -78,13 +78,14 @@ animation: 0.8s ease-in 1s infinite alternate notify; } .acks.sheet.actor .sheet-tabs { + border-bottom: none; + justify-content: flex-end; position: absolute; transform: rotate(90deg); top: 365px; right: -169px; width: 320px; border-top: none; - height: 18px; z-index: -1; } .acks.sheet.actor .sheet-tabs .item { @@ -95,7 +96,6 @@ background: url("/ui/parchment.jpg"); border-top-right-radius: 4px; border-top-left-radius: 80px; - border-bottom: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.9); font-size: 12px; filter: brightness(0.9); @@ -107,6 +107,9 @@ text-shadow: none; margin-bottom: -1px; } +.acks.sheet.actor .sheet-tabs .item:not(.active) { + border-bottom: 1px solid rgba(0, 0, 0, 0.15); +} .acks.sheet.actor .sheet-body { height: calc(100% - 140px); } diff --git a/src/acks.js b/src/acks.js index e974248..4546c5a 100644 --- a/src/acks.js +++ b/src/acks.js @@ -40,8 +40,8 @@ Hooks.once("init", async function () { // Register custom system settings registerSettings(); - CONFIG.Actor.entityClass = AcksActor; - CONFIG.Item.entityClass = AcksItem; + CONFIG.Actor.documentClass = AcksActor; + CONFIG.Item.documentClass = AcksItem; // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); diff --git a/src/module/actor/actor-sheet.js b/src/module/actor/actor-sheet.js index d67c5da..c996cfb 100644 --- a/src/module/actor/actor-sheet.js +++ b/src/module/actor/actor-sheet.js @@ -74,7 +74,7 @@ export class AcksActorSheet extends ActorSheet { _onItemSummary(event) { event.preventDefault(); let li = $(event.currentTarget).parents(".item"), - item = this.actor.getOwnedItem(li.data("item-id")), + item = this.actor.items.get(li.data("item-id")), description = TextEditor.enrichHTML(item.data.data.description); // Toggle summary if (li.hasClass("expanded")) { @@ -94,7 +94,7 @@ export class AcksActorSheet extends ActorSheet { async _onSpellChange(event) { event.preventDefault(); const itemId = event.currentTarget.closest(".item").dataset.itemId; - const item = this.actor.getOwnedItem(itemId); + const item = this.actor.items.get(itemId); if (event.target.dataset.field == "cast") { return item.update({ "data.cast": parseInt(event.target.value) }); } else if (event.target.dataset.field == "memorize") { @@ -110,7 +110,7 @@ export class AcksActorSheet extends ActorSheet { .find(".item"); spells.each((_, el) => { let itemId = el.dataset.itemId; - const item = this.actor.getOwnedItem(itemId); + const item = this.actor.items.get(itemId); item.update({ _id: item.id, "data.cast": 0, @@ -130,7 +130,7 @@ export class AcksActorSheet extends ActorSheet { html.find(".item .item-controls .item-show").click(async (ev) => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.items.get(li.data("itemId")); item.show(); }); @@ -143,7 +143,7 @@ export class AcksActorSheet extends ActorSheet { html.find(".item .item-rollable .item-image").click(async (ev) => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.items.get(li.data("itemId")); if (item.type == "weapon") { if (this.actor.data.type === "monster") { item.update({ diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js index f83df82..764ab00 100644 --- a/src/module/actor/character-sheet.js +++ b/src/module/actor/character-sheet.js @@ -121,7 +121,7 @@ export class AcksActorSheetCharacter extends AcksActorSheet { async _onQtChange(event) { event.preventDefault(); const itemId = event.currentTarget.closest(".item").dataset.itemId; - const item = this.actor.getOwnedItem(itemId); + const item = this.actor.items.get(itemId); return item.update({ "data.quantity.value": parseInt(event.target.value) }); } @@ -198,14 +198,16 @@ export class AcksActorSheetCharacter extends AcksActorSheet { // Update Inventory Item html.find(".item-edit").click((ev) => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.items.get(li.data("itemId")); item.sheet.render(true); }); // Delete Inventory Item html.find(".item-delete").click((ev) => { const li = $(ev.currentTarget).parents(".item"); - this.actor.deleteOwnedItem(li.data("itemId")); + this.actor.deleteEmbeddedDocuments("Item", [ + li.data("itemId"), + ]); li.slideUp(200, () => this.render(false)); }); @@ -226,7 +228,7 @@ export class AcksActorSheetCharacter extends AcksActorSheet { ); }); - html.find(".item-create").click((event) => { + html.find(".item-create").click(async (event) => { event.preventDefault(); const header = event.currentTarget; const type = header.dataset.type; @@ -236,14 +238,16 @@ export class AcksActorSheetCharacter extends AcksActorSheet { data: duplicate(header.dataset), }; delete itemData.data["type"]; - return this.actor.createOwnedItem(itemData); + await this.actor.createEmbeddedDocuments("Item", [ + itemData, + ]); }); //Toggle Equipment html.find(".item-toggle").click(async (ev) => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); - await this.actor.updateOwnedItem({ + const item = this.actor.items.get(li.data("itemId")); + await item.update({ _id: li.data("itemId"), data: { equipped: !item.data.data.equipped, diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 3b53e6b..1071af4 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -35,24 +35,26 @@ export class AcksActor extends Actor { /* -------------------------------------------- */ /* Socket Listeners and Handlers /* -------------------------------------------- */ - getExperience(value, options = {}) { + async getExperience(value, options = {}) { if (this.data.type != "character") { return; } + let modified = Math.floor( value + (this.data.data.details.xp.bonus * value) / 100 ); - return this.update({ + + await this.update({ "data.details.xp.value": modified + this.data.data.details.xp.value, - }).then(() => { - const speaker = ChatMessage.getSpeaker({ actor: this }); - ChatMessage.create({ - content: game.i18n.format("ACKS.messages.GetExperience", { - name: this.name, - value: modified, - }), - speaker, - }); + }); + + const speaker = ChatMessage.getSpeaker({ actor: this }); + await ChatMessage.create({ + content: game.i18n.format("ACKS.messages.GetExperience", { + name: this.name, + value: modified, + }), + speaker, }); } @@ -73,7 +75,7 @@ export class AcksActor extends Actor { } } - generateSave(hd) { + async generateSave(hd) { let saves = {}; for (let i = 0; i <= hd; i++) { let tmp = CONFIG.ACKS.monster_saves[i]; @@ -81,7 +83,8 @@ export class AcksActor extends Actor { saves = tmp; } } - this.update({ + + await this.update({ "data.saves": { death: { value: saves.d, @@ -106,9 +109,13 @@ export class AcksActor extends Actor { /* Rolls */ /* -------------------------------------------- */ - rollHP(options = {}) { - let roll = new Roll(this.data.data.hp.hd).roll(); - return this.update({ + async rollHP(options = {}) { + let roll = new Roll(this.data.data.hp.hd); + await roll.evaluate({ + async: true, + }); + + await this.update({ data: { hp: { max: roll.total, @@ -572,7 +579,7 @@ export class AcksActor extends Actor { const dh = Math.clamped(hp.value - amount, -99, hp.max); // Update the Actor - return this.update({ + await this.update({ "data.hp.value": dh, }); } diff --git a/src/module/actor/monster-sheet.js b/src/module/actor/monster-sheet.js index b54b7ca..e425f53 100644 --- a/src/module/actor/monster-sheet.js +++ b/src/module/actor/monster-sheet.js @@ -76,12 +76,11 @@ export class AcksActorSheetMonster extends AcksActorSheet { // Settings data.config.morale = game.settings.get("acks", "morale"); - data.data.details.treasure.link = TextEditor.enrichHTML(data.data.details.treasure.table); + data.data.data.details.treasure.link = TextEditor.enrichHTML(data.data.data.details.treasure.table); data.isNew = this.actor.isNew(); return data; } - async _onDrop(event) { super._onDrop(event); let data; @@ -139,7 +138,7 @@ export class AcksActorSheetMonster extends AcksActorSheet { async _resetCounters(event) { const weapons = this.actor.data.items.filter(i => i.type === 'weapon'); for (let wp of weapons) { - const item = this.actor.getOwnedItem(wp._id); + const item = this.actor.items.get(wp._id); await item.update({ data: { counter: { @@ -153,7 +152,7 @@ export class AcksActorSheetMonster extends AcksActorSheet { async _onCountChange(event) { event.preventDefault(); const itemId = event.currentTarget.closest(".item").dataset.itemId; - const item = this.actor.getOwnedItem(itemId); + const item = this.actor.items.get(itemId); if (event.target.dataset.field == "value") { return item.update({ "data.counter.value": parseInt(event.target.value), @@ -194,18 +193,20 @@ export class AcksActorSheetMonster extends AcksActorSheet { // Update Inventory Item html.find(".item-edit").click((ev) => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.items.get(li.data("itemId")); item.sheet.render(true); }); // Delete Inventory Item html.find(".item-delete").click((ev) => { const li = $(ev.currentTarget).parents(".item"); - this.actor.deleteOwnedItem(li.data("itemId")); + this.actor.deleteEmbeddedDocuments("Item", [ + li.data("itemId"), + ]); li.slideUp(200, () => this.render(false)); }); - html.find(".item-create").click((event) => { + html.find(".item-create").click(async (event) => { event.preventDefault(); const header = event.currentTarget; const type = header.dataset.type; @@ -224,14 +225,18 @@ export class AcksActorSheetMonster extends AcksActorSheet { // Getting back to main logic if (type == "choice") { const choices = header.dataset.choices.split(","); - this._chooseItemType(choices).then((dialogInput) => { + this._chooseItemType(choices).then(async (dialogInput) => { const itemData = createItem(dialogInput.type, dialogInput.name); - this.actor.createOwnedItem(itemData, {}); + await this.actor.createEmbeddedDocuments("Item", [ + itemData, + ]); }); return; } const itemData = createItem(type); - return this.actor.createOwnedItem(itemData, {}); + await this.actor.createEmbeddedDocuments("Item", [ + itemData, + ]); }); html.find(".item-reset").click((ev) => { @@ -250,7 +255,7 @@ export class AcksActorSheetMonster extends AcksActorSheet { html.find(".item-pattern").click(ev => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.items.get(li.data("itemId")); let currentColor = item.data.data.pattern; let colors = Object.keys(CONFIG.ACKS.colors); let index = colors.indexOf(currentColor); diff --git a/src/module/dialog/character-creation.js b/src/module/dialog/character-creation.js index ae8cce3..fb7dc37 100644 --- a/src/module/dialog/character-creation.js +++ b/src/module/dialog/character-creation.js @@ -169,7 +169,10 @@ export class AcksCharacterCreator extends FormApplication { } } }; - this.object.createOwnedItem(itemData); + + await this.object.createEmbeddedDocuments("Item", [ + itemData, + ]); } /** * This method is called upon form submission after form data is validated diff --git a/src/module/dice.js b/src/module/dice.js index 555cf37..aa91ff3 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -78,7 +78,10 @@ export class AcksDice { parts.push(form.bonus.value); } - const roll = new Roll(parts.join("+"), data).roll(); + const roll = new Roll(parts.join("+"), data); + await roll.evaluate({ + async: true, + }); // Convert the roll to a chat message and return the roll let rollMode = game.settings.get("core", "rollMode"); @@ -230,14 +233,21 @@ export class AcksDice { // Optionally include a situational bonus if (form !== null && form.bonus.value) parts.push(form.bonus.value); - const roll = new Roll(parts.join("+"), data).roll(); - const dmgRoll = new Roll(data.roll.dmg.join("+"), data).roll(); + const roll = new Roll(parts.join("+"), data); + await roll.evaluate({ + async: true, + }); + + const dmgRoll = new Roll(data.roll.dmg.join("+"), data); + await dmgRoll.evaluate({ + async: true, + }); // Add minimal damage of 1 if (dmgRoll.total < 1) { dmgRoll._total = 1; } - + // Convert the roll to a chat message and return the roll let rollMode = game.settings.get("core", "rollMode"); rollMode = form ? form.rollMode.value : rollMode; diff --git a/src/module/item/entity.js b/src/module/item/entity.js index 37f3f13..f5361f7 100644 --- a/src/module/item/entity.js +++ b/src/module/item/entity.js @@ -355,7 +355,7 @@ export class AcksItem extends Item { if (!actor) return; // Get the Item - const item = actor.getOwnedItem(card.dataset.itemId); + const item = actor.items.get(card.dataset.itemId); if (!item) { return ui.notifications.error( `The requested item ${card.dataset.itemId} no longer exists on Actor ${actor.name}` diff --git a/src/templates/actors/character-sheet.html b/src/templates/actors/character-sheet.html index 44e910d..d6d9d45 100644 --- a/src/templates/actors/character-sheet.html +++ b/src/templates/actors/character-sheet.html @@ -12,7 +12,7 @@ {{localize "ACKS.category.abilities"}} - {{#if data.spells.enabled}} + {{#if data.data.spells.enabled}} {{localize "ACKS.category.spells"}} @@ -33,7 +33,7 @@
{{> "systems/acks/templates/actors/partials/character-abilities-tab.html"}}
- {{#if data.spells.enabled}} + {{#if data.data.spells.enabled}}
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
diff --git a/src/templates/actors/monster-sheet.html b/src/templates/actors/monster-sheet.html index 42db424..51844f7 100644 --- a/src/templates/actors/monster-sheet.html +++ b/src/templates/actors/monster-sheet.html @@ -9,7 +9,7 @@ {{localize "ACKS.category.attributes"}} - {{#if data.spells.enabled}} + {{#if data.data.spells.enabled}} {{localize "ACKS.category.spells"}} @@ -24,7 +24,7 @@
{{> "systems/acks/templates/actors/partials/monster-attributes-tab.html"}}
- {{#if data.spells.enabled}} + {{#if data.data.spells.enabled}}
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
@@ -33,7 +33,7 @@
{{localize "ACKS.category.notes"}}
- {{editor content=data.details.biography target="data.details.biography" + {{editor content=data.data.details.biography target="data.details.biography" button=true owner=owner editable=editable}}
diff --git a/src/templates/actors/partials/character-abilities-tab.html b/src/templates/actors/partials/character-abilities-tab.html index d36d9ea..f9c286d 100644 --- a/src/templates/actors/partials/character-abilities-tab.html +++ b/src/templates/actors/partials/character-abilities-tab.html @@ -2,28 +2,28 @@
  • {{ localize "ACKS.exploration.ld.short" }}

    - +
  • {{ localize "ACKS.exploration.od.short" }}

    - +
  • {{ localize "ACKS.exploration.sd.short" }}

    - +
  • {{ localize "ACKS.exploration.ft.short" }}

    - +
  • @@ -41,7 +41,7 @@ {{#each abilities as |item|}}
  • @@ -21,7 +21,7 @@

    {{ localize "ACKS.scores.int.short" }}

    -
    @@ -29,7 +29,7 @@

    {{ localize "ACKS.scores.wis.short" }}

    -
    @@ -37,7 +37,7 @@

    {{ localize "ACKS.scores.dex.short" }}

    -
    @@ -45,7 +45,7 @@

    {{ localize "ACKS.scores.con.short" }}

    -
    @@ -53,7 +53,7 @@

    {{ localize "ACKS.scores.cha.short" }}

    -
    @@ -63,25 +63,25 @@
    - - -
    -
    +
    +
    {{#if config.ascendingAC}} -
    {{data.aac.value}}
    +
    {{data.data.aac.value}}
    - {{data.aac.naked}}
    - {{#if data.aac.shield}}
    + {{#if data.data.aac.shield}}
    {{/if}} {{else}} -
    {{data.ac.value}}
    +
    {{data.data.ac.value}}
    - {{data.ac.naked}}
    - {{#if data.ac.shield}}
    + {{#if data.data.ac.shield}}
    {{/if}} {{/if}}
    @@ -93,7 +93,7 @@ {{ localize "ACKS.HitDiceShort" }}
    -
    @@ -103,8 +103,8 @@ {{ localize "ACKS.BHRShort" }}
    - {{data.hp.bhr}} + title="Calculated from {{data.data.hp.max}} HP"> + {{data.data.hp.bhr}}
    {{/if}} @@ -113,8 +113,8 @@

    {{ localize "ACKS.InitiativeShort" }}

    - {{add data.scores.dex.init data.initiative.mod}} + title="{{localize 'ACKS.scores.dex.long'}}({{data.data.scores.dex.init}}) + {{localize 'ACKS.Modifier'}}({{data.data.initiative.mod}})"> + {{add data.data.scores.dex.init data.data.initiative.mod}}
    {{/if}} @@ -127,8 +127,8 @@ {{localize 'ACKS.MeleeShort'}}
    - {{add data.scores.str.mod data.thac0.mod.melee}} + title="{{localize 'ACKS.scores.str.long'}}({{data.data.scores.str.mod}}) + {{localize 'ACKS.Modifier'}}({{data.data.thac0.mod.melee}})"> + {{add data.data.scores.str.mod data.data.thac0.mod.melee}}
    @@ -138,7 +138,7 @@
    -
    @@ -149,7 +149,7 @@
    -
    @@ -160,8 +160,8 @@ {{localize 'ACKS.MissileShort'}}
    - {{add data.scores.dex.mod data.thac0.mod.missile}} + title="{{localize 'ACKS.scores.dex.long'}}({{data.data.scores.dex.mod}}) + {{localize 'ACKS.Modifier'}}({{data.data.thac0.mod.missile}})"> + {{add data.data.scores.dex.mod data.data.thac0.mod.missile}}
    @@ -174,7 +174,7 @@ {{localize 'ACKS.movement.overland.short'}}
    - {{divide data.movement.base 5}} + {{divide data.data.movement.base 5}}
    @@ -182,8 +182,8 @@

    {{ localize "ACKS.movement.exploration.short" }}

    - +
  • @@ -191,7 +191,7 @@ {{localize 'ACKS.movement.encounter.short'}}
    - {{divide data.movement.base 3}} + {{divide data.data.movement.base 3}}
  • @@ -205,43 +205,43 @@

    {{ localize "ACKS.saves.paralysis.long" }}

    -
  • {{ localize "ACKS.saves.death.long" }}

    -
  • {{ localize "ACKS.saves.breath.long" }}

    -
  • {{ localize "ACKS.saves.wand.long" }}

    -
  • {{ localize "ACKS.saves.spell.long" }}

    -
  • {{#unless config.removeMagicBonus}}
  • {{ localize "ACKS.saves.magic.long"}}

    -
    - {{mod data.scores.wis.mod}} +
    + {{mod data.data.scores.wis.mod}}
  • {{/unless}} diff --git a/src/templates/actors/partials/character-header.html b/src/templates/actors/partials/character-header.html index 51e4d9f..b9d82dc 100644 --- a/src/templates/actors/partials/character-header.html +++ b/src/templates/actors/partials/character-header.html @@ -4,36 +4,36 @@
      - {{#if data.retainer.enabled}} + {{#if data.data.retainer.enabled}}
    • -
    • {{else}}
    • -
    • {{/if}}
    • -
    • - {{#if data.retainer.enabled}} + {{#if data.data.retainer.enabled}}
    • - +
    • - +
    • @@ -41,21 +41,21 @@
    • -
    • -
    • - +
    • - - {{#if data.details.xp.bonus}} - +{{data.details.xp.bonus}}% + {{#if data.data.details.xp.bonus}} + +{{data.data.details.xp.bonus}}% {{/if}}
    diff --git a/src/templates/actors/partials/character-inventory-tab.html b/src/templates/actors/partials/character-inventory-tab.html index 9f954c0..66df75d 100644 --- a/src/templates/actors/partials/character-inventory-tab.html +++ b/src/templates/actors/partials/character-inventory-tab.html @@ -31,8 +31,6 @@ {{#each item.data.tags as |tag|}} {{#unless (getTagIcon tag.value)}} {{tag.value}}{{#unless @last}},{{/unless}} - - {{/unless}} {{/each}}
    @@ -155,7 +153,7 @@
  • {{localize "ACKS.items.Treasure"}}
    -
    {{roundTreas data.treasure}}
    +
    {{roundTreas data.data.treasure}}
    @@ -198,7 +196,7 @@
    - {{#with data.encumbrance}} + {{#with data.data.encumbrance}}
    {{value}} / {{max}} diff --git a/src/templates/actors/partials/character-notes-tab.html b/src/templates/actors/partials/character-notes-tab.html index ff138c4..7e1890c 100644 --- a/src/templates/actors/partials/character-notes-tab.html +++ b/src/templates/actors/partials/character-notes-tab.html @@ -12,7 +12,7 @@
    1. - {{#each data.languages.value as |lang|}} + {{#each data.data.languages.value as |lang|}}
    2. {{lang}} @@ -28,7 +28,7 @@
      {{localize "ACKS.category.description"}}
      - {{editor content=data.details.description target="data.details.description" + {{editor content=data.data.details.description target="data.details.description" button=true owner=owner editable=editable}}
      @@ -37,7 +37,7 @@
      {{localize "ACKS.category.notes"}}
      - {{editor content=data.details.notes target="data.details.notes" + {{editor content=data.data.details.notes target="data.details.notes" button=true owner=owner editable=editable}}
      diff --git a/src/templates/actors/partials/character-spells-tab.html b/src/templates/actors/partials/character-spells-tab.html index 00c362f..e61fa16 100644 --- a/src/templates/actors/partials/character-spells-tab.html +++ b/src/templates/actors/partials/character-spells-tab.html @@ -15,7 +15,7 @@
      {{localize 'ACKS.spells.Slots'}}
      //
      -
    3. @@ -16,7 +16,7 @@ {{ localize "ACKS.HitDiceShort" }}
      - +
    4. @@ -24,14 +24,14 @@

      {{ localize "ACKS.AscArmorClassShort" }}

      -
      {{else}}

      {{ localize "ACKS.ArmorClassShort" }}

      -
      {{/if}} @@ -41,25 +41,25 @@

      {{ localize "ACKS.ABShort" }}

      -
      {{else}}

      {{ localize "ACKS.Thac0" }}

      -
      {{/if}}
    5. - {{#if data.retainer.enabled}} + {{#if data.data.retainer.enabled}}
    6. {{ localize "ACKS.LoyaltyShort" }}

      -
    7. @@ -69,7 +69,7 @@ {{ localize "ACKS.movement.short" }}
      -
      @@ -94,8 +94,8 @@ {{#each abilities as |item|}}
    8. -
      -
      +
      +

      {{item.name~}} @@ -119,7 +119,7 @@
    9. {{#if (eq item.type 'weapon')}} -
      +
      {{/if}}
      @@ -129,10 +129,10 @@
      {{#if (eq item.type 'weapon')}}
      - / -
      {{/if}} @@ -157,7 +157,7 @@
    10. {{#unless isNew}} - + {{else}} {{/unless}} @@ -166,35 +166,35 @@

      {{ localize "ACKS.saves.death.long" }}

      -
    11. {{ localize "ACKS.saves.wand.long" }}

      -
    12. {{ localize "ACKS.saves.paralysis.long" }}

      -
    13. {{ localize "ACKS.saves.breath.long" }}

      -
    14. {{ localize "ACKS.saves.spell.long" }}

      -
    15. diff --git a/src/templates/actors/partials/monster-header.html b/src/templates/actors/partials/monster-header.html index b09b3f0..6d11610 100644 --- a/src/templates/actors/partials/monster-header.html +++ b/src/templates/actors/partials/monster-header.html @@ -6,26 +6,26 @@
      • - +
      • - +
      • - (
        ) + (
        )
      • {{#if config.morale}}
      • - +
        @@ -34,11 +34,11 @@
      • - +
      • -
        {{{data.details.treasure.link}}}
        +
        {{{data.data.details.treasure.link}}}
      diff --git a/src/templates/items/ability-sheet.html b/src/templates/items/ability-sheet.html index a86809d..202a306 100644 --- a/src/templates/items/ability-sheet.html +++ b/src/templates/items/ability-sheet.html @@ -13,20 +13,20 @@
      - +
      - +
      +
      - +
      +
      +
      - +

      - {{editor content=data.description target="data.description" button=true + {{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
      diff --git a/src/templates/items/item-sheet.html b/src/templates/items/item-sheet.html index 19f2fda..61a0c1a 100644 --- a/src/templates/items/item-sheet.html +++ b/src/templates/items/item-sheet.html @@ -13,30 +13,30 @@
      - / + /
      - +
      - +
      - +
      - {{editor content=data.description target="data.description" button=true + {{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
    diff --git a/src/templates/items/spell-sheet.html b/src/templates/items/spell-sheet.html index 2343952..e48b637 100644 --- a/src/templates/items/spell-sheet.html +++ b/src/templates/items/spell-sheet.html @@ -13,32 +13,32 @@
    - +
    - +
    - +
    - +
    +
    - {{editor content=data.description target="data.description" button=true + {{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
    diff --git a/src/templates/items/weapon-sheet.html b/src/templates/items/weapon-sheet.html index 8e61fc7..32ff421 100644 --- a/src/templates/items/weapon-sheet.html +++ b/src/templates/items/weapon-sheet.html @@ -24,7 +24,7 @@ @@ -36,7 +36,7 @@ @@ -44,7 +44,7 @@
      - {{#each data.tags as |tag|}} + {{#each data.data.tags as |tag|}}
    1. {{tag.value}} @@ -72,7 +72,7 @@ @@ -84,39 +84,39 @@
      + data.data.melee}}active{{/if}}"> + {{#if data.data.missile}}active{{/if}}">
      - {{#if data.missile}} + {{#if data.data.missile}}
      @@ -126,7 +126,7 @@
      - {{editor content=data.description target="data.description" button=true + {{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}