Skip to content

Commit

Permalink
version 0.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Jul 17, 2023
1 parent b5a3621 commit 8ad5324
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 77 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 0.9.6-7
### 0.9.6-7-8

- Bug fix on hooks

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.7",
"version": "0.9.8",
"main": "module.js",
"license": "SEE LICENSE IN LICENSE",
"private": true,
Expand Down
1 change: 0 additions & 1 deletion src/lang/zh-tw.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"TIDY5E.Tidy5eSheet": "Tidy 5e Character Sheet",
"TIDY5E.Tidy5eNPC": "Tidy 5e NPC Sheet",
Expand Down
15 changes: 12 additions & 3 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ import {
import { Tidy5eSheetVehicleInitialize } from "./scripts/tidy5e-vehicle";

Hooks.once("init", async () => {
// init user settings menu
Tidy5eUserSettings.init();
debug(`module | init | start`);
// Preload tidy5e Handlebars Templates
preloadTidy5eHandlebarsTemplates();

// init user settings menu
Tidy5eUserSettings.init();

Tidy5eSheetInitialize();
Tidy5eSheetNPCInitialize();
Tidy5eSheetVehicleInitialize();
Expand All @@ -37,6 +36,7 @@ Hooks.once("init", async () => {
});

Hooks.once("ready", async (app, html, data) => {
// Tidy5eUserSettings.init();
debug(`module | ready | start`);
if (!game.modules.get("colorsettings")?.active && game.user?.isGM) {
let word = "install and activate";
Expand All @@ -55,6 +55,7 @@ Hooks.once("ready", async (app, html, data) => {

/** perform some necessary operations on character sheet **/
Hooks.on("renderActorSheet", (app, html, data) => {
// Tidy5eUserSettings.init();
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 @@ -80,35 +81,43 @@ Hooks.on("renderActorSheet", (app, html, data) => {
// Hooks.on("updateActor", function (actorEntity, update, options, userId) {});

Hooks.on(`dnd5e.restCompleted`, (actorEntity, data) => {
// Tidy5eUserSettings.init();
Tidy5eExhaustionDnd5eRestCompleted(actorEntity, data);
});

Hooks.on("applyActiveEffect", (actor, effect, options) => {
// Tidy5eUserSettings.init();
Tidy5eSheetApplyActiveEffect(actor, effect, options);
});

Hooks.on(`createActiveEffect`, (activeEffect, _config, options) => {
// Tidy5eUserSettings.init();
Tidy5eSheetCreateActiveEffect(activeEffect, _config, options);
Tidy5eExhaustionCreateActiveEffect(activeEffect, _config, options);
});

Hooks.on("updateActiveEffect", (activeEffect, _config, options) => {
// Tidy5eUserSettings.init();
Tidy5eSheetUpdateActiveEffect(activeEffect, _config, options);
});

Hooks.on(`deleteActiveEffect`, (activeEffect, _config, options) => {
// Tidy5eUserSettings.init();
Tidy5eSheetDeleteActiveEffect(activeEffect, _config, options);
Tidy5eExhaustionDeleteActiveEffect(activeEffect, _config, options);
});

Hooks.on("renderTidy5eUserSettings", () => {
// Tidy5eUserSettings.init();
Tidy5eSettingsGmOnlySetup();
});

Hooks.on("dnd5e.preItemUsageConsumption", (item, config, options) => {
// Tidy5eUserSettings.init();
Tidy5eHBUpcastFreeSpellsDnd5ePreItemUsageConsumption(item, config, options);
});

Hooks.on("renderAbilityUseDialog", (app, html, options) => {
// Tidy5eUserSettings.init();
Tidy5eSheetRenderAbilityUseDialog(app, html, options);
});
11 changes: 4 additions & 7 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.7",
"version": "0.9.8",
"authors": [
{
"name": "sednec#3813"
Expand All @@ -20,10 +20,7 @@
}
],
"esmodules": ["module.js"],
"styles": [
"styles/tidy-icons.css",
"styles/tidy5e.css",
"styles/dark/tidy5e-dark.css"],
"styles": ["styles/tidy-icons.css", "styles/tidy5e.css", "styles/dark/tidy5e-dark.css"],
"languages": [
{
"lang": "en",
Expand Down Expand Up @@ -88,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.7/module.json",
"download": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.7/module.zip",
"manifest": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.8/module.json",
"download": "https://github.com/sdenec/tidy5e-sheet/releases/download/0.9.8/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
5 changes: 5 additions & 0 deletions src/scripts/app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ import { settingsList } from "./settingsList.js";
import { debug } from "./tidy5e-logger-util.js";

export class Tidy5eUserSettings extends FormApplication {
// static isInitialized = false;

static init() {
// if(!Tidy5eUserSettings.isInitialized){
settingsList();
// Tidy5eUserSettings.isInitialized = true;
// }
}

// settings template
Expand Down
12 changes: 6 additions & 6 deletions src/scripts/app/tidy5e-logger-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ 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")) {
console.log(`DEBUG | ${CONSTANTS.MODULE_ID} | ${msg}`, args);
//@ts-ignore
if (game.modules.get("_dev-mode")?.api?.getPackageDebugValue(CONSTANTS.MODULE_ID)) {
console.log(CONSTANTS.MODULE_ID, "|", ...args);
if (game.settings.get(CONSTANTS.MODULE_ID, "debug")) {
console.log(`DEBUG | ${CONSTANTS.MODULE_ID} | ${msg}`, args);
//@ts-ignore
if (game.modules.get("_dev-mode")?.api?.getPackageDebugValue(CONSTANTS.MODULE_ID)) {
console.log(CONSTANTS.MODULE_ID, "|", ...args);
}
}
// }
return msg;
}
export function log(message, args = "") {
Expand Down
116 changes: 58 additions & 58 deletions src/styles/partials/_item-with-spells.scss
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
.tidy5e.sheet {
.items-with-spells-items-list {
.items-header {
height: 28px;
margin: 2px 0;
padding: 0;
align-items: center;
background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0;
font-weight: bold;
>* {
font-size: 12px;
text-align: center;
}
h3 {
padding-left: 5px;
font-family: "Modesto Condensed", "Palatino Linotype", serif;
font-size: 20px;
font-weight: 700;
text-align: left;
font-size: 16px;
}
.item-name {
margin: 0px;
border: none;
}
}
.item {
.item-name {
.item-image {
flex: 0 0 30px;
height: 30px;
background-size: cover;
background-position: 50% 0;
border: none;
margin-right: 5px;
}
}
}
padding: 0px;
.item-list {
padding: 0px;
}
.item-control {
text-align: center;
}
}
.traits {
.tag.tool {
h4 {
font-weight: normal;
}
}
}
.items-with-spells-items-list {
.items-header {
height: 28px;
margin: 2px 0;
padding: 0;
align-items: center;
background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0;
font-weight: bold;
> * {
font-size: 12px;
text-align: center;
}
h3 {
padding-left: 5px;
font-family: "Modesto Condensed", "Palatino Linotype", serif;
font-size: 20px;
font-weight: 700;
text-align: left;
font-size: 16px;
}
.item-name {
margin: 0px;
border: none;
}
}
.item {
.item-name {
.item-image {
flex: 0 0 30px;
height: 30px;
background-size: cover;
background-position: 50% 0;
border: none;
margin-right: 5px;
}
}
}
padding: 0px;
.item-list {
padding: 0px;
}
.item-control {
text-align: center;
}
}
.traits {
.tag.tool {
h4 {
font-weight: normal;
}
}
}
}
.tidy5e-sheet {
&:not(.items-footer) {
>.item-create {
display: none;
}
}
&:not(.items-footer) {
> .item-create {
display: none;
}
}
}

0 comments on commit 8ad5324

Please sign in to comment.