From a89253f5127eca50e6213e4411bccbeaf725276b Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 28 Mar 2024 15:54:13 +0100 Subject: [PATCH 1/4] Actor sheet fix corruption + insanity --- .../actor-sheets/_aside-character.scss | 7 +++++++ src/templates/actor/sidemenu.hbs | 18 +++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/styles/components/actor-sheets/_aside-character.scss b/src/styles/components/actor-sheets/_aside-character.scss index 1555d8c4..522a2767 100644 --- a/src/styles/components/actor-sheets/_aside-character.scss +++ b/src/styles/components/actor-sheets/_aside-character.scss @@ -329,6 +329,13 @@ form { color: #000; } + .insanity-empty, + .corruption-empty { + display: block; + height: 12px; + border-radius: 3px; + } + .damage, .insanityvalue, .corruptionvalue { diff --git a/src/templates/actor/sidemenu.hbs b/src/templates/actor/sidemenu.hbs index 5839856b..6bd11e33 100644 --- a/src/templates/actor/sidemenu.hbs +++ b/src/templates/actor/sidemenu.hbs @@ -97,21 +97,21 @@
{{system.characteristics.health.value}}
-
{{localize "DL.CharInsanity"}}
+
{{localize "DL.CharInsanity"}}
- +
-
{{system.characteristics.insanity.max}}
-
{{system.characteristics.insanity.value}}
+
{{#if system.characteristics.insanity.immune}} – {{else}} {{system.characteristics.insanity.max}} {{/if}}
+
{{#if system.characteristics.insanity.immune}} – {{else}} {{system.characteristics.insanity.value}} {{/if}}
-
{{localize "DL.CharCorruption"}}
+
{{localize "DL.CharCorruption"}}
- +
-
20
-
{{system.characteristics.corruption.value}}
- +
{{#if system.characteristics.corruption.immune}} – {{else}} 20 {{/if}}
+
{{#if system.characteristics.corruption.immune}} – {{else}} {{system.characteristics.corruption.value}} {{/if}}
+ {{#unless system.characteristics.corruption.immune}} {{/unless}}
{{/if}}
From e73b1038ca7fd04b0faaf6dafc7020f9b650a4fa Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 28 Mar 2024 16:20:05 +0100 Subject: [PATCH 2/4] Actor sheet fix attribute immunity --- src/module/actor/sheets/base-actor-sheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/actor/sheets/base-actor-sheet.js b/src/module/actor/sheets/base-actor-sheet.js index f706971b..fe14165c 100644 --- a/src/module/actor/sheets/base-actor-sheet.js +++ b/src/module/actor/sheets/base-actor-sheet.js @@ -330,7 +330,7 @@ export default class DLBaseActorSheet extends ActorSheet { const div = $(ev.currentTarget) const attributeName = div.data('key') const attribute = this.actor.getAttribute(attributeName) - this.actor.rollChallenge(attribute) + if (!attribute.immune) this.actor.rollChallenge(attribute) }) // Set immune on rollable attribute From 2e18ec3d3becb861d3e832d2620b0479bbceb2ab Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 28 Mar 2024 17:26:07 +0100 Subject: [PATCH 3/4] Actor sheet fix disable edit in editbar mode --- .../actor-sheets/_aside-character.scss | 7 +++++ src/templates/actor/sidemenu.hbs | 29 +++++++++++++------ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/styles/components/actor-sheets/_aside-character.scss b/src/styles/components/actor-sheets/_aside-character.scss index 522a2767..96a1dd56 100644 --- a/src/styles/components/actor-sheets/_aside-character.scss +++ b/src/styles/components/actor-sheets/_aside-character.scss @@ -329,6 +329,13 @@ form { color: #000; } + .insanitymiddle, + .corruptionmiddle { + margin-top: -13px; + color: #000; + text-align: center; + } + .insanity-empty, .corruption-empty { display: block; diff --git a/src/templates/actor/sidemenu.hbs b/src/templates/actor/sidemenu.hbs index 6bd11e33..a34cb66f 100644 --- a/src/templates/actor/sidemenu.hbs +++ b/src/templates/actor/sidemenu.hbs @@ -65,11 +65,12 @@
@@ -79,10 +80,11 @@ @@ -101,17 +103,26 @@
-
{{#if system.characteristics.insanity.immune}} – {{else}} {{system.characteristics.insanity.max}} {{/if}}
-
{{#if system.characteristics.insanity.immune}} – {{else}} {{system.characteristics.insanity.value}} {{/if}}
+ {{#unless system.characteristics.insanity.immune}} +
{{system.characteristics.insanity.max}}
+
{{system.characteristics.insanity.value}}
+ {{else}} +
+ {{/unless}}
{{localize "DL.CharCorruption"}}
-
{{#if system.characteristics.corruption.immune}} – {{else}} 20 {{/if}}
-
{{#if system.characteristics.corruption.immune}} – {{else}} {{system.characteristics.corruption.value}} {{/if}}
- {{#unless system.characteristics.corruption.immune}} {{/unless}} + {{#unless system.characteristics.corruption.immune}} +
20
+
{{system.characteristics.corruption.value}}
+
{{system.characteristics.insanity.value}}
+ + {{else}} +
+ {{/unless}}
{{/if}}
From a149e665ecaee09aa2f880f2aa674d2a3979cdbe Mon Sep 17 00:00:00 2001 From: sasquach45932 Date: Thu, 28 Mar 2024 18:21:50 +0100 Subject: [PATCH 4/4] Simplifying using handlebar helpers --- src/templates/actor/sidemenu.hbs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/templates/actor/sidemenu.hbs b/src/templates/actor/sidemenu.hbs index a34cb66f..7acf1cf3 100644 --- a/src/templates/actor/sidemenu.hbs +++ b/src/templates/actor/sidemenu.hbs @@ -65,12 +65,12 @@
@@ -80,11 +80,11 @@