From e6fae564145cb213dca31585ab89d3659bdc5a37 Mon Sep 17 00:00:00 2001 From: "Daniel R. Collins (\"Delta\")" Date: Thu, 16 Feb 2023 16:33:34 -0500 Subject: [PATCH] Replace sheet:opened trigger with hidden input For the "top_level" attribute parsed out of class field. --- D&D_OED/DnD_OED.html | 11 ++++++----- D&D_OED/translation.json | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/D&D_OED/DnD_OED.html b/D&D_OED/DnD_OED.html index 0df6f5f8b8..605187532c 100644 --- a/D&D_OED/DnD_OED.html +++ b/D&D_OED/DnD_OED.html @@ -19,8 +19,9 @@ - + + @@ -80,7 +81,7 @@ - + @@ -465,8 +466,8 @@ }); }); - // Parse out max level from class field - on ("sheet:opened change:class", function() { + // Parse out top level from class field + on ("change:class", function() { getAttrs(["class"], function(val) { const str = val.class;     var num = 0, res = 0; @@ -482,7 +483,7 @@         }     } var finalVal = Math.max(res, num); - setAttrs({max_level: finalVal}); + setAttrs({top_level: finalVal}); }); }); \ No newline at end of file diff --git a/D&D_OED/translation.json b/D&D_OED/translation.json index 6d2b346a1b..e185d64c61 100644 --- a/D&D_OED/translation.json +++ b/D&D_OED/translation.json @@ -4,7 +4,7 @@ "spellbookButton-u":"Spellbook", "name-u":"Character:", "player-u":"Player:", - "raceClass-u":"Race/Class:", + "raceClass-u":"Class/Level:", "alignment-u":"Alignment:", "abilities-u":"ABILITIES", "str-u":"STRENGTH", @@ -21,6 +21,7 @@ "experience-u":"EXPERIENCE", "nextLevel-u": "Next Level:", "hpPerClass-u": "Max Hits:", + "saves-u": "SAVES", "attacks-u": "ATTACKS", "weapon-u": "Weapon", "attack-u": "Attack",