Skip to content
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

Move string consts to single location #38115

Merged
merged 1 commit into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cata_string_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,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