From fafe85c96e229265a54fb97993d1026fa25f89a6 Mon Sep 17 00:00:00 2001 From: Martin Jencka Date: Fri, 31 Dec 2021 09:09:03 -0700 Subject: [PATCH] Create Item Hotfix - 0.1.7b --- module/actor/actor-sheet.js | 5 +++-- module/actor/creature-sheet.js | 2 +- module/actor/ship-sheet.js | 2 +- system.json | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 2d6e297..39aa499 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -307,7 +307,7 @@ export class MothershipActorSheet extends ActorSheet { // Finally, create the item! - return this.actor.createOwnedItem(itemData); + return this.actor.createEmbeddedDocuments("Item",[itemData]); } /** @@ -356,7 +356,8 @@ export class MothershipActorSheet extends ActorSheet { itemData.data.rank = rank; itemData.name = html.find('[id=\"name\"]')[0].value - this.actor.createOwnedItem(itemData);} + this.actor.createEmbeddedDocuments("Item",[itemData]); + } }, cancel: { icon: '', diff --git a/module/actor/creature-sheet.js b/module/actor/creature-sheet.js index ce43ddc..1e7a030 100644 --- a/module/actor/creature-sheet.js +++ b/module/actor/creature-sheet.js @@ -254,7 +254,7 @@ export class MothershipCreatureSheet extends ActorSheet { delete itemData.data["type"]; // Finally, create the item! - return this.actor.createOwnedItem(itemData); + return this.actor.createEmbeddedDocuments("Item",[itemData]); } diff --git a/module/actor/ship-sheet.js b/module/actor/ship-sheet.js index 2ae563b..e847908 100644 --- a/module/actor/ship-sheet.js +++ b/module/actor/ship-sheet.js @@ -243,7 +243,7 @@ export class MothershipShipSheet extends ActorSheet { delete itemData.data["type"]; // Finally, create the item! - return this.actor.createOwnedItem(itemData); + return this.actor.createEmbeddedDocuments("Item",[itemData]); } diff --git a/system.json b/system.json index f203451..b5e094b 100644 --- a/system.json +++ b/system.json @@ -2,9 +2,9 @@ "name": "mosh", "title": "MoSh - Unofficial Mothership", "description": "The unofficial Mothership system for FoundryVTT.", - "version": "0.1.7", + "version": "0.1.7b", "minimumCoreVersion": "0.8.6", - "compatibleCoreVersion": "0.9.0", + "compatibleCoreVersion": "V9", "templateVersion": 2, "author": "Futilrevenge", "esmodules": ["module/mosh.js"],