Skip to content

Commit

Permalink
Prettify strain sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Apr 8, 2024
1 parent 993313f commit f286873
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 83 deletions.
2 changes: 1 addition & 1 deletion data/json/ui/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"style": "layout",
"label": "Stamina/Weariness",
"arrange": "rows",
"widgets": [ "stamina_graph", "strain_graph", "activity_desc", "weariness_desc", "weary_malus_desc" ]
"widgets": [ "stamina_graph", "strain_and_burn_fake_graph", "activity_desc", "weariness_desc", "weary_malus_desc" ]
},
{
"id": "mood_focus_layout",
Expand Down
166 changes: 84 additions & 82 deletions data/json/ui/strain.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[
{
"id": "strain_and_burn",
{
"id": "strain_and_burn_fake_graph",
"type": "widget",
"style": "symbol",
"label": "Strain",
"label_align": "left",
"width": 10,
"clauses": [
{
Expand All @@ -12,235 +14,235 @@
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 - 1" ] },
"id": "strain_1",
"color": "yellow",
"sym": "A"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 2 - 1" ] },
"id": "strain_2",
"color": "yellow",
"sym": "B"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 3 - 1" ] },
"id": "strain_3",
"color": "yellow",
"sym": "C"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 4 - 1" ] },
"id": "strain_4",
"color": "yellow",
"sym": "D"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 5 - 1" ] },
"id": "strain_5",
"color": "yellow",
"sym": "E"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 6 - 1" ] },
"id": "strain_6",
"color": "yellow",
"sym": "F"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 7 - 1" ] },
"id": "strain_7",
"color": "yellow",
"sym": "G"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 8 - 1" ] },
"id": "strain_8",
"color": "yellow",
"sym": "H"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 9 - 1" ] },
"id": "strain_9",
"color": "yellow",
"sym": "I"
"sym": "="
},
{
"condition": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') - 1" ] },
"id": "strain_10",
"color": "yellow",
"sym": "J",
"sym": "=",
"//0": "/* ----- END: STRAIN LISTING ----- */"
},
{
"//0": "/* ----- BEGIN: SEPERATOR LISTING ----- */",
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 - 1" ] } }
]
},
"id": "seperator_1",
"color": "white",
"sym": "A"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 2 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 2 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 2 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 2 - 1" ] } }
]
},
"id": "seperator_2",
"color": "white",
"sym": "B"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 3- 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 3 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 3- 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 3 - 1" ] } }
]
},
"id": "seperator_3",
"color": "white",
"sym": "C"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 4 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 5 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 4 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 5 - 1" ] } }
]
},
"id": "seperator_4",
"color": "white",
"sym": "D"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 5 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 5 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 5 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 5 - 1" ] } }
]
},
"id": "seperator_5",
"color": "white",
"sym": "E"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 6 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 6 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 6 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 6 - 1" ] } }
]
},
"id": "seperator_6",
"color": "white",
"sym": "F"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 7 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 7 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 7 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 7 - 1" ] } }
]
},
"id": "seperator_7",
"color": "white",
"sym": "G"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 8 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 8 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 8 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 8 - 1" ] } }
]
},
"id": "seperator_8",
"color": "white",
"sym": "H"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 9 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 9 - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') / 10 * 9 - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 9 - 1" ] } }
]
},
"id": "seperator_9",
"color": "white",
"sym": "I"
"sym": "-"
},
{
"condition": {
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') - 1" ] } }
]
},
"and": [
{ "not": { "math": [ "u_val('strain') + u_val('strain_burn')", "<=", "u_val('strain_max') - 1" ] } },
{ "not": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') - 1" ] } }
]
},
"id": "seperator_10",
"color": "white",
"sym": "J",
"sym": "-",
"//0": "/* ----- END: SEPARATOR LISTING ----- */"
},
{
"//0": "/* ----- BEGIN: BURN LISTING ----- */",
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 - 1" ] },
"id": "strain_1",
"color": "red",
"sym": "A"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 2 - 1" ] },
"id": "strain_2",
"color": "red",
"sym": "B"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 3 - 1" ] },
"id": "strain_3",
"color": "red",
"sym": "C"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 4 - 1" ] },
"id": "strain_4",
"color": "red",
"sym": "D"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 5 - 1" ] },
"id": "strain_5",
"color": "red",
"sym": "E"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 6 - 1" ] },
"id": "strain_6",
"color": "red",
"sym": "F"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 7 - 1" ] },
"id": "strain_7",
"color": "red",
"sym": "G"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 8 - 1" ] },
"id": "strain_8",
"color": "red",
"sym": "H"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') / 10 * 9 - 1" ] },
"id": "strain_9",
"color": "red",
"sym": "I"
"sym": "#"
},
{
"condition": { "math": [ "u_val('strain_burn')", ">=", "u_val('strain_max') - 1" ] },
"id": "strain_10",
"color": "red",
"sym": "J",
"sym": "#",
"//0": "/* ----- END: BURN LISTING ----- */"
}
],
Expand Down

0 comments on commit f286873

Please sign in to comment.