Skip to content

Commit

Permalink
Still working on brutal refactor...
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunomiac committed Feb 5, 2024
1 parent 0bfff8e commit 20c1086
Show file tree
Hide file tree
Showing 43 changed files with 2,391 additions and 2,027 deletions.
10 changes: 5 additions & 5 deletions css/style.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -18209,11 +18209,11 @@ template {
place-self: stretch flex-end;
z-index: 1;
}
:root body.vtt.game.system-eunos-blades #interface #chat .chat-message:not(.display-ok),
:root body.vtt.game.system-eunos-blades #controls #chat .chat-message:not(.display-ok),
:root body.vtt.game.system-eunos-blades #navigation #chat .chat-message:not(.display-ok),
:root body.vtt.game.system-eunos-blades #hotbar #chat .chat-message:not(.display-ok),
:root body.vtt.game.system-eunos-blades #players #chat .chat-message:not(.display-ok) {
:root body.vtt.game.system-eunos-blades #interface #chat .chat-message,
:root body.vtt.game.system-eunos-blades #controls #chat .chat-message,
:root body.vtt.game.system-eunos-blades #navigation #chat .chat-message,
:root body.vtt.game.system-eunos-blades #hotbar #chat .chat-message,
:root body.vtt.game.system-eunos-blades #players #chat .chat-message {
visibility: hidden;
}
:root body.vtt.game.system-eunos-blades #interface #chat .chat-message[class*=-roll],
Expand Down
1,364 changes: 739 additions & 625 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@tsconfig/node16": "^1.0.3",
"@types/jquery": "^3.5.27",
"@types/node": "^18.11.4",
"@types/prop-types": "^15.7.11",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@yaireo/tagify": "^4.17.8",
Expand Down Expand Up @@ -59,7 +60,7 @@
"stylelint-config-standard": "^29.0.0",
"stylelint-config-standard-scss": "^5.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
"typescript": "^5.3.3"
},
"dependencies": {
"@types/yaireo__tagify": "^4.17.0",
Expand Down
2 changes: 1 addition & 1 deletion scss/chat/_chat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
}

.chat-message:not(.display-ok) { visibility: hidden; }
.chat-message { visibility: hidden; }

.chat-message[class*="-roll"] {

Expand Down
6 changes: 3 additions & 3 deletions templates/chat/roll-result/action-acquireasset.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -40,7 +40,7 @@
<div class="dice-roll-strip">{{{dieValsHTML}}}</div>

{{!-- Result --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Background --}}
<div class="roll-state-background-container"></div>
Expand Down
18 changes: 9 additions & 9 deletions templates/chat/roll-result/action-clock-recover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@



<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} roll-result-{{rollResult}}"
<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} roll-result-{{rollResult}}"
data-chat-id="{{chatMsgID}}"
data-roll-id="{{id}}"
data-user-id="{{flagData.rollUserID}}"
data-primary-id="{{flagData.rollPrimaryData.rollPrimaryID}}"
data-primary-type="{{flagData.rollPrimaryData.rollPrimaryType}}"
data-position="{{finalPosition}}"
data-effect="{{finalEffect}}"
data-position="{{rollPositionFinal}}"
data-effect="{{rollEffectFinal}}"
data-result="{{rollResult}}"
data-roll-phase="{{flagData.rollPhase}}">

Expand All @@ -22,8 +22,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -43,7 +43,7 @@
<div class="dice-roll-strip">{{{dieValsHTML}}}</div>

{{!-- Position / Result / Effect --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Backgrounds --}}
<div class="roll-state-background-container">
Expand All @@ -55,7 +55,7 @@

{{!-- Position --}}
<div class="roll-state-container roll-state-container-left flex-vertical">
<h3 class="roll-state roll-state-position roll-state-position-{{finalPosition}}">{{case "title" finalPosition}}</h3>
<h3 class="roll-state roll-state-position roll-state-position-{{rollPositionFinal}}">{{case "title" rollPositionFinal}}</h3>
<h4 class="roll-state-label">Position</h4>
</div>

Expand All @@ -78,7 +78,7 @@
{{#unless (test rollResult "==" "fail")}}
<div class="roll-state-container roll-state-container-right flex-vertical">
<h4 class="roll-state-label">Effect<strong>:</strong></h4>
<h3 class="roll-state roll-state-effect roll-state-effect-{{finalEffect}}">{{case "title" finalEffect}}</h3>
<h3 class="roll-state roll-state-effect roll-state-effect-{{rollEffectFinal}}">{{case "title" rollEffectFinal}}</h3>
</div>
{{/unless}}

Expand All @@ -87,7 +87,7 @@
{{#if (test (test rollResult "==" "fail") "||" (test rollResult "==" "partial"))}}
{{!-- Consequences --}}
<div class="consequence-container flex-vertical full-width">
{{#with (lookup (lookup flagData.consequenceData finalPosition) rollResult) as |csqData|}}
{{#with (lookup (lookup flagData.consequenceData rollPositionFinal) rollResult) as |csqData|}}
{{#each csqData as |cData cIndex|}}
{{eLog "ConsequenceContainer" cIndex csqData cData}}
{{#if cData.resistTo}}
Expand Down
18 changes: 9 additions & 9 deletions templates/chat/roll-result/action-clock.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@



<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} roll-result-{{rollResult}}"
<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} roll-result-{{rollResult}}"
data-chat-id="{{chatMsgID}}"
data-roll-id="{{id}}"
data-user-id="{{flagData.rollUserID}}"
data-primary-id="{{flagData.rollPrimaryData.rollPrimaryID}}"
data-primary-type="{{flagData.rollPrimaryData.rollPrimaryType}}"
data-position="{{finalPosition}}"
data-effect="{{finalEffect}}"
data-position="{{rollPositionFinal}}"
data-effect="{{rollEffectFinal}}"
data-result="{{rollResult}}"
data-roll-phase="{{flagData.rollPhase}}">

Expand All @@ -22,8 +22,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -43,7 +43,7 @@
<div class="dice-roll-strip">{{{dieValsHTML}}}</div>

{{!-- Position / Result / Effect --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Backgrounds --}}
<div class="roll-state-background-container">
Expand All @@ -55,7 +55,7 @@

{{!-- Position --}}
<div class="roll-state-container roll-state-container-left flex-vertical">
<h3 class="roll-state roll-state-position roll-state-position-{{finalPosition}}">{{case "title" finalPosition}}</h3>
<h3 class="roll-state roll-state-position roll-state-position-{{rollPositionFinal}}">{{case "title" rollPositionFinal}}</h3>
<h4 class="roll-state-label">Position</h4>
</div>

Expand All @@ -78,7 +78,7 @@
{{#unless (test rollResult "==" "fail")}}
<div class="roll-state-container roll-state-container-right flex-vertical">
<h4 class="roll-state-label">Effect<strong>:</strong></h4>
<h3 class="roll-state roll-state-effect roll-state-effect-{{finalEffect}}">{{case "title" finalEffect}}</h3>
<h3 class="roll-state roll-state-effect roll-state-effect-{{rollEffectFinal}}">{{case "title" rollEffectFinal}}</h3>
</div>
{{/unless}}

Expand All @@ -87,7 +87,7 @@
{{#if (test (test rollResult "==" "fail") "||" (test rollResult "==" "partial"))}}
{{!-- Consequences --}}
<div class="consequence-container flex-vertical full-width">
{{#with (lookup (lookup flagData.consequenceData finalPosition) rollResult) as |csqData|}}
{{#with (lookup (lookup flagData.consequenceData rollPositionFinal) rollResult) as |csqData|}}
{{#each csqData as |cData cIndex|}}
{{eLog "ConsequenceContainer" cIndex csqData cData}}
{{#if cData.resistTo}}
Expand Down
18 changes: 9 additions & 9 deletions templates/chat/roll-result/action-gatherinfo.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@



<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} roll-result-{{rollResult}}"
<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} roll-result-{{rollResult}}"
data-chat-id="{{chatMsgID}}"
data-roll-id="{{id}}"
data-user-id="{{flagData.rollUserID}}"
data-primary-id="{{flagData.rollPrimaryData.rollPrimaryID}}"
data-primary-type="{{flagData.rollPrimaryData.rollPrimaryType}}"
data-position="{{finalPosition}}"
data-effect="{{finalEffect}}"
data-position="{{rollPositionFinal}}"
data-effect="{{rollEffectFinal}}"
data-result="{{rollResult}}"
data-roll-phase="{{flagData.rollPhase}}">

Expand All @@ -22,8 +22,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -43,7 +43,7 @@
<div class="dice-roll-strip">{{{dieValsHTML}}}</div>

{{!-- Position / Result / Effect --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Backgrounds --}}
<div class="roll-state-background-container">
Expand All @@ -55,7 +55,7 @@

{{!-- Position --}}
<div class="roll-state-container roll-state-container-left flex-vertical">
<h3 class="roll-state roll-state-position roll-state-position-{{finalPosition}}">{{case "title" finalPosition}}</h3>
<h3 class="roll-state roll-state-position roll-state-position-{{rollPositionFinal}}">{{case "title" rollPositionFinal}}</h3>
<h4 class="roll-state-label">Position</h4>
</div>

Expand All @@ -78,7 +78,7 @@
{{#unless (test rollResult "==" "fail")}}
<div class="roll-state-container roll-state-container-right flex-vertical">
<h4 class="roll-state-label">Effect<strong>:</strong></h4>
<h3 class="roll-state roll-state-effect roll-state-effect-{{finalEffect}}">{{case "title" finalEffect}}</h3>
<h3 class="roll-state roll-state-effect roll-state-effect-{{rollEffectFinal}}">{{case "title" rollEffectFinal}}</h3>
</div>
{{/unless}}

Expand All @@ -87,7 +87,7 @@
{{#if (test (test rollResult "==" "fail") "||" (test rollResult "==" "partial"))}}
{{!-- Consequences --}}
<div class="consequence-container flex-vertical full-width">
{{#with (lookup (lookup flagData.consequenceData finalPosition) rollResult) as |csqData|}}
{{#with (lookup (lookup flagData.consequenceData rollPositionFinal) rollResult) as |csqData|}}
{{#each csqData as |cData cIndex|}}
{{eLog "ConsequenceContainer" cIndex csqData cData}}
{{#if cData.resistTo}}
Expand Down
18 changes: 9 additions & 9 deletions templates/chat/roll-result/action-reduceheat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@



<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} roll-result-{{rollResult}}"
<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} roll-result-{{rollResult}}"
data-chat-id="{{chatMsgID}}"
data-roll-id="{{id}}"
data-user-id="{{flagData.rollUserID}}"
data-primary-id="{{flagData.rollPrimaryData.rollPrimaryID}}"
data-primary-type="{{flagData.rollPrimaryData.rollPrimaryType}}"
data-position="{{finalPosition}}"
data-effect="{{finalEffect}}"
data-position="{{rollPositionFinal}}"
data-effect="{{rollEffectFinal}}"
data-result="{{rollResult}}"
data-roll-phase="{{flagData.rollPhase}}">

Expand All @@ -22,8 +22,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -43,7 +43,7 @@
<div class="dice-roll-strip">{{{dieValsHTML}}}</div>

{{!-- Position / Result / Effect --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Backgrounds --}}
<div class="roll-state-background-container">
Expand All @@ -55,7 +55,7 @@

{{!-- Position --}}
<div class="roll-state-container roll-state-container-left flex-vertical">
<h3 class="roll-state roll-state-position roll-state-position-{{finalPosition}}">{{case "title" finalPosition}}</h3>
<h3 class="roll-state roll-state-position roll-state-position-{{rollPositionFinal}}">{{case "title" rollPositionFinal}}</h3>
<h4 class="roll-state-label">Position</h4>
</div>

Expand All @@ -78,7 +78,7 @@
{{#unless (test rollResult "==" "fail")}}
<div class="roll-state-container roll-state-container-right flex-vertical">
<h4 class="roll-state-label">Effect<strong>:</strong></h4>
<h3 class="roll-state roll-state-effect roll-state-effect-{{finalEffect}}">{{case "title" finalEffect}}</h3>
<h3 class="roll-state roll-state-effect roll-state-effect-{{rollEffectFinal}}">{{case "title" rollEffectFinal}}</h3>
</div>
{{/unless}}

Expand All @@ -87,7 +87,7 @@
{{#if (test (test rollResult "==" "fail") "||" (test rollResult "==" "partial"))}}
{{!-- Consequences --}}
<div class="consequence-container flex-vertical full-width">
{{#with (lookup (lookup flagData.consequenceData finalPosition) rollResult) as |csqData|}}
{{#with (lookup (lookup flagData.consequenceData rollPositionFinal) rollResult) as |csqData|}}
{{#each csqData as |cData cIndex|}}
{{eLog "ConsequenceContainer" cIndex csqData cData}}
{{#if cData.resistTo}}
Expand Down
22 changes: 7 additions & 15 deletions templates/chat/roll-result/action.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{{eLog "CHAT ACTION ROLL RESULT CONTEXT" this}}

<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} roll-result-{{rollResult}}"
data-roll-id="{{id}}"
data-user-id="{{rollUserID}}"
data-primary-id="{{rollPrimaryData.rollPrimaryID}}"
data-primary-type="{{rollPrimaryData.rollPrimaryType}}"
data-position="{{finalPosition}}"
data-effect="{{finalEffect}}"
data-result="{{rollResult}}"
data-roll-phase="{{rollPhase}}">
<div class="blades-roll roll-type-{{case "lower" rollType}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} roll-result-{{rollResult}}">

{{!-- Roll Primary Portrait --}}
<div class="chat-message-speaker-portrait-wrapper">
Expand All @@ -19,8 +11,8 @@
</div>

{{!-- Floating Backgrounds --}}
<div class="chat-message-bg roll-position-{{finalPosition}}"></div>
<div class="chat-result-bg roll-position-{{finalPosition}} roll-result-{{rollResult}}"></div>
<div class="chat-message-bg roll-position-{{rollPositionFinal}}"></div>
<div class="chat-result-bg roll-position-{{rollPositionFinal}} roll-result-{{rollResult}}"></div>

{{!-- Roll Trait --}}
<h1 class="chat-header roll-trait">
Expand All @@ -44,7 +36,7 @@
</div>

{{!-- Position / Result / Effect --}}
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{finalPosition}} roll-effect-{{finalEffect}} flex-horizontal full-width">
<div class="roll-outcome-container roll-result-{{rollResult}} roll-position-{{rollPositionFinal}} roll-effect-{{rollEffectFinal}} flex-horizontal full-width">

{{!-- Backgrounds --}}
<div class="roll-state-background-container">
Expand All @@ -56,7 +48,7 @@

{{!-- Position --}}
<div class="roll-state-container roll-state-container-left flex-vertical">
<h3 class="roll-state roll-state-position roll-state-position-{{finalPosition}}">{{case "title" finalPosition}}</h3>
<h3 class="roll-state roll-state-position roll-state-position-{{rollPositionFinal}}">{{case "title" rollPositionFinal}}</h3>
<h4 class="roll-state-label">Position</h4>
</div>

Expand All @@ -79,7 +71,7 @@
{{#unless (test rollResult "==" "fail")}}
<div class="roll-state-container roll-state-container-right flex-vertical">
<h4 class="roll-state-label">Effect<strong>:</strong></h4>
<h3 class="roll-state roll-state-effect roll-state-effect-{{finalEffect}}">{{case "title" finalEffect}}</h3>
<h3 class="roll-state roll-state-effect roll-state-effect-{{rollEffectFinal}}">{{case "title" rollEffectFinal}}</h3>
</div>
{{/unless}}

Expand All @@ -88,7 +80,7 @@
{{#if (test (test rollResult "==" "fail") "||" (test rollResult "==" "partial"))}}
{{!-- Consequences --}}
<div class="consequence-container flex-vertical full-width">
{{#with (lookup (lookup consequenceData finalPosition) rollResult) as |csqData|}}
{{#with (lookup (lookup consequenceData rollPositionFinal) rollResult) as |csqData|}}
{{#each csqData as |cData cIndex|}}
{{eLog "ConsequenceContainer" cIndex csqData cData}}
{{#if cData.resistTo}}
Expand Down
2 changes: 1 addition & 1 deletion templates/chat/roll-result/resistance.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{eLog "RESISTANCE ROLL CHAT CONTEXT" this}}

<div class="blades-roll roll-type-{{case "lower" rollType}}">
<div id="{{rollData.id}}" class="blades-roll inline-roll roll-type-{{case "lower" rollType}}">

<div class="chat-message-bg"></div>

Expand Down
Loading

0 comments on commit 20c1086

Please sign in to comment.