diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b88cfa..a41032c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # Changelog ## 1.3.0 - Foundry 0.8.x compatibility +_! Be certain to carefully back up any critical user data before installing this update. !_ - Updated the System to the new version of Foundry VTT (a lot of things broke). - NPC can now have strengths/weaknesses with all rings. - Added "Title, Bond, Signature Scroll and Item Pattern": - The item types. - Theirs compendiums entries. - A new list in experience tab to not mess with school cursus. + - Item pattern can be dropped on another item to add the associated property. - Added an optional "Specificity" technique type to serve as a catch-all (by request). - Added Mantis Clan compendium entries - Fix : rnkMessage not passing on actor object for NPCs (thanks to Bragma). diff --git a/system/packs/core-item-patterns.db b/system/packs/core-item-patterns.db index c467b61..a70e710 100644 --- a/system/packs/core-item-patterns.db +++ b/system/packs/core-item-patterns.db @@ -1,5 +1,5 @@ -{"_id":"L5RCoreItp000001","name":"Kakita Pattern","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"6","rarity_modifier":"4","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} -{"_id":"L5RCoreItp000002","name":"Kenzō Blade","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"8","rarity_modifier":"5","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} -{"_id":"L5RCoreItp000003","name":"Shirogane Jade Inlay","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"3","rarity_modifier":"2","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} -{"_id":"L5RCoreItp000004","name":"Uchema’s Technique","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"4","rarity_modifier":"3","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} -{"_id":"L5RCoreItp000005","name":"Yasunori Steel","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"5","rarity_modifier":"4","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} +{"_id":"L5RCoreItp000001","name":"Kakita Pattern","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"6","rarity_modifier":"4","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{"l5r5e":{"linkedPropertyId":"L5RCorePro000017"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} +{"_id":"L5RCoreItp000002","name":"Kenzō Blade","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"8","rarity_modifier":"5","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{"l5r5e":{"linkedPropertyId":"L5RCorePro000018"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} +{"_id":"L5RCoreItp000003","name":"Shirogane Jade Inlay","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"3","rarity_modifier":"2","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{"l5r5e":{"linkedPropertyId":"L5RCorePro000019"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} +{"_id":"L5RCoreItp000004","name":"Uchema’s Technique","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"4","rarity_modifier":"3","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{"l5r5e":{"linkedPropertyId":"L5RCorePro000020"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} +{"_id":"L5RCoreItp000005","name":"Yasunori Steel","permission":{"default":0},"type":"item_pattern","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"5","rarity_modifier":"4","description":"","book_reference":"Shadowlands p.109"},"sort":100001,"flags":{"l5r5e":{"linkedPropertyId":"L5RCorePro000021"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]} diff --git a/system/scripts/actor.js b/system/scripts/actor.js index ac8f675..546a0b1 100644 --- a/system/scripts/actor.js +++ b/system/scripts/actor.js @@ -63,12 +63,20 @@ export class ActorL5r5e extends Actor { * Entity-specific actions that should occur when the Entity is updated * @override */ - update(data, options = {}) { + async update(data = {}, context = {}) { + // Need a _id + if (!data["_id"]) { + data["_id"] = this.id; + } + // Fix for token image unliked from character... dunno why if (data.img) { data["token.img"] = data.img; } - return super.update(data, options); + + // Now using updateDocuments + data = data instanceof Array ? data : [data]; + return Actor.updateDocuments(data, context); } /** @override */ diff --git a/system/scripts/actors/base-sheet.js b/system/scripts/actors/base-sheet.js index cd247be..f5f3cca 100644 --- a/system/scripts/actors/base-sheet.js +++ b/system/scripts/actors/base-sheet.js @@ -151,7 +151,7 @@ export class BaseSheetL5r5e extends ActorSheet { } // Check item type and subtype - const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); + let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); if ( !item || item.documentName !== "Item" || @@ -170,9 +170,10 @@ export class BaseSheetL5r5e extends ActorSheet { ) { return; } + item = item.toJSON(); // Dropped a item with same "id" as one owned, add qte instead - if (item.data.data.quantity && this.actor.data.items) { + if (item.data.quantity && this.actor.data.items) { const tmpItem = this.actor.data.items.find((e) => e.name === item.name && e.type === item.type); if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) { return; @@ -180,23 +181,24 @@ export class BaseSheetL5r5e extends ActorSheet { } // Item subtype specific - switch (item.data.type) { - case "advancement": // no break + switch (item.type) { case "bond": // no break - case "peculiarity": + case "advancement": // no break + case "peculiarity": // no break + case "item_pattern": // no break + case "signature_scroll": // Modify the bought at rank to the current actor rank if (this.actor.data.data.identity?.school_rank) { - item.data.data.bought_at_rank = this.actor.data.data.identity.school_rank; + item.data.bought_at_rank = this.actor.data.data.identity.school_rank; } break; case "technique": // School_ability and mastery_ability, allow only 1 per type - if (CONFIG.l5r5e.techniques.get(item.data.data.technique_type)?.type === "school") { + if (CONFIG.l5r5e.techniques.get(item.data.technique_type)?.type === "school") { if ( Array.from(this.actor.items).some( - (e) => - e.type === "technique" && e.data.data.technique_type === item.data.data.technique_type + (e) => e.type === "technique" && e.data.data.technique_type === item.data.technique_type ) ) { ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one")); @@ -204,25 +206,24 @@ export class BaseSheetL5r5e extends ActorSheet { } // No cost for schools - item.data.data.xp_cost = 0; - item.data.data.xp_used = 0; - item.data.data.in_curriculum = true; + item.data.xp_cost = 0; + item.data.xp_used = 0; + item.data.in_curriculum = true; } else { // Check if technique is allowed for this character - if (!game.user.isGM && !this.actor.data.data.techniques[item.data.data.technique_type]) { + if (!game.user.isGM && !this.actor.data.data.techniques[item.data.technique_type]) { ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed")); return; } // Verify cost - item.data.data.xp_cost = - item.data.data.xp_cost > 0 ? item.data.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost; - item.data.data.xp_used = item.data.data.xp_cost; + item.data.xp_cost = item.data.xp_cost > 0 ? item.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost; + item.data.xp_used = item.data.xp_cost; } // Modify the bought at rank to the current actor rank if (this.actor.data.data.identity?.school_rank) { - item.data.data.bought_at_rank = this.actor.data.data.identity.school_rank; + item.data.bought_at_rank = this.actor.data.data.identity.school_rank; } break; } @@ -232,7 +233,8 @@ export class BaseSheetL5r5e extends ActorSheet { if (allowed === false) { return; } - return this._onDropItemCreate(item.toJSON()); + + return this._onDropItemCreate(item); } /** @@ -244,8 +246,6 @@ export class BaseSheetL5r5e extends ActorSheet { // Toggle html.find(".toggle-on-click").on("click", (event) => { - event.preventDefault(); - event.stopPropagation(); const elmt = $(event.currentTarget).data("toggle"); const tgt = html.find("." + elmt); tgt.toggleClass("toggle-active"); diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 5c801d0..afd8f09 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -161,8 +161,6 @@ export class TwentyQuestionsDialog extends FormApplication { // Toggle html.find(".toggle-on-click").on("click", (event) => { - event.preventDefault(); - event.stopPropagation(); const elmt = $(event.currentTarget).data("toggle"); const tgt = html.find("." + elmt); tgt.toggleClass("toggle-active"); @@ -382,7 +380,7 @@ export class TwentyQuestionsDialog extends FormApplication { if (!id) { continue; } - const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack(id, "Item"); + const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: id, type: "Item" }); if (!item) { continue; } diff --git a/system/scripts/dice/roll.js b/system/scripts/dice/roll.js index 39d6cb2..822c9a1 100644 --- a/system/scripts/dice/roll.js +++ b/system/scripts/dice/roll.js @@ -160,31 +160,31 @@ export class RollL5r5e extends Roll { * @override */ get total() { - //return 0; // todo Bug : Si 0 tout le temps -> pas de pb pour le chat. mais plus d'inline :'( + return null; // TODO Bug 0.8.x : If not returning a null/0 value the chat ignore the template. If i do this, no inline but "/r 1dr" work fine :'( - if (!this._evaluated) { - return null; - } - - let total = ""; - - // Regular dices total (eg 6) - if (this.l5r5e.dicesTypes.std) { - total = this._total; - } - - // Add L5R summary - if (this.l5r5e.dicesTypes.l5r) { - const summary = this.l5r5e.summary; - total += - (this.l5r5e.dicesTypes.std ? " | " : "") + - ["success", "explosive", "opportunity", "strife"] - .map((props) => (summary[props] > 0 ? ` ${summary[props]}` : null)) - .filter((c) => !!c) - .join(" | "); - } - - return total; + // if (!this._evaluated) { + // return null; + // } + // + // let total = ""; + // + // // Regular dices total (eg 6) + // if (this.l5r5e.dicesTypes.std) { + // total = this._total; + // } + // + // // Add L5R summary + // if (this.l5r5e.dicesTypes.l5r) { + // const summary = this.l5r5e.summary; + // total += + // (this.l5r5e.dicesTypes.std ? " | " : "") + + // ["success", "explosive", "opportunity", "strife"] + // .map((props) => (summary[props] > 0 ? ` ${summary[props]}` : null)) + // .filter((c) => !!c) + // .join(" | "); + // } + // + // return total; } /** diff --git a/system/scripts/helpers.js b/system/scripts/helpers.js index 0ab528d..5cd57d0 100644 --- a/system/scripts/helpers.js +++ b/system/scripts/helpers.js @@ -71,74 +71,80 @@ export class HelpersL5r5e { return null; } const data = JSON.parse(json); - return await HelpersL5r5e.getObjectGameOrPack(data.id, data.type, data.pack); + return await HelpersL5r5e.getObjectGameOrPack(data); } /** * Return the object from Game or Pack by his ID, or null if not found */ - static async getObjectGameOrPack(id, type, pack = null) { + static async getObjectGameOrPack({ id, type, data = null, pack = null }) { + let document = null; + try { - // If no pack passed, but it's a core item, we know the pack to get it - if (!pack && id.substr(0, 7) === "L5RCore") { - pack = HelpersL5r5e.getPackNameForCoreItem(id); + // Direct Object + if (data?._id) { + document = HelpersL5r5e.createItemFromCompendium(data); + } else if (!id || !type) { + return null; } // Named pack - if (pack) { - const data = await game.packs.get(pack).getDocument(id); - if (data) { - return HelpersL5r5e.createItemFromCompendium(data); + if (!document) { + // If no pack passed, but it's a core item, we know the pack to get it + if (!pack && id.substr(0, 7) === "L5RCore") { + pack = HelpersL5r5e.getPackNameForCoreItem(id); + } + + if (pack) { + const data = await game.packs.get(pack).getDocument(id); + if (data) { + document = HelpersL5r5e.createItemFromCompendium(data); + } } } // Game object - let item = null; - switch (type) { - case "Actor": - item = game.actors.get(id); - break; - - case "Item": - item = game.items.get(id); - break; - - case "JournalEntry": - item = game.journal.get(id); - break; - - case "Macro": - item = game.macros.get(id); - break; - } - if (item) { - await HelpersL5r5e.refreshItemProperties(item); - return item; + if (!document) { + document = CONFIG[type].collection.instance.get(id); } // Unknown pack object, iterate all packs - for (const comp of game.packs) { - // TODO Bug with babele if "comp.getDocument(id)" return null... - const babeleFix = (await comp.getIndex()).some((e) => e.id === id); - if (!babeleFix) { - continue; + if (!document) { + for (const comp of game.packs) { + // TODO Bug with babele if "comp.getDocument(id)" return null... + const babeleFix = (await comp.getIndex()).some((e) => e.id === id); + if (!babeleFix) { + continue; + } + + const data = await comp.getDocument(id); + if (data) { + document = HelpersL5r5e.createItemFromCompendium(data); + } + } + } + + // Final + if (document) { + // Flag the source GUID + if (document.uuid && !document.getFlag("core", "sourceId")) { + document.data.update({ "flags.core.sourceId": document.uuid }); } - const data = await comp.getDocument(id); - if (data) { - return HelpersL5r5e.createItemFromCompendium(data); - } + await HelpersL5r5e.refreshItemProperties(document); + document.prepareData(); } } catch (err) { console.warn(err); } - return null; + console.log(" ***** getObjectGameOrPack", document); + return document; } /** * Make a temporary item for compendium drag n drop */ - static async createItemFromCompendium(data) { + static createItemFromCompendium(data) { if ( ![ "item", @@ -156,31 +162,24 @@ export class HelpersL5r5e { return data; } - let item; + let document; if (data instanceof ItemL5r5e) { - item = data; - } else if (game.user.hasPermission("ACTOR_CREATE")) { - // Fail if a player do not have the right to create object (even if this is a temporary) - item = await ItemL5r5e.create(data, { temporary: true }); - - // reinject compendium id (required for properties) - item.data.id = data.id; + document = data; } else { // Quick object - item = new ItemL5r5e(data); + document = new ItemL5r5e(data); } - await HelpersL5r5e.refreshItemProperties(item); - return item; + return document; } /** * Babele and properties specific */ - static async refreshItemProperties(item) { - if (item.data.data.properties && typeof Babele !== "undefined") { - item.data.data.properties = await Promise.all( - item.data.data.properties.map(async (property) => { - const gameProp = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack(property.id, "Item"); + static async refreshItemProperties(document) { + if (document.data.data.properties && typeof Babele !== "undefined") { + document.data.data.properties = await Promise.all( + document.data.data.properties.map(async (property) => { + const gameProp = await HelpersL5r5e.getObjectGameOrPack({ id: property.id, type: "Item" }); if (gameProp) { return { id: gameProp.id, name: gameProp.name }; } @@ -217,7 +216,7 @@ export class HelpersL5r5e { /** * Get the associated pack for a core item (time saving) */ - static getPackNameForCoreItem(itemId) { + static getPackNameForCoreItem(documentId) { const core = new Map(); core.set("Pro", "l5r5e.core-properties"); core.set("Kat", "l5r5e.core-techniques-kata"); @@ -241,7 +240,7 @@ export class HelpersL5r5e { core.set("Pas", "l5r5e.core-peculiarities-passions"); core.set("Adv", "l5r5e.core-peculiarities-adversities"); core.set("Anx", "l5r5e.core-peculiarities-anxieties"); - return core.get(itemId.replace(/L5RCore(\w{3})\d+/gi, "$1")); + return core.get(documentId.replace(/L5RCore(\w{3})\d+/gi, "$1")); } /** diff --git a/system/scripts/item.js b/system/scripts/item.js index 1801d9d..ed9d4e2 100644 --- a/system/scripts/item.js +++ b/system/scripts/item.js @@ -3,10 +3,10 @@ export class ItemL5r5e extends Item { * Create a new entity using provided input data * @override */ - static async create(data, options = {}) { + static async create(data, context = {}) { if (data.img === undefined) { data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`; } - return super.create(data, options); + return super.create(data, context); } } diff --git a/system/scripts/items/item-sheet.js b/system/scripts/items/item-sheet.js index e059930..2234e64 100644 --- a/system/scripts/items/item-sheet.js +++ b/system/scripts/items/item-sheet.js @@ -39,7 +39,7 @@ export class ItemSheetL5r5e extends ItemSheet { if (Array.isArray(sheetData.data.data.properties)) { const props = []; for (const property of sheetData.data.data.properties) { - const gameProp = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack(property.id, "Item"); + const gameProp = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: property.id, type: "Item" }); if (gameProp) { sheetData.data.propertiesList.push(gameProp); props.push({ id: gameProp.id, name: gameProp.name }); @@ -72,6 +72,9 @@ export class ItemSheetL5r5e extends ItemSheet { */ async _updateObject(event, formData) { if (formData["data.description"]) { + // Base links (Journal, compendiums...) + formData["data.description"] = TextEditor.enrichHTML(formData["data.description"]); + // L5R Symbols formData["data.description"] = game.l5r5e.HelpersL5r5e.convertSymbols(formData["data.description"], true); } return super._updateObject(event, formData); @@ -86,8 +89,6 @@ export class ItemSheetL5r5e extends ItemSheet { // Toggle html.find(".toggle-on-click").on("click", (event) => { - event.preventDefault(); - event.stopPropagation(); const elmt = $(event.currentTarget).data("toggle"); const tgt = html.find("." + elmt); tgt.toggleClass("toggle-active"); @@ -135,8 +136,18 @@ export class ItemSheetL5r5e extends ItemSheet { } // Check item type and subtype - const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); - if (!item || item.documentName !== "Item" || item.data.type !== "property" || this.item.type === "property") { + let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); + if (!item || item.documentName !== "Item" || this.item.type === "property") { + return; + } + + // Specific ItemPattern's drop, get the associated props instead + if (item.data.type === "item_pattern" && item.data.flags.l5r5e?.linkedPropertyId) { + item = await game.packs.get("l5r5e.core-properties").getDocument(item.data.flags.l5r5e.linkedPropertyId); + } + + // Final object has to be a property + if (item.data.type !== "property") { return; } diff --git a/system/scripts/main-l5r5e.js b/system/scripts/main-l5r5e.js index 84d7cdc..8b51e82 100644 --- a/system/scripts/main-l5r5e.js +++ b/system/scripts/main-l5r5e.js @@ -78,6 +78,7 @@ Hooks.once("init", async () => { RingDie, AbilityDie, HelpersL5r5e, + ItemL5r5e, RollL5r5e, DicePickerDialog, RollnKeepDialog, diff --git a/system/scripts/preloadTemplates.js b/system/scripts/preloadTemplates.js index ad17ce4..1aff616 100644 --- a/system/scripts/preloadTemplates.js +++ b/system/scripts/preloadTemplates.js @@ -9,6 +9,7 @@ export const PreloadTemplates = async function () { "systems/l5r5e/templates/actors/character/conflict.html", "systems/l5r5e/templates/actors/character/experience.html", "systems/l5r5e/templates/actors/character/identity.html", + "systems/l5r5e/templates/actors/character/inventory.html", "systems/l5r5e/templates/actors/character/narrative.html", "systems/l5r5e/templates/actors/character/rings.html", "systems/l5r5e/templates/actors/character/skill.html", @@ -20,6 +21,7 @@ export const PreloadTemplates = async function () { "systems/l5r5e/templates/actors/npc/attributes.html", "systems/l5r5e/templates/actors/npc/conflict.html", "systems/l5r5e/templates/actors/npc/identity.html", + "systems/l5r5e/templates/actors/npc/inventory.html", "systems/l5r5e/templates/actors/npc/narrative.html", "systems/l5r5e/templates/actors/npc/rings.html", "systems/l5r5e/templates/actors/npc/social.html", diff --git a/system/templates/actors/character-sheet.html b/system/templates/actors/character-sheet.html index aa2b61f..2c402be 100644 --- a/system/templates/actors/character-sheet.html +++ b/system/templates/actors/character-sheet.html @@ -47,25 +47,7 @@ {{!-- Inventory Tab --}}
-
- {{localize 'l5r5e.money.title'}} - - - -
-
- {{localize 'l5r5e.equipment'}} - {{> 'systems/l5r5e/templates/items/item/items.html'}} -
+ {{> 'systems/l5r5e/templates/actors/character/inventory.html'}}
{{!-- Experience Tab --}} diff --git a/system/templates/actors/character/experience.html b/system/templates/actors/character/experience.html index 8a39388..f29ae31 100644 --- a/system/templates/actors/character/experience.html +++ b/system/templates/actors/character/experience.html @@ -61,7 +61,6 @@ - {{!-- Others progession (does not count in school xp) --}}
{{localize 'l5r5e.advancements.title'}} diff --git a/system/templates/actors/character/inventory.html b/system/templates/actors/character/inventory.html new file mode 100644 index 0000000..1d99d23 --- /dev/null +++ b/system/templates/actors/character/inventory.html @@ -0,0 +1,36 @@ +
+ {{localize 'l5r5e.money.title'}} + + + +
+{{!-- items list --}} +
+ {{localize 'l5r5e.equipment'}} + {{> 'systems/l5r5e/templates/items/item/items.html'}} +
+{{!-- item patterns list --}} +
+ + {{localize 'l5r5e.advancements.item_pattern'}} + {{#if options.editable}} + + {{/if}} + + +
\ No newline at end of file diff --git a/system/templates/actors/character/narrative.html b/system/templates/actors/character/narrative.html index d3cd914..5d7fbd7 100644 --- a/system/templates/actors/character/narrative.html +++ b/system/templates/actors/character/narrative.html @@ -41,38 +41,6 @@ {{/each}}
- {{!-- item-pattern --}} -
- - {{localize 'l5r5e.advancements.item_pattern' }} - {{#if options.editable}} - - {{/if}} - - -
- {{!-- signature-scroll --}} -
- - {{localize 'l5r5e.advancements.signature_scroll' }} - {{#if options.editable}} - - {{/if}} - - -
{{!-- bonds --}}
diff --git a/system/templates/actors/character/techniques.html b/system/templates/actors/character/techniques.html index e478484..a246039 100644 --- a/system/templates/actors/character/techniques.html +++ b/system/templates/actors/character/techniques.html @@ -1,4 +1,5 @@
+ {{!-- technique types --}}
{{localize 'l5r5e.techniques.type'}} {{#each data.techniquesList as |technique|}} @@ -8,6 +9,7 @@ {{/each}}
+ {{!-- technique list --}} {{#each data.splitTechniquesList as |list technique|}}
@@ -23,4 +25,20 @@
{{/each}} + {{!-- signature scroll list --}} +
+ + {{localize 'l5r5e.advancements.signature_scroll' }} + {{#if options.editable}} + + {{/if}} + +
    + {{#each actor.items as |scroll id|}} + {{#ifCond scroll.data.type '==' 'signature_scroll'}} + {{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../options.editable}} + {{/ifCond}} + {{/each}} +
+
\ No newline at end of file diff --git a/system/templates/actors/npc-sheet.html b/system/templates/actors/npc-sheet.html index 521f894..89fdcb4 100644 --- a/system/templates/actors/npc-sheet.html +++ b/system/templates/actors/npc-sheet.html @@ -50,10 +50,7 @@ {{!-- Inventory Tab --}}
-
- {{localize 'l5r5e.equipment'}} - {{> 'systems/l5r5e/templates/items/item/items.html'}} -
+ {{> 'systems/l5r5e/templates/actors/npc/inventory.html'}}
\ No newline at end of file diff --git a/system/templates/actors/npc/inventory.html b/system/templates/actors/npc/inventory.html new file mode 100644 index 0000000..e8d4459 --- /dev/null +++ b/system/templates/actors/npc/inventory.html @@ -0,0 +1,20 @@ +
+ {{localize 'l5r5e.equipment'}} + {{> 'systems/l5r5e/templates/items/item/items.html'}} +
+{{!-- item patterns list --}} +
+ + {{localize 'l5r5e.advancements.item_pattern' }} + {{#if options.editable}} + + {{/if}} + +
    + {{#each actor.items as |pattern id|}} + {{#ifCond pattern.data.type '==' 'item_pattern'}} + {{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../options.editable}} + {{/ifCond}} + {{/each}} +
+
diff --git a/system/templates/actors/npc/narrative.html b/system/templates/actors/npc/narrative.html index 4777fd3..630e8d2 100644 --- a/system/templates/actors/npc/narrative.html +++ b/system/templates/actors/npc/narrative.html @@ -28,38 +28,6 @@ {{/each}}
-{{!-- item-pattern --}} -
- - {{localize 'l5r5e.advancements.item_pattern' }} - {{#if options.editable}} - - {{/if}} - - -
-{{!-- signature-scroll --}} -
- - {{localize 'l5r5e.advancements.signature_scroll' }} - {{#if options.editable}} - - {{/if}} - - -
{{!-- bonds --}}
diff --git a/system/templates/actors/npc/techniques.html b/system/templates/actors/npc/techniques.html index a3f5d1d..400cc4f 100644 --- a/system/templates/actors/npc/techniques.html +++ b/system/templates/actors/npc/techniques.html @@ -2,6 +2,7 @@ {{localize 'l5r5e.techniques.title'}} + {{!-- technique types --}}
{{localize 'l5r5e.techniques.type'}} {{#each data.techniquesList as |technique|}} @@ -11,6 +12,7 @@ {{/each}}
+ {{!-- technique list --}} {{#each data.splitTechniquesList as |list technique|}}
@@ -26,4 +28,20 @@
{{/each}} + {{!-- signature scroll list --}} +
+ + {{localize 'l5r5e.advancements.signature_scroll' }} + {{#if options.editable}} + + {{/if}} + +
    + {{#each actor.items as |scroll id|}} + {{#ifCond scroll.data.type '==' 'signature_scroll'}} + {{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../options.editable}} + {{/ifCond}} + {{/each}} +
+
\ No newline at end of file diff --git a/system/templates/items/advancement/advancement-entry.html b/system/templates/items/advancement/advancement-entry.html index f5bd1cb..98f5fb4 100644 --- a/system/templates/items/advancement/advancement-entry.html +++ b/system/templates/items/advancement/advancement-entry.html @@ -1,4 +1,4 @@ -
  • +