@@ -2236,7 +2236,7 @@ bool Character::has_min_manipulators() const
2236
2236
bool Character::has_two_arms_lifting() const
2237
2237
{
2238
2238
// 0.5f is one "standard" arm, so if you have more than that you barely qualify.
2239
- return get_limb_score( limb_score_lift, body_part_type::type ::arm ) > 0.5f;
2239
+ return get_limb_score( limb_score_lift, bp_type ::arm ) > 0.5f;
2240
2240
}
2241
2241
2242
2242
std::set<matec_id> Character::get_limb_techs() const
@@ -2255,7 +2255,7 @@ std::set<matec_id> Character::get_limb_techs() const
2255
2255
int Character::get_working_arm_count() const
2256
2256
{
2257
2257
int limb_count = 0;
2258
- body_part_type::type arm_type = body_part_type::type ::arm;
2258
+ bp_type arm_type = bp_type ::arm;
2259
2259
for( const bodypart_id &part : get_all_body_parts_of_type( arm_type ) ) {
2260
2260
// Almost broken or overencumbered arms don't count
2261
2261
if( get_part( part )->get_limb_score( *this,
@@ -2273,7 +2273,7 @@ bool Character::enough_working_legs() const
2273
2273
int limb_count = 0;
2274
2274
int working_limb_count = 0;
2275
2275
for( const bodypart_id &part : get_all_body_parts() ) {
2276
- if( part->primary_limb_type() == body_part_type::type ::leg ) {
2276
+ if( part->primary_limb_type() == bp_type ::leg ) {
2277
2277
limb_count++;
2278
2278
if( !is_limb_broken( part ) ) {
2279
2279
working_limb_count++;
@@ -2289,7 +2289,7 @@ int Character::get_working_leg_count() const
2289
2289
{
2290
2290
int working_limb_count = 0;
2291
2291
for( const bodypart_id &part : get_all_body_parts() ) {
2292
- if( part->primary_limb_type() == body_part_type::type ::leg ) {
2292
+ if( part->primary_limb_type() == bp_type ::leg ) {
2293
2293
if( !is_limb_broken( part ) ) {
2294
2294
working_limb_count++;
2295
2295
}
@@ -4219,7 +4219,7 @@ int layer_details::layer( const int encumbrance, bool conflicts )
4219
4219
return total - current;
4220
4220
}
4221
4221
4222
- int Character::avg_encumb_of_limb_type( body_part_type::type part_type ) const
4222
+ int Character::avg_encumb_of_limb_type( bp_type part_type ) const
4223
4223
{
4224
4224
float limb_encumb = 0.0f;
4225
4225
int num_limbs = 0;
@@ -5801,7 +5801,7 @@ bool Character::check_immunity_data( const field_immunity_data &ft ) const
5801
5801
}
5802
5802
}
5803
5803
bool immune_by_body_part_resistance = !ft.immunity_data_body_part_env_resistance.empty();
5804
- for( const std::pair<body_part_type::type , int> &fide :
5804
+ for( const std::pair<bp_type , int> &fide :
5805
5805
ft.immunity_data_body_part_env_resistance ) {
5806
5806
for( const bodypart_id &bp : get_all_body_parts_of_type( fide.first ) ) {
5807
5807
if( get_env_resist( bp ) < fide.second ) {
@@ -5818,7 +5818,7 @@ bool Character::check_immunity_data( const field_immunity_data &ft ) const
5818
5818
5819
5819
bool immune_by_worn_flags = !ft.immunity_data_part_item_flags.empty();
5820
5820
// Check if all worn flags are fulfilled
5821
- for( const std::pair<body_part_type::type , flag_id> &fide :
5821
+ for( const std::pair<bp_type , flag_id> &fide :
5822
5822
ft.immunity_data_part_item_flags ) {
5823
5823
for( const bodypart_id &bp : get_all_body_parts_of_type( fide.first ) ) {
5824
5824
if( !worn_with_flag( fide.second, bp ) ) {
@@ -5835,7 +5835,7 @@ bool Character::check_immunity_data( const field_immunity_data &ft ) const
5835
5835
}
5836
5836
5837
5837
// Check if the optional worn flags are fulfilled
5838
- for( const std::pair<body_part_type::type , flag_id> &fide :
5838
+ for( const std::pair<bp_type , flag_id> &fide :
5839
5839
ft.immunity_data_part_item_flags_any ) {
5840
5840
for( const bodypart_id &bp : get_all_body_parts_of_type( fide.first ) ) {
5841
5841
if( worn_with_flag( fide.second, bp ) ) {
@@ -6894,7 +6894,7 @@ void Character::recalc_limb_energy_usage()
6894
6894
float total_limb_count = 0.0f;
6895
6895
float bionic_limb_count = 0.0f;
6896
6896
float bionic_powercost = 0;
6897
- body_part_type::type arm_type = body_part_type::type ::arm;
6897
+ bp_type arm_type = bp_type ::arm;
6898
6898
for( const bodypart_id &bp : get_all_body_parts_of_type( arm_type ) ) {
6899
6899
total_limb_count++;
6900
6900
if( bp->has_flag( json_flag_BIONIC_LIMB ) ) {
@@ -6919,7 +6919,7 @@ void Character::recalc_limb_energy_usage()
6919
6919
total_limb_count = 0.0f;
6920
6920
bionic_limb_count = 0.0f;
6921
6921
bionic_powercost = 0;
6922
- body_part_type::type leg_type = body_part_type::type ::leg;
6922
+ bp_type leg_type = bp_type ::leg;
6923
6923
for( const bodypart_id &bp : get_all_body_parts_of_type( leg_type ) ) {
6924
6924
total_limb_count++;
6925
6925
if( bp->has_flag( json_flag_BIONIC_LIMB ) ) {
@@ -7324,8 +7324,8 @@ int Character::item_handling_cost( const item &it, bool penalties, int base_cost
7324
7324
// Grabbed penalty scales for grabbed arms/hands
7325
7325
int pen = 2;
7326
7326
for( const effect &eff : get_effects_with_flag( json_flag_GRAB ) ) {
7327
- if( eff.get_bp()->primary_limb_type() == body_part_type::type ::arm ||
7328
- eff.get_bp()->primary_limb_type() == body_part_type::type ::hand ) {
7327
+ if( eff.get_bp()->primary_limb_type() == bp_type ::arm ||
7328
+ eff.get_bp()->primary_limb_type() == bp_type ::hand ) {
7329
7329
pen++;
7330
7330
}
7331
7331
}
@@ -7336,12 +7336,12 @@ int Character::item_handling_cost( const item &it, bool penalties, int base_cost
7336
7336
if( !bulk_cost ) {
7337
7337
// For single handed items use the least encumbered hand
7338
7338
if( it.is_two_handed( *this ) ) {
7339
- for( const bodypart_id &part : get_all_body_parts_of_type( body_part_type::type ::hand ) ) {
7339
+ for( const bodypart_id &part : get_all_body_parts_of_type( bp_type ::hand ) ) {
7340
7340
mv += encumb( part );
7341
7341
}
7342
7342
} else {
7343
7343
int min_encumb = INT_MAX;
7344
- for( const bodypart_id &part : get_all_body_parts_of_type( body_part_type::type ::hand ) ) {
7344
+ for( const bodypart_id &part : get_all_body_parts_of_type( bp_type ::hand ) ) {
7345
7345
min_encumb = std::min( min_encumb, encumb( part ) );
7346
7346
}
7347
7347
mv += min_encumb;
@@ -13696,8 +13696,8 @@ bodypart_id Character::most_staunchable_bp( int &max_staunch )
13696
13696
add_msg_debug( debugmode::DF_CHARACTER, "Wound care proficiency found, new limit %d", max_staunch );
13697
13697
}
13698
13698
13699
- int num_broken_arms = get_num_broken_body_parts_of_type( body_part_type::type ::arm );
13700
- int num_arms = get_num_body_parts_of_type( body_part_type::type ::arm );
13699
+ int num_broken_arms = get_num_broken_body_parts_of_type( bp_type ::arm );
13700
+ int num_arms = get_num_body_parts_of_type( bp_type ::arm );
13701
13701
13702
13702
// Don't warn about encumbrance if your arms are broken
13703
13703
if( num_broken_arms ) {
@@ -13713,7 +13713,7 @@ bodypart_id Character::most_staunchable_bp( int &max_staunch )
13713
13713
for( const bodypart_id &bp : get_all_body_parts() ) {
13714
13714
intensity = get_effect_int( effect_bleed, bp );
13715
13715
// Staunching a bleeding on one of your arms is hard (handle multiple arms)
13716
- if( bp->has_type( body_part_type::type ::arm ) ) {
13716
+ if( bp->has_type( bp_type ::arm ) ) {
13717
13717
intensity /= ( 1.0f - 1.0f / num_arms );
13718
13718
}
13719
13719
// Tourniquets make staunching easier, letting you treat arterial bleeds on your legs
@@ -13791,7 +13791,7 @@ void Character::pause()
13791
13791
bodypart_id bp_id = most_staunchable_bp( max );
13792
13792
13793
13793
// Don't warn about encumbrance if your arms are broken
13794
- int num_broken_arms = get_num_broken_body_parts_of_type( body_part_type::type ::arm );
13794
+ int num_broken_arms = get_num_broken_body_parts_of_type( bp_type ::arm );
13795
13795
if( num_broken_arms ) {
13796
13796
add_msg_player_or_npc( m_warning,
13797
13797
_( "Your broken limb significantly hampers your efforts to put pressure on a bleeding wound!" ),
0 commit comments