From 5b8a15a4cfacadc32ae043ce3b081eb6e195fb77 Mon Sep 17 00:00:00 2001 From: Josh Forisha Date: Fri, 30 Aug 2024 10:31:42 -0600 Subject: [PATCH 1/3] Clean up dice display, add applied modifier number --- Roll for Shoes/sheet.html | 12 +++++++++--- Roll for Shoes/styles.css | 36 +++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/Roll for Shoes/sheet.html b/Roll for Shoes/sheet.html index 62d12e35bdc..4636fe7d3f8 100644 --- a/Roll for Shoes/sheet.html +++ b/Roll for Shoes/sheet.html @@ -38,6 +38,12 @@

Statuses

{{roll6}} {{roll7}} {{roll8}} + {{#rollLess() modifier 0}} + {{modifier}} + {{/rollLess() modifier 0}} + {{#rollGreater() modifier 0}} + {{modifier}} + {{/rollGreater() modifier 0}} {{computed::result}} @@ -62,7 +68,7 @@

Statuses

const rating = parseInt(ratingString) if (rating === 0) return - let rollQuery = `&{template:action} {{name=${skillName} ${rating}}} {{result=[[0+(?{Modifier|0})]]}}` + let rollQuery = `&{template:action} {{name=${skillName} ${rating}}} {{modifier=[[0+(?{Modifier|0})]]}} {{result=[[0]]}}` const numDice = Math.abs(rating) for (let i = 1; i <= numDice; i++) { rollQuery += ` {{roll${i}=[[1d6]]}}` @@ -74,8 +80,8 @@

Statuses

.map(([, { result }]) => result) const result = rating > 0 - ? rollResults.reduce((total, x) => total + x, 0) + results.result.result - : rollResults.reduce((low, x) => low === null || x < low ? x : low, null) + results.result.result + ? rollResults.reduce((total, x) => total + x, 0) + results.modifier.result + : rollResults.reduce((low, x) => low === null || x < low ? x : low, null) + results.modifier.result finishRoll(rollId, { result }) }) diff --git a/Roll for Shoes/styles.css b/Roll for Shoes/styles.css index 8b193dc3d63..3da206a49c9 100644 --- a/Roll for Shoes/styles.css +++ b/Roll for Shoes/styles.css @@ -69,26 +69,44 @@ } .sheet-rolltemplate-action .sheet-template-container .sheet-template-results { + align-items: center; display: flex; justify-content: space-between; padding: 15px 10px; } -.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls .inlinerollresult { - background-color: #cccced; - border-color: #cccced; +.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls { + background-color: #474787; border-radius: 2px; + column-gap: 3px; + display: flex; + padding: 3px; - &.fullcrit { - background-color: #99cbe0; - border-color: #99cbe0; - } - - &.fullfail { + .inlinerollresult { + align-items: center; + background-color: #cccced; border-color: #cccced; + border-radius: 2px; + display: flex; + justify-content: center; + min-width: 10px; + + &.fullcrit { + background-color: #99cbe0; + border-color: #99cbe0; + } + + &.fullfail { + border-color: #cccced; + } } } +.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls .sheet-template-action-modifier .inlinerollresult { + background-color: #ff8888; + border-color: #ff8888; +} + .sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-result { font-size: 1.5em; From 5ab5a5ed6d8775563a67c909303b0d339723b8ae Mon Sep 17 00:00:00 2001 From: Josh Forisha Date: Sun, 1 Sep 2024 16:20:33 -0600 Subject: [PATCH 2/3] Add darkmode sheet rules, size labels correctly --- Roll for Shoes/styles.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Roll for Shoes/styles.css b/Roll for Shoes/styles.css index 3da206a49c9..e50118fee97 100644 --- a/Roll for Shoes/styles.css +++ b/Roll for Shoes/styles.css @@ -40,7 +40,7 @@ gap: 5px; span { - flex-basis: 25%; + flex-basis: 5rem; } } @@ -118,3 +118,13 @@ padding-right: 8px; } } + +.sheet-darkmode { + h3 { + color: #cccccc; + } + + .sheetform { + background-color: transparent; + } +} From 7d37bd5963b090d55c644095ec65d42f7ef2b3ec Mon Sep 17 00:00:00 2001 From: Josh Forisha Date: Sun, 1 Sep 2024 16:30:35 -0600 Subject: [PATCH 3/3] Add good/bad modifier colors --- Roll for Shoes/sheet.html | 4 ++-- Roll for Shoes/styles.css | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Roll for Shoes/sheet.html b/Roll for Shoes/sheet.html index 4636fe7d3f8..2c1e2ec1267 100644 --- a/Roll for Shoes/sheet.html +++ b/Roll for Shoes/sheet.html @@ -39,10 +39,10 @@

Statuses

{{roll7}} {{roll8}} {{#rollLess() modifier 0}} - {{modifier}} + {{modifier}} {{/rollLess() modifier 0}} {{#rollGreater() modifier 0}} - {{modifier}} + {{modifier}} {{/rollGreater() modifier 0}} {{computed::result}} diff --git a/Roll for Shoes/styles.css b/Roll for Shoes/styles.css index e50118fee97..bca3eee512e 100644 --- a/Roll for Shoes/styles.css +++ b/Roll for Shoes/styles.css @@ -102,11 +102,16 @@ } } -.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls .sheet-template-action-modifier .inlinerollresult { +.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls .sheet-template-action-modifier-bad .inlinerollresult { background-color: #ff8888; border-color: #ff8888; } +.sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-rolls .sheet-template-action-modifier-good .inlinerollresult { + background-color: #aaddbb; + border-color: #aaddbb; +} + .sheet-rolltemplate-action .sheet-template-container .sheet-template-results .sheet-template-result { font-size: 1.5em;