Skip to content

Commit

Permalink
11.04 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ironmonk88 committed Jun 29, 2023
1 parent c83f889 commit 97e6db6
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 57 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 11.04

Fixing issues with v11 statuses.

Adding hotkey to toggle the Always HP window.

# Version 11.01

Fixed issues with the D&D5e group actor.
Expand Down
11 changes: 10 additions & 1 deletion alwayshp.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class AlwaysHP extends Application {

if (t) {
let overlay = (isV10() ? t.document.overlayEffect : t.data.overlayEffect);
const exists = (effect.icon == undefined ? (overlay == effect) : (a.effects.find(e => e.getFlag("core", "statusId") === effect.id) != undefined));
const exists = (effect.icon == undefined ? overlay == effect : a.statuses.has(effect.id));

if (exists != active)
await t.toggleEffect(effect, { overlay: true, active: (active == 'toggle' ? !exists : active) });
Expand Down Expand Up @@ -492,6 +492,15 @@ export class AlwaysHP extends Application {
Hooks.on('init', () => {
registerSettings();

game.keybindings.register('always-hp', 'toggle-key', {
name: 'ALWAYSHP.toggle-key.name',
hint: 'ALWAYSHP.toggle-key.hint',
editable: [],
onDown: () => {
game.AlwaysHP.toggleApp();
},
});

game.AlwaysHP = {
app: null,
toggleApp: (show = 'toggle') => {
Expand Down
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"ALWAYSHP.no-sign-negative.hint": "If no + or - is added, Always HP assumes negative",
"ALWAYSHP.show-savingthrows.name": "Show Death Saving Throws",
"ALWAYSHP.show-savingthrows.hint": "Show death saving throws on the always HP display",
"ALWAYSHP.toggle-key.name": "Toggle Key",
"ALWAYSHP.toggle-key.hint": "Toggle Always HP on and off with a key press",

"ALWAYSHP.DeathSavingThrowFail": "Death Savingthrow, Fail",
"ALWAYSHP.DeathSavingThrowPass": "Death Savingthrow, Pass"
Expand Down
112 changes: 56 additions & 56 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
{
"title": "Always HP",
"description": "We're always updating HP, add a window to make it easier to adjust that",
"version": "11.03",
"authors": [
{
"name": "IronMonk",
"discord": "ironmonk88#4075",
"flags": {
"github": "ironmonk88",
"patreon": "ironmonk",
"ko-fi": "ironmonk88"
}
}
],
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "ja",
"name": "日本語",
"path": "lang/ja.json"
},
{
"lang": "zh-tw",
"name": "正體中文",
"path": "lang/zh-tw.json"
},
{
"lang": "pl",
"name": "Polish",
"path": "lang/pl.json"
}
],
"esmodules": [
"alwayshp.js"
],
"styles": [
"css/alwayshp.css"
],
"url": "https://github.com/ironmonk88/always-hp",
"download": "https://github.com/ironmonk88/always-hp/archive/11.03.zip",
"manifest": "https://github.com/ironmonk88/always-hp/releases/latest/download/module.json",
"bugs": "https://github.com/ironmonk88/always-hp/issues",
"allowBugReporter": true,
"id": "always-hp",
"compatibility": {
"minimum": "9",
"verified": "11"
},
"name": "always-hp",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "11"
{
"title": "Always HP",
"description": "We're always updating HP, add a window to make it easier to adjust that",
"version": "11.04",
"authors": [
{
"name": "IronMonk",
"discord": "ironmonk88#4075",
"flags": {
"github": "ironmonk88",
"patreon": "ironmonk",
"ko-fi": "ironmonk88"
}
}
],
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "ja",
"name": "日本語",
"path": "lang/ja.json"
},
{
"lang": "zh-tw",
"name": "正體中文",
"path": "lang/zh-tw.json"
},
{
"lang": "pl",
"name": "Polish",
"path": "lang/pl.json"
}
],
"esmodules": [
"alwayshp.js"
],
"styles": [
"css/alwayshp.css"
],
"url": "https://github.com/ironmonk88/always-hp",
"download": "https://github.com/ironmonk88/always-hp/archive/11.04.zip",
"manifest": "https://github.com/ironmonk88/always-hp/releases/latest/download/module.json",
"bugs": "https://github.com/ironmonk88/always-hp/issues",
"allowBugReporter": true,
"id": "always-hp",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"name": "always-hp",
"minimumCoreVersion": "11",
"compatibleCoreVersion": "11"
}

0 comments on commit 97e6db6

Please sign in to comment.