From 1dce3a5444233a0ac1369e4ccba585091f61ec2e Mon Sep 17 00:00:00 2001 From: Vlyan Date: Fri, 9 Sep 2022 09:49:40 +0200 Subject: [PATCH] v1.9.2 - Advancements ownership fix --- CHANGELOG.md | 3 +++ system/scripts/item.js | 4 +++- system/system.json | 4 ++-- wiki/users/install.md | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced241d..751f627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog Date format : day/month/year +## 1.9.2 - 09/09/2022 - Advancements Again +- Fix for advancements ownership (items in items). + ## 1.9.1 - 08/09/2022 - Advancements Bugfixes - Fix for advancements fail to add new items ("_id" readonly error. see #42). diff --git a/system/scripts/item.js b/system/scripts/item.js index 9586700..09386ba 100644 --- a/system/scripts/item.js +++ b/system/scripts/item.js @@ -224,7 +224,9 @@ export class ItemL5r5e extends Item { } // Copy the parent permission to the sub item - item.ownership = this.ownership; + // In v10 actor's items inherit the ownership from the actor, but theirs ownership do not reflect that. + // So we must take actor's ownership for sub-item + item.ownership = this.actor?.ownership ?? this.ownership; // Tag parent (flags won't work as we have no id in db) item.system.parent_id = this.getParentsIds(); diff --git a/system/system.json b/system/system.json index 08970d2..11d32fc 100644 --- a/system/system.json +++ b/system/system.json @@ -7,8 +7,8 @@ "changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md", "license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", - "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.1/raw/l5r5e.zip?job=build", - "version": "1.9.1", + "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.2/raw/l5r5e.zip?job=build", + "version": "1.9.2", "compatibility": { "minimum": 10, "verified": "10.284" diff --git a/wiki/users/install.md b/wiki/users/install.md index c2bf126..cf66b23 100644 --- a/wiki/users/install.md +++ b/wiki/users/install.md @@ -24,7 +24,7 @@ Nothing fancy, just accept when FoundryVTT prompt you to download or activate th | Module name | Notes | |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Babele](https://foundryvtt.com/packages/babele) | Required for non english compendium translation | -| [Permission Viewer](https://foundryvtt.com/packages/permission_viewer) | Lets you see instantly who has permissions to see what item | +| [Ownership Viewer](https://foundryvtt.com/packages/permission_viewer) | Lets you see instantly who has permissions to see what item | | [Dice So Nice!](https://foundryvtt.com/packages/dice-so-nice) | Add 3D dices that bounce on the screen when you roll dice | | [Small Legend of the 5 Rings Tools](https://foundryvtt.com/packages/l5r-dragruler) | Series of tools for L5R | | [Search Anywhere](https://foundryvtt.com/packages/searchanywhere) | Don't spent too much time searching the right technique |