From 63509e310e7a8919aedbfae8f2cf3b8d25dddf21 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sun, 27 Sep 2020 00:28:48 -1000 Subject: [PATCH] Initial Character Sheet changes for Morale and Loyalty fields. --- src/acks.css | 13 +++++++++++++ src/lang/en.json | 4 ++-- src/module/actor/character-sheet.js | 5 +++++ .../actors/partials/character-attributes-tab.html | 11 ----------- .../actors/partials/character-header.html | 15 +++++++++++++++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/acks.css b/src/acks.css index e8985d2..5f4ff6b 100644 --- a/src/acks.css +++ b/src/acks.css @@ -701,6 +701,19 @@ /* Item Controls */ /* ----------------------------------------- */ } +.acks.sheet.actor.character .sheet-header .header-details .summary .check-field:hover .check { + display: inline; +} +.acks.sheet.actor.character .sheet-header .header-details .summary .check-field .check { + display: none; + line-height: 35px; + flex: 0 0 20px; + position: absolute; + font-size: 12px; +} +.acks.sheet.actor.character .sheet-header .header-details .summary .check-field .check:hover { + color: rgba(0, 0, 0, 0.9); +} .acks.sheet.actor.character .sheet-header .xp-bonus { top: -15px; right: 3px; diff --git a/src/lang/en.json b/src/lang/en.json index ed62d2d..c4f4806 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -69,8 +69,8 @@ "ACKS.Retainer": "Retainer", "ACKS.RetainerWage": "Wage", "ACKS.RetainerUpkeep": "Upkeep", - "ACKS.Loyalty": "Henchmen Morale", - "ACKS.LoyaltyShort": "MOR", + "ACKS.Loyalty": "Loyalty", + "ACKS.LoyaltyShort": "LYL", "ACKS.scores.str.long": "Strength", "ACKS.scores.str.short": "STR", diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js index b81c6dd..38872ab 100644 --- a/src/module/actor/character-sheet.js +++ b/src/module/actor/character-sheet.js @@ -140,6 +140,11 @@ export class AcksActorSheetCharacter extends AcksActorSheet { activateListeners(html) { super.activateListeners(html); + html.find(".morale-check a").click((ev) => { + let actorObject = this.actor; + actorObject.rollMorale({ event: event }); + }); + html.find(".ability-score .attribute-name a").click((ev) => { let actorObject = this.actor; let element = event.currentTarget; diff --git a/src/templates/actors/partials/character-attributes-tab.html b/src/templates/actors/partials/character-attributes-tab.html index 3c74e9f..7a01a45 100644 --- a/src/templates/actors/partials/character-attributes-tab.html +++ b/src/templates/actors/partials/character-attributes-tab.html @@ -57,17 +57,6 @@ data-dtype="Number" /> - {{#if data.retainer.enabled}} -
  • -

    - {{ localize "ACKS.LoyaltyShort" }} -

    -
    - -
    -
  • - {{/if}} {{!-- Resource Tracking --}} diff --git a/src/templates/actors/partials/character-header.html b/src/templates/actors/partials/character-header.html index 49df8fa..b11169f 100644 --- a/src/templates/actors/partials/character-header.html +++ b/src/templates/actors/partials/character-header.html @@ -22,6 +22,21 @@ /> + {{#if data.retainer.enabled}} +
  • +
    +
    + + +
    +
  • +
  • +
    + + +
    +
  • + {{/if}}