Skip to content

Commit

Permalink
Merge pull request #75271 from ehughsbaird/appease-clang
Browse files Browse the repository at this point in the history
Appease clang
  • Loading branch information
dseguin authored Jul 29, 2024
2 parents 4d209f1 + 4eef801 commit b6c708d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
2 changes: 2 additions & 0 deletions src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ void uistatedata::serialize( JsonOut &json ) const
json.member( "distraction_temperature", distraction_temperature );
json.member( "distraction_mutation", distraction_mutation );
json.member( "distraction_oxygen", distraction_oxygen );
json.member( "distraction_withdrawal", distraction_withdrawal );
json.member( "numpad_navigation", numpad_navigation );

json.member( "input_history" );
Expand Down Expand Up @@ -468,6 +469,7 @@ void uistatedata::deserialize( const JsonObject &jo )
jo.read( "distraction_temperature", distraction_temperature );
jo.read( "distraction_mutation", distraction_mutation );
jo.read( "distraction_oxygen", distraction_oxygen );
jo.read( "distraction_withdrawal", distraction_withdrawal );
jo.read( "numpad_navigation", numpad_navigation );

if( !jo.read( "vmenu_show_items", vmenu_show_items ) ) {
Expand Down
57 changes: 27 additions & 30 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5873,37 +5873,33 @@ static std::string effects_description_for_creature( Creature *const creature, s
status( status ), intensity_lower_limit( 0 ) {}
};
static const std::unordered_map<efftype_id, ef_con> vec_effect_status = {
{ effect_onfire, ef_con( to_translation( " is on <color_red>fire</color>. " ) ) },
{ effect_bleed, ef_con( to_translation( " is <color_red>bleeding</color>. " ), 1 ) },
{ effect_happy, ef_con( to_translation( " looks <color_green>happy</color>. " ), 13 ) },
{ effect_onfire, ef_con( to_translation( " is on <color_red>fire</color>." ) ) },
{ effect_bleed, ef_con( to_translation( " is <color_red>bleeding</color>." ), 1 ) },
{ effect_happy, ef_con( to_translation( " looks <color_green>happy</color>." ), 13 ) },
{ effect_downed, ef_con( translation(), to_translation( "downed" ) ) },
{ effect_in_pit, ef_con( translation(), to_translation( "stuck" ) ) },
{ effect_stunned, ef_con( to_translation( " is <color_blue>stunned</color>. " ) ) },
{ effect_dazed, ef_con( to_translation( " is <color_blue>dazed</color>. " ) ) },
// NOLINTNEXTLINE(cata-text-style): spaces required for concatenation
{ effect_beartrap, ef_con( to_translation( " is stuck in beartrap. " ) ) },
// NOLINTNEXTLINE(cata-text-style): spaces required for concatenation
{ effect_laserlocked, ef_con( to_translation( " have tiny <color_red>red dot</color> on body. " ) ) },
{ effect_boomered, ef_con( to_translation( " has <color_magenta>bile</color> covering their eyes. " ) ) },
{ effect_glowing, ef_con( to_translation( " is covered in <color_yellow>glowing goo</color>. " ) ) },
{ effect_slimed, ef_con( to_translation( " is covered in <color_green>thick goo</color>. " ) ) },
{ effect_bile_irritant, ef_con( to_translation( " is covered in <color_magenta>bile</color>. " ) ) },
{ effect_corroding, ef_con( to_translation( " is covered in <color_light_green>acid</color>. " ) ) },
{ effect_sap, ef_con( to_translation( " is coated in <color_brown>sap</color>. " ) ) },
{ effect_webbed, ef_con( to_translation( " is covered in <color_dark_gray>webs</color>. " ) ) },
{ effect_spores, ef_con( to_translation( " is covered in <color_green>spores</color>. " ), 1 ) },
{ effect_crushed, ef_con( to_translation( " lies under <color_dark_gray>collapsed debris</color>. " ), to_translation( "lies" ) ) },
{ effect_lack_sleep, ef_con( to_translation( " looks <color_dark_gray>very tired</color>. " ) ) },
{ effect_lying_down, ef_con( to_translation( " is <color_dark_blue>sleeping</color>. " ), to_translation( "lies" ) ) },
{ effect_sleep, ef_con( to_translation( " is <color_dark_blue>sleeping</color>. " ), to_translation( "lies" ) ) },
{ effect_haslight, ef_con( to_translation( " is <color_yellow>lit</color>. " ) ) },
{ effect_monster_saddled, ef_con( to_translation( " is <color_dark_gray>saddled</color>. " ) ) },
// NOLINTNEXTLINE(cata-text-style): spaces required for concatenation
{ effect_harnessed, ef_con( to_translation( " is being <color_dark_gray>harnessed</color> by a vehicle. " ) ) },
{ effect_monster_armor, ef_con( to_translation( " is <color_dark_gray>wearing armor</color>. " ) ) },
// NOLINTNEXTLINE(cata-text-style): spaces required for concatenation
{ effect_has_bag, ef_con( to_translation( " have <color_dark_gray>bag</color> attached. " ) ) },
{ effect_tied, ef_con( to_translation( " is <color_dark_gray>tied</color>. " ) ) },
{ effect_stunned, ef_con( to_translation( " is <color_blue>stunned</color>." ) ) },
{ effect_dazed, ef_con( to_translation( " is <color_blue>dazed</color>." ) ) },
{ effect_beartrap, ef_con( to_translation( " is stuck in beartrap." ) ) },
{ effect_laserlocked, ef_con( to_translation( " have tiny <color_red>red dot</color> on body." ) ) },
{ effect_boomered, ef_con( to_translation( " has <color_magenta>bile</color> covering their eyes." ) ) },
{ effect_glowing, ef_con( to_translation( " is covered in <color_yellow>glowing goo</color>." ) ) },
{ effect_slimed, ef_con( to_translation( " is covered in <color_green>thick goo</color>." ) ) },
{ effect_bile_irritant, ef_con( to_translation( " is covered in <color_magenta>bile</color>." ) ) },
{ effect_corroding, ef_con( to_translation( " is covered in <color_light_green>acid</color>." ) ) },
{ effect_sap, ef_con( to_translation( " is coated in <color_brown>sap</color>." ) ) },
{ effect_webbed, ef_con( to_translation( " is covered in <color_dark_gray>webs</color>." ) ) },
{ effect_spores, ef_con( to_translation( " is covered in <color_green>spores</color>." ), 1 ) },
{ effect_crushed, ef_con( to_translation( " lies under <color_dark_gray>collapsed debris</color>." ), to_translation( "lies" ) ) },
{ effect_lack_sleep, ef_con( to_translation( " looks <color_dark_gray>very tired</color>." ) ) },
{ effect_lying_down, ef_con( to_translation( " is <color_dark_blue>sleeping</color>." ), to_translation( "lies" ) ) },
{ effect_sleep, ef_con( to_translation( " is <color_dark_blue>sleeping</color>." ), to_translation( "lies" ) ) },
{ effect_haslight, ef_con( to_translation( " is <color_yellow>lit</color>." ) ) },
{ effect_monster_saddled, ef_con( to_translation( " is <color_dark_gray>saddled</color>." ) ) },
{ effect_harnessed, ef_con( to_translation( " is being <color_dark_gray>harnessed</color> by a vehicle." ) ) },
{ effect_monster_armor, ef_con( to_translation( " is <color_dark_gray>wearing armor</color>." ) ) },
{ effect_has_bag, ef_con( to_translation( " have <color_dark_gray>bag</color> attached." ) ) },
{ effect_tied, ef_con( to_translation( " is <color_dark_gray>tied</color>." ) ) },
{ effect_bouldering, ef_con( translation(), to_translation( "balancing" ) ) }
};

Expand All @@ -5912,7 +5908,8 @@ static std::string effects_description_for_creature( Creature *const creature, s
for( const auto &pair : vec_effect_status ) {
if( creature->get_effect_int( pair.first ) > pair.second.intensity_lower_limit ) {
if( !pair.second.status.empty() ) {
figure_effects += pronoun_gender + pair.second.status;
figure_effects += string_format( pgettext( "effects_description_for_creature", "%s%s " ),
pronoun_gender, pair.second.status );
}
if( !pair.second.pose.empty() ) {
pose = pair.second.pose.translated();
Expand Down

0 comments on commit b6c708d

Please sign in to comment.