Skip to content

Commit

Permalink
Merge pull request #38115 from Ramza13/string_consts_game
Browse files Browse the repository at this point in the history
Move string consts to single location
  • Loading branch information
ZhilkinSerg authored Feb 18, 2020
2 parents 036465f + 53b2253 commit 9807657
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 165 deletions.
1 change: 1 addition & 0 deletions src/cata_string_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ static const std::string flag_FLOTATION( "FLOTATION" );
static const std::string flag_FLOWER( "FLOWER" );
static const std::string flag_FORAGE_HALLU( "FORAGE_HALLU" );
static const std::string flag_FORAGE_POISON( "FORAGE_POISON" );
static const std::string flag_FRAGILE( "FRAGILE" );
static const std::string flag_FRAGILE_MELEE( "FRAGILE_MELEE" );
static const std::string flag_FREEZERBURN( "FREEZERBURN" );
static const std::string flag_FROZEN( "FROZEN" );
Expand Down
6 changes: 3 additions & 3 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ ret_val<bool> Character::can_wear( const item &it, bool with_equip_change ) cons

ret_val<bool> Character::can_unwield( const item &it ) const
{
if( it.has_flag( "NO_UNWIELD" ) ) {
if( it.has_flag( flag_NO_UNWIELD ) ) {
return ret_val<bool>::make_failure( _( "You cannot unwield your %s." ), it.tname() );
}

Expand Down Expand Up @@ -2847,7 +2847,7 @@ static void layer_item( std::array<encumbrance_data, num_bp> &vals,
* for the purposes of the layer penalty system. (normally an item has a minimum
* layering_encumbrance of 2 )
*/
if( it.has_flag( "SEMITANGIBLE" ) ) {
if( it.has_flag( flag_SEMITANGIBLE ) ) {
encumber_val = 0;
layering_encumbrance = 0;
}
Expand Down Expand Up @@ -7456,7 +7456,7 @@ bool Character::armor_absorb( damage_unit &du, item &armor )
m_info );
}

return armor.mod_damage( armor.has_flag( "FRAGILE" ) ?
return armor.mod_damage( armor.has_flag( flag_FRAGILE ) ?
rng( 2 * itype::damage_scale, 3 * itype::damage_scale ) : itype::damage_scale, du.type );
}

Expand Down
Loading

0 comments on commit 9807657

Please sign in to comment.