From 4961d3bba31feec2a0320aa295b1458ca0732030 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Fri, 28 May 2021 16:11:09 +0200 Subject: [PATCH] - Update items embed permissions on add - hide the + on title sheet if non editable --- system/scripts/item.js | 3 +++ system/templates/items/title/title-sheet.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/system/scripts/item.js b/system/scripts/item.js index 3bedee6..afaf595 100644 --- a/system/scripts/item.js +++ b/system/scripts/item.js @@ -148,6 +148,9 @@ export class ItemL5r5e extends Item { item.data._id = foundry.utils.randomID(); } + // Copy the parent permission to the sub item + item.data.permission = this.data.permission; + // Tag parent (flags won't work as we have no id in db) item.data.data.parent_id = this.getParentsIds(); diff --git a/system/templates/items/title/title-sheet.html b/system/templates/items/title/title-sheet.html index 3ef9634..c9fa925 100644 --- a/system/templates/items/title/title-sheet.html +++ b/system/templates/items/title/title-sheet.html @@ -32,7 +32,7 @@
{{!-- Others progession (does not count in school xp) --}}
- {{localize 'l5r5e.advancements.title'}} + {{localize 'l5r5e.advancements.title'}} {{#if options.editable}}{{/if}}