Skip to content

Commit

Permalink
version 0.9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Jul 18, 2023
1 parent e82b795 commit e88a9e5
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ out

# Foundry
foundry.js
/.vscode
/dist
/package
/.vite-cache
Expand Down
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
### 0.9.12

- BUg fix: https://github.com/sdenec/tidy5e-sheet/issues/775
- bug fix: https://github.com/sdenec/tidy5e-sheet/issues/776

### 0.9.11

- Try to fix: https://github.com/sdenec/tidy5e-sheet/issues/775


### 0.9.10

- Add module settings "enablePermanentUnlockOnVehicleIfYouAreGM" and "enablePermanentUnlockOnNPCIfYouAreGM"" for fix https://github.com/sdenec/tidy5e-sheet/issues/764
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tidy5e-sheet",
"title": "Tidy5e Sheet",
"description": "Replaces the default D&D 5e character and NPC sheet with an alternate layout focused on a cleaner UI",
"version": "0.9.11",
"version": "0.9.12",
"main": "module.js",
"license": "SEE LICENSE IN LICENSE",
"private": true,
Expand Down
10 changes: 0 additions & 10 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Hooks.once("init", async () => {
});

Hooks.once("ready", async (app, html, data) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
debug(`module | ready | start`);
if (!game.modules.get("colorsettings")?.active && game.user?.isGM) {
let word = "install and activate";
Expand All @@ -55,7 +54,6 @@ Hooks.once("ready", async (app, html, data) => {

/** perform some necessary operations on character sheet **/
Hooks.on("renderActorSheet", (app, html, data) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
debug(`module | renderActorSheet | start`);
// Temporary Patch for module incompatibility with https://github.com/misthero/dnd5e-custom-skills
// Issue https://github.com/sdenec/tidy5e-sheet/issues/662
Expand All @@ -81,43 +79,35 @@ Hooks.on("renderActorSheet", (app, html, data) => {
// Hooks.on("updateActor", function (actorEntity, update, options, userId) {});

Hooks.on(`dnd5e.restCompleted`, (actorEntity, data) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eExhaustionDnd5eRestCompleted(actorEntity, data);
});

Hooks.on("applyActiveEffect", (actor, effect, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSheetApplyActiveEffect(actor, effect, options);
});

Hooks.on(`createActiveEffect`, (activeEffect, _config, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSheetCreateActiveEffect(activeEffect, _config, options);
Tidy5eExhaustionCreateActiveEffect(activeEffect, _config, options);
});

Hooks.on("updateActiveEffect", (activeEffect, _config, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSheetUpdateActiveEffect(activeEffect, _config, options);
});

Hooks.on(`deleteActiveEffect`, (activeEffect, _config, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSheetDeleteActiveEffect(activeEffect, _config, options);
Tidy5eExhaustionDeleteActiveEffect(activeEffect, _config, options);
});

Hooks.on("renderTidy5eUserSettings", () => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSettingsGmOnlySetup();
});

Hooks.on("dnd5e.preItemUsageConsumption", (item, config, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eHBUpcastFreeSpellsDnd5ePreItemUsageConsumption(item, config, options);
});

Hooks.on("renderAbilityUseDialog", (app, html, options) => {
Tidy5eUserSettings.init(); // TODO why i need this... https://github.com/sdenec/tidy5e-sheet/issues/775
Tidy5eSheetRenderAbilityUseDialog(app, html, options);
});
6 changes: 3 additions & 3 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "tidy5e-sheet",
"title": "Tidy5e Sheet",
"description": "Replaces the default D&D 5e character and NPC sheet with an alternate layout focused on a cleaner UI",
"version": "0.9.11",
"version": "0.9.12",
"authors": [
{
"name": "sednec#3813"
Expand Down Expand Up @@ -85,8 +85,8 @@
},
"manifestPlusVersion": "1.2.1",
"url": "https://github.com/sdenec/tidy5e-sheet",
"manifest": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.11/module.json",
"download": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.11/module.zip",
"manifest": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.12/module.json",
"download": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.12/module.zip",
"readme": "https://github.com/sdenec/tidy5e-sheet/blob/master/README.md",
"changelog": "https://github.com/sdenec/tidy5e-sheet/blob/master/changelog.md",
"bugs": "https://github.com/sdenec/tidy5e-sheet/issues",
Expand Down
9 changes: 8 additions & 1 deletion src/scripts/app/tidy5e-logger-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import CONSTANTS from "./constants.js";
// export let debugEnabled = 0;
// 0 = none, warnings = 1, debug = 2, all = 3
export function debug(msg, args = "") {
if (game.settings.get(CONSTANTS.MODULE_ID, "debug")) {
let isInDebug = false;
try {
isInDebug = game.settings.get(CONSTANTS.MODULE_ID, "debug");
} catch (e) {
// DO NOTHING
isInDebug = game.modules.get("_dev-mode")?.api?.getPackageDebugValue(CONSTANTS.MODULE_ID);
}
if (isInDebug) {
console.log(`DEBUG | ${CONSTANTS.MODULE_ID} | ${msg}`, args);
//@ts-ignore
if (game.modules.get("_dev-mode")?.api?.getPackageDebugValue(CONSTANTS.MODULE_ID)) {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/tidy5e-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async function spellAttackMod(app, html, data) {
} catch (err) {
// safeEval failed try a roll
try {
spellBonus = new Roll(formula).evaluate({ async: false }).total;
spellBonus = await new Roll(formula).evaluate({ async: true }).total;
} catch (err) {
error("spell bonus calculation failed : " + err?.message, true);
}
Expand Down

0 comments on commit e88a9e5

Please sign in to comment.