From e642d7058824625eebc67a4b627ffedf1315d569 Mon Sep 17 00:00:00 2001 From: Eunomiac Date: Fri, 1 Dec 2023 07:23:18 -0500 Subject: [PATCH] (amend) --- ts/BladesRoll.ts | 2 +- ts/blades.ts | 15 ++++++++++++++- ts/sheets/roll/BladesConsequence.ts | 6 +----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ts/BladesRoll.ts b/ts/BladesRoll.ts index 24c07058..5b12849d 100644 --- a/ts/BladesRoll.ts +++ b/ts/BladesRoll.ts @@ -3833,7 +3833,7 @@ class BladesRoll extends DocumentSheet { "-" ]; if (this.rollDowntimeAction) { - templateParts.push(U.lCase(this.rollDowntimeAction), "-") + templateParts.push(U.lCase(this.rollDowntimeAction), "-"); } templateParts.push("roll.hbs"); diff --git a/ts/blades.ts b/ts/blades.ts index 56a8d7bc..9e534c73 100644 --- a/ts/blades.ts +++ b/ts/blades.ts @@ -463,7 +463,20 @@ class GlobalGetter { } } } - }) as Partial>>>> + }) as Partial< + Record< + Position, + Partial< + Record< + RollResult.partial | RollResult.fail, + Record< + string, + BladesRoll.ConsequenceData + > + > + > + > + > }; BladesRoll.NewRoll(conf); } diff --git a/ts/sheets/roll/BladesConsequence.ts b/ts/sheets/roll/BladesConsequence.ts index 54a1fb6e..f555089c 100644 --- a/ts/sheets/roll/BladesConsequence.ts +++ b/ts/sheets/roll/BladesConsequence.ts @@ -391,10 +391,6 @@ class BladesConsequence { const transformRecord: Record = {}; - // Prepare template context for accepted (original) consequence. - const csqTemplateData: BladesConsequence & {blockClass?: string} = this; - csqTemplateData.blockClass = "consequence-resisted"; - // Create HTML for accepted version of this consequence let csqAcceptedHTML = await renderTemplate( "systems/eunos-blades/templates/components/consequence-accepted.hbs", @@ -422,7 +418,7 @@ class BladesConsequence { // Add a class, identifying this ".comp.comp-consequence-display-container" as a 'sub-consequence' that resulted from resisting a worse consequence csqResistedHTML = $(csqResistedHTML) .addClass("sub-consequence-resisted")[0].outerHTML; - transformRecord["2) csqResistedHTML"] = csqResistedHTML; + transformRecord["2) csqResistedHTML"] = csqResistedHTML; // If roll HTML provided, extract attribute, icon, dice roll strip and stress cost message, and prepend them to sub-consequence container