diff --git a/CHANGELOG.md b/CHANGELOG.md index 849eb3c..46e4f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Courts of Stone - Path of Waves - Celestial Realms +- English cleanup, thanks to Mark Zeman ! - Fix js error when Advancement is not embed in a actor - Click on a weapon show the DicePicker with the weapon skill selected - Display Rarity in Compendiums for Items, Armors and Weapons diff --git a/system/scripts/actors/base-sheet.js b/system/scripts/actors/base-sheet.js index d2aa528..d1a2dbe 100644 --- a/system/scripts/actors/base-sheet.js +++ b/system/scripts/actors/base-sheet.js @@ -73,6 +73,11 @@ export class BaseSheetL5r5e extends ActorSheet { * Handle dropped data on the Actor sheet */ async _onDrop(event) { + // *** Everything below here is only needed if the sheet is editable *** + if (!this.options.editable) { + return; + } + // Check item type and subtype const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); if ( diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 4d44285..26fac48 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -217,6 +217,11 @@ export class TwentyQuestionsDialog extends FormApplication { * Handle dropped items */ async _onDropItem(type, event) { + // *** Everything below here is only needed if the sheet is editable *** + if (!this.options.editable) { + return; + } + if (!["item", "technique", "peculiarity"].includes(type)) { return; } diff --git a/system/scripts/items/item-sheet.js b/system/scripts/items/item-sheet.js index fc354c5..c9c8c8b 100644 --- a/system/scripts/items/item-sheet.js +++ b/system/scripts/items/item-sheet.js @@ -133,6 +133,11 @@ export class ItemSheetL5r5e extends ItemSheet { * Also a property canot be on another property */ async _onDrop(event) { + // Everything below here is only needed if the sheet is editable + if (!this.options.editable) { + return; + } + // Check item type and subtype const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event); if (!item || item.entity !== "Item" || item.data.type !== "property" || this.item.type === "property") {