From 78bc5f92be45e6c2e591d3c008127849bfc95c54 Mon Sep 17 00:00:00 2001 From: the-Dissilent <63938653+the-Dissilent@users.noreply.github.com> Date: Mon, 22 Jun 2020 09:22:02 -0500 Subject: [PATCH] Sentinel Comics RPG (#6765) * update to version by theDissilent Expand the sheet to include full details from Character sheets and adds in Auxiliary sheets. Also incorporates CSS for ease of use. * Outdated I'm sure a new one will be added to represent the new version * Add Icons and Die images * remove outdated image Replacing with 3 pages * Add 3 Page "Bunker" Character Sheet * Reasy for pull * Add files via upload * sheet.json ready * Action Type Values * updates old version sheets * only 1 character sheet Pull request displayed error due to 2 sheets, so I'm reducing it * only 1 preview file listed in sheet.json * Update SCRPG-Sheet.html changed "currenthp" & "greenmax" to "health" & "health_max" to allow for healthbars on tokens. --- Sentinel Comics RPG/SCRPG-Sheet.html | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/Sentinel Comics RPG/SCRPG-Sheet.html b/Sentinel Comics RPG/SCRPG-Sheet.html index 6e61a5e0b4..70e79018e4 100644 --- a/Sentinel Comics RPG/SCRPG-Sheet.html +++ b/Sentinel Comics RPG/SCRPG-Sheet.html @@ -201,9 +201,9 @@

Current Health

-
+
-
+
@@ -300,7 +300,7 @@
-
+
@@ -346,7 +346,7 @@
Current -
+
@@ -1476,9 +1476,9 @@ }); // CODE FOR HEALTH RANGES from TOTAL HP - on('change:greenmax sheet:opened', function() { - getAttrs(['greenmax'], function(values) { - var indexg = parseInt(values.greenmax); + on('change:health_max sheet:opened', function() { + getAttrs(['health_max'], function(values) { + var indexg = parseInt(values.health_max); var indexy = Math.round((indexg+2)*0.7); var indexr = Math.round((indexg+2)/3); if (indexg === 37) { @@ -1675,6 +1675,9 @@ case version < 1: update_to_v1(); break; + case version < 1.1: + update_to_v1_1(); + break; case version < 2: // add another function here when you need it break; @@ -1752,4 +1755,16 @@ }); }); }; + + function update_to_v1_1() { + getAttrs(["version","greenmax","currenthp"], function(v) { + let output = {}; + output.version = 1.1; + output["health"] = currenthp; + output["health_max"] = greenmax; + setAttrs(output, + {silent: true}, + versionator(output.version)); + }); + };