diff --git a/module/actor/actor.js b/module/actor/actor.js index 18d625d..c8d79c4 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -98,7 +98,9 @@ export default class DeltaGreenActor extends Actor { try { delete system.skills.ritual; // try to remove legacy skill for ritual if it exists - } catch {} + } catch { + // do nothing + } system.sanity.ritual = 99 - system.sanity.value; @@ -189,7 +191,9 @@ export default class DeltaGreenActor extends Actor { try { delete system.skills.ritual; // try to remove legacy skill for ritual if it exists - } catch {} + } catch { + // do nothing + } system.sanity.ritual = 99 - system.sanity.value; diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index 7f5077e..2bcec8e 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -116,7 +116,7 @@ export default class DeltaGreenItemSheet extends foundry.appv1.sheets key: dataset.key, // actor: this, specialTrainingName: dataset?.name || null, // Only applies to Special Training Rolls - item: this, + item: this.item, }; // Create a default 1d100 roll just in case. @@ -133,8 +133,8 @@ export default class DeltaGreenItemSheet extends foundry.appv1.sheets roll = new DGLethalityRoll("1D100", {}, rollOptions); break; case "damage": { - let diceFormula = item.system.damage; - const { skill } = item.system; + let diceFormula = this.item.system.damage; + const { skill } = this.item.system; if ( this.actor.type === "agent" && (skill === "unarmed_combat" || skill === "melee_weapons") @@ -146,10 +146,8 @@ export default class DeltaGreenItemSheet extends foundry.appv1.sheets break; } case "sanity-damage": { - let combinedFormula; - const { successLoss, failedLoss } = this.item.system.sanity; - combinedFormula = `{${successLoss}, ${failedLoss}}`; + const combinedFormula = `{${successLoss}, ${failedLoss}}`; roll = new DGSanityDamageRoll(combinedFormula, {}, rollOptions); break; diff --git a/module/other/inline.js b/module/other/inline.js index 6070c88..2d8ee9a 100644 --- a/module/other/inline.js +++ b/module/other/inline.js @@ -1,3 +1,5 @@ +/* eslint-disable import/prefer-default-export */ + export async function handleInlineActions(btnWithAction, messageId) { const action = btnWithAction.dataset?.action; const message = game.messages.get(messageId); @@ -8,6 +10,7 @@ export async function handleInlineActions(btnWithAction, messageId) { const rollbackFlag = message.getFlag("deltagreen", "rollbacks"); await actor.update(foundry.utils.deepClone(rollbackFlag)); + // eslint-disable-next-line no-use-before-define toggleAllSkillFailures(rollbackFlag); const label = btnWithAction diff --git a/module/other/macro-functions.js b/module/other/macro-functions.js index ca07416..4e8e707 100644 --- a/module/other/macro-functions.js +++ b/module/other/macro-functions.js @@ -1,5 +1,7 @@ import * as DGRolls from "../roll/roll.js"; +const { fromUuid } = foundry.utils; + /* -------------------------------------------- */ /* Hotbar Macros */ /* -------------------------------------------- */ diff --git a/module/other/stat-parser-macro.js b/module/other/stat-parser-macro.js index 97e4684..8c7b086 100644 --- a/module/other/stat-parser-macro.js +++ b/module/other/stat-parser-macro.js @@ -113,6 +113,7 @@ function GetAttacksFromInput(inputText) { // look for armor piercing if (attackLine.indexOf("ARMOR PIERCING") >= 0) { + // TODO: This should do something. } } diff --git a/module/roll/roll.js b/module/roll/roll.js index 567bbca..02ab37f 100644 --- a/module/roll/roll.js +++ b/module/roll/roll.js @@ -144,7 +144,7 @@ export class DGPercentileRoll extends DGRoll { this.actor.system.settings.rolling.defaultPercentileModifier, ); } catch { - /* empty */ + // do nothing } }