-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSONify weariness text widget #55081
Conversation
4acdeb2
to
1dc132d
Compare
e612837
to
847af9d
Compare
bea1fe2
to
9fc6937
Compare
I just noticed the recent commits trying to fix the clang-tidy error. I think the reason for the confusion is that diff --git a/tests/widget_test.cpp b/tests/widget_test.cpp
index 3e53ce5fc0..6e561e5231 100644
--- a/tests/widget_test.cpp
+++ b/tests/widget_test.cpp
@@ -34,8 +34,7 @@ namespace cata_curses_test
#include "cursesport.h"
#endif
-static const int move_25h = to_seconds<int>( 25_hours ) * 100;
-static const dig_activity_actor dig_actor( move_25h, tripoint_zero, "t_pit", tripoint_zero, 0, "" );
+// ------------- String IDs -------------
static const activity_id ACT_PLANT_SEED( "ACT_PLANT_SEED" );
@@ -54,9 +53,6 @@ static const efftype_id effect_hunger_starving( "hunger_starving" );
static const efftype_id effect_hunger_very_hungry( "hunger_very_hungry" );
static const efftype_id effect_infected( "infected" );
-static const activity_schedule task_dig( dig_actor, 5_minutes );
-static const activity_schedule task_plant( ACT_PLANT_SEED, 5_minutes );
-
static const flag_id json_flag_SPLINT( "SPLINT" );
static const itype_id itype_blindfold( "blindfold" );
@@ -138,6 +134,14 @@ static const widget_id widget_test_weather_text_height5( "test_weather_text_heig
static const widget_id widget_test_weight_clauses_fun( "test_weight_clauses_fun" );
static const widget_id widget_test_weight_clauses_normal( "test_weight_clauses_normal" );
+// ------------- Not string IDs -------------
+
+static const int move_25h = to_seconds<int>( 25_hours ) * 100;
+static const dig_activity_actor dig_actor( move_25h, tripoint_zero, "t_pit", tripoint_zero, 0, "" );
+
+static const activity_schedule task_dig( dig_actor, 5_minutes );
+static const activity_schedule task_plant( ACT_PLANT_SEED, 5_minutes );
+
// dseguin 2022 - Ugly hack to scrape content from the window object.
// Scrapes the window w at origin, reading the number of cols and rows.
static std::vector<std::string> scrape_win_at( Hopefully that fixes it :P |
9fc6937
to
4dfef82
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
4dfef82
to
9500d1b
Compare
I noticed all the tasks are listed complete but it's still in draft. Is that correct? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
Summary
Features "JSONify weariness text widget"
Purpose of change
Contribute to #55076
Describe the solution
get_weariness_level
wrapper to thetalker
andtalker_character
classes used by conditions, and au_val
forweariness_level
.weariness_text
widget variableDescribe alternatives you've considered
We'll want to remove the
display::weariness_text_color
functions after all the classic/legacy sidebars are replaced with widget versions in #54191 and its follow-ups, but I am leaving them in place for now.Testing
Get a shovel and dig some holes to get tired. See the widget change.
Additional context
Don't mind the misleading branch name in this PR; I started out thinking I would do weight first, but did weariness instead and forgot to rename it.