Skip to content

Commit

Permalink
Fix Tired status showing up with delay after fatigue penalties start (C…
Browse files Browse the repository at this point in the history
  • Loading branch information
actually-a-cat authored Jul 8, 2022
1 parent e4a81da commit 658bbe4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions data/json/ui/fatigue.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"color": "yellow",
"condition": {
"and": [
{ "compare_int": [ { "u_val": "fatigue" }, ">", { "const": 191 } ] },
{ "compare_int": [ { "u_val": "fatigue" }, "<=", { "const": 383 } ] }
{ "compare_int": [ { "u_val": "fatigue" }, ">=", { "const": 191 } ] },
{ "compare_int": [ { "u_val": "fatigue" }, "<", { "const": 383 } ] }
]
}
},
Expand All @@ -21,16 +21,16 @@
"color": "light_red",
"condition": {
"and": [
{ "compare_int": [ { "u_val": "fatigue" }, ">", { "const": 383 } ] },
{ "compare_int": [ { "u_val": "fatigue" }, "<=", { "const": 575 } ] }
{ "compare_int": [ { "u_val": "fatigue" }, ">=", { "const": 383 } ] },
{ "compare_int": [ { "u_val": "fatigue" }, "<", { "const": 575 } ] }
]
}
},
{
"id": "exhausted",
"text": "Exhausted",
"color": "red",
"condition": { "compare_int": [ { "u_val": "fatigue" }, ">", { "const": 575 } ] }
"condition": { "compare_int": [ { "u_val": "fatigue" }, ">=", { "const": 575 } ] }
}
]
},
Expand Down
6 changes: 3 additions & 3 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,13 +822,13 @@ std::pair<std::string, nc_color> display::fatigue_text_color( const Character &u
int fatigue = u.get_fatigue();
std::string fatigue_string;
nc_color fatigue_color = c_white;
if( fatigue > fatigue_levels::EXHAUSTED ) {
if( fatigue >= fatigue_levels::EXHAUSTED ) {
fatigue_color = c_red;
fatigue_string = translate_marker( "Exhausted" );
} else if( fatigue > fatigue_levels::DEAD_TIRED ) {
} else if( fatigue >= fatigue_levels::DEAD_TIRED ) {
fatigue_color = c_light_red;
fatigue_string = translate_marker( "Dead Tired" );
} else if( fatigue > fatigue_levels::TIRED ) {
} else if( fatigue >= fatigue_levels::TIRED ) {
fatigue_color = c_yellow;
fatigue_string = translate_marker( "Tired" );
}
Expand Down

0 comments on commit 658bbe4

Please sign in to comment.