diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h index 1fb7906d9bea7..68c30765ae4f5 100644 --- a/src/cata_string_consts.h +++ b/src/cata_string_consts.h @@ -925,8 +925,6 @@ static const std::string flag_ACID( "ACID" ); static const std::string flag_ACT_IN_FIRE( "ACT_IN_FIRE" ); static const std::string flag_ACT_ON_RANGED_HIT( "ACT_ON_RANGED_HIT" ); static const std::string flag_ACTIVE_CLOAKING( "ACTIVE_CLOAKING" ); -static const std::string flag_AISLE( "AISLE" ); -static const std::string flag_ALARMCLOCK( "ALARMCLOCK" ); static const std::string flag_ALARMED( "ALARMED" ); static const std::string flag_ALLERGEN_EGG( "ALLERGEN_EGG" ); static const std::string flag_ALLERGEN_FRUIT( "ALLERGEN_FRUIT" ); @@ -941,23 +939,17 @@ static const std::string flag_ALLOWS_NATURAL_ATTACKS( "ALLOWS_NATURAL_ATTACKS" ) static const std::string flag_ALLOWS_REMOTE_USE( "ALLOWS_REMOTE_USE" ); static const std::string flag_ALWAYS_TWOHAND( "ALWAYS_TWOHAND" ); static const std::string flag_ANESTHESIA( "ANESTHESIA" ); -static const std::string flag_ANIMAL_CTRL( "ANIMAL_CTRL" ); static const std::string flag_AURA( "AURA" ); static const std::string flag_AUT_START( "AUT_START" ); static const std::string flag_auto_wield( "auto_wield" ); static const std::string flag_AUTODOC( "AUTODOC" ); static const std::string flag_AUTODOC_COUCH( "AUTODOC_COUCH" ); -static const std::string flag_AUTOPILOT( "AUTOPILOT" ); static const std::string flag_BAD_DAY( "BAD_DAY" ); static const std::string flag_BAROMETER( "BAROMETER" ); static const std::string flag_BARRICADABLE_DOOR( "BARRICADABLE_DOOR" ); static const std::string flag_BARRICADABLE_DOOR_DAMAGED( "BARRICADABLE_DOOR_DAMAGED" ); static const std::string flag_BARRICADABLE_DOOR_REINFORCED( "BARRICADABLE_DOOR_REINFORCED" ); static const std::string flag_BARRICADABLE_WINDOW_CURTAINS( "BARRICADABLE_WINDOW_CURTAINS" ); -static const std::string flag_BATTERY_MOUNT( "BATTERY_MOUNT" ); -static const std::string flag_BED( "BED" ); -static const std::string flag_BEEPER( "BEEPER" ); -static const std::string flag_BELTABLE( "BELTABLE" ); static const std::string flag_BELTED( "BELTED" ); static const std::string flag_BIPOD( "BIPOD" ); static const std::string flag_BIRD( "BIRD" ); @@ -965,9 +957,7 @@ static const std::string flag_BLIND( "BLIND" ); static const std::string flag_BLIND_EASY( "BLIND_EASY" ); static const std::string flag_BLIND_HARD( "BLIND_HARD" ); static const std::string flag_BLOCK_WHILE_WORN( "BLOCK_WHILE_WORN" ); -static const std::string flag_BLOCK_WIND( "BLOCK_WIND" ); static const std::string flag_BLOCKSDOOR( "BLOCKSDOOR" ); -static const std::string flag_BOARDABLE( "BOARDABLE" ); static const std::string flag_BOARDED( "BOARDED" ); static const std::string flag_BOMB( "BOMB" ); static const std::string flag_BURROWABLE( "BURROWABLE" ); @@ -981,15 +971,11 @@ static const std::string flag_CAN_SIT( "CAN_SIT" ); static const std::string flag_CANNIBAL( "CANNIBAL" ); static const std::string flag_CANNIBALISM( "CANNIBALISM" ); static const std::string flag_CANT_HEAL_EVERYONE( "CANT_HEAL_EVERYONE" ); -static const std::string flag_CARGO( "CARGO" ); -static const std::string flag_CARGO_LOCKING( "CARGO_LOCKING" ); static const std::string flag_CARNIVORE_OK( "CARNIVORE_OK" ); static const std::string flag_CASING( "CASING" ); static const std::string flag_CATTLE( "CATTLE" ); static const std::string flag_CHALLENGE( "CHALLENGE" ); static const std::string flag_CHARGEDIM( "CHARGEDIM" ); -static const std::string flag_CHEMLAB( "CHEMLAB" ); -static const std::string flag_CHIMES( "CHIMES" ); static const std::string flag_CITY_START( "CITY_START" ); static const std::string flag_CLIMB_SIMPLE( "CLIMB_SIMPLE" ); static const std::string flag_CLIMBABLE( "CLIMBABLE" ); @@ -1000,13 +986,9 @@ static const std::string flag_CONDUCTIVE( "CONDUCTIVE" ); static const std::string flag_CONSOLE( "CONSOLE" ); static const std::string flag_CONSUMABLE( "CONSUMABLE" ); static const std::string flag_CONTAINER( "CONTAINER" ); -static const std::string flag_CONTROLS( "CONTROLS" ); static const std::string flag_COOKED( "COOKED" ); -static const std::string flag_COOLER( "COOLER" ); static const std::string flag_CORPSE( "CORPSE" ); -static const std::string flag_CRAFTRIG( "CRAFTRIG" ); static const std::string flag_CURRENT( "CURRENT" ); -static const std::string flag_CURTAIN( "CURTAIN" ); static const std::string flag_DANGEROUS( "DANGEROUS" ); static const std::string flag_DEAF( "DEAF" ); static const std::string flag_DEEP_WATER( "DEEP_WATER" ); @@ -1021,13 +1003,9 @@ static const std::string flag_DIMENSIONAL_ANCHOR( "DIMENSIONAL_ANCHOR" ); static const std::string flag_DISABLE_SIGHTS( "DISABLE_SIGHTS" ); static const std::string flag_DONT_REMOVE_ROTTEN( "DONT_REMOVE_ROTTEN" ); static const std::string flag_DOOR( "DOOR" ); -static const std::string flag_DOOR_MOTOR( "DOOR_MOTOR" ); static const std::string flag_DROP_ACTION_ONLY_IF_LIQUID( "DROP_ACTION_ONLY_IF_LIQUID" ); static const std::string flag_DURABLE_MELEE( "DURABLE_MELEE" ); -static const std::string flag_E_ALTERNATOR( "E_ALTERNATOR" ); static const std::string flag_E_COLD_START( "E_COLD_START" ); -static const std::string flag_E_COMBUSTION( "E_COMBUSTION" ); -static const std::string flag_E_HIGHER_SKILL( "E_HIGHER_SKILL" ); static const std::string flag_E_STARTS_INSTANTLY( "E_STARTS_INSTANTLY" ); static const std::string flag_EASY_DECONSTRUCT( "EASY_DECONSTRUCT" ); static const std::string flag_EATEN_COLD( "EATEN_COLD" ); @@ -1036,13 +1014,10 @@ static const std::string flag_EDIBLE_FROZEN( "EDIBLE_FROZEN" ); static const std::string flag_EFFECT_INVISIBLE( "EFFECT_INVISIBLE" ); static const std::string flag_EFFECT_NIGHT_VISION( "EFFECT_NIGHT_VISION" ); static const std::string flag_EMITTER( "EMITTER" ); -static const std::string flag_ENGINE( "ENGINE" ); static const std::string flag_ETHEREAL_ITEM( "ETHEREAL_ITEM" ); -static const std::string flag_EXTRA_DRAG( "EXTRA_DRAG" ); static const std::string flag_FAKE_MILL( "FAKE_MILL" ); static const std::string flag_FAKE_SMOKE( "FAKE_SMOKE" ); static const std::string flag_FANCY( "FANCY" ); -static const std::string flag_FAUCET( "FAUCET" ); static const std::string flag_FELINE( "FELINE" ); static const std::string flag_FERTILIZER( "FERTILIZER" ); static const std::string flag_FIELD_DRESS( "FIELD_DRESS" ); @@ -1071,20 +1046,15 @@ static const std::string flag_FLAT( "FLAT" ); static const std::string flag_FLAT_SURF( "FLAT_SURF" ); static const std::string flag_FLOTATION( "FLOTATION" ); static const std::string flag_FLOWER( "FLOWER" ); -static const std::string flag_FOLDABLE( "FOLDABLE" ); static const std::string flag_FORAGE_HALLU( "FORAGE_HALLU" ); static const std::string flag_FORAGE_POISON( "FORAGE_POISON" ); -static const std::string flag_FORGE( "FORGE" ); 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" ); -static const std::string flag_FUEL_TANK( "FUEL_TANK" ); -static const std::string flag_FULL_BOARD( "FULL_BOARD" ); static const std::string flag_FULL_MAGAZINE( "FULL_MAGAZINE" ); static const std::string flag_FUNGAL_VECTOR( "FUNGAL_VECTOR" ); static const std::string flag_FUNGUS( "FUNGUS" ); -static const std::string flag_FUNNEL( "FUNNEL" ); static const std::string flag_GAS_DISCOUNT( "GAS_DISCOUNT" ); static const std::string flag_GAS_PROOF( "GAS_PROOF" ); static const std::string flag_GIBBED( "GIBBED" ); @@ -1094,7 +1064,6 @@ static const std::string flag_GOES_UP( "GOES_UP" ); static const std::string flag_GROWTH_HARVEST( "GROWTH_HARVEST" ); static const std::string flag_GROWTH_MATURE( "GROWTH_MATURE" ); static const std::string flag_GROWTH_SEEDLING( "GROWTH_SEEDLING" ); -static const std::string flag_HALF_BOARD( "HALF_BOARD" ); static const std::string flag_HELI_CRASH( "HELI_CRASH" ); static const std::string flag_HELMET_COMPAT( "HELMET_COMPAT" ); static const std::string flag_HIDDEN_HALLU( "HIDDEN_HALLU" ); @@ -1102,7 +1071,6 @@ static const std::string flag_HIDDEN_ITEM( "HIDDEN_ITEM" ); static const std::string flag_HIDDEN_POISON( "HIDDEN_POISON" ); static const std::string flag_HIDE_PLACE( "HIDE_PLACE" ); static const std::string flag_HOOD( "HOOD" ); -static const std::string flag_HORN( "HORN" ); static const std::string flag_HOT( "HOT" ); static const std::string flag_HURT_WHEN_WIELDED( "HURT_WHEN_WIELDED" ); static const std::string flag_HYGROMETER( "HYGROMETER" ); @@ -1113,7 +1081,6 @@ static const std::string flag_INFECTED( "INFECTED" ); static const std::string flag_INITIAL_PART( "INITIAL_PART" ); static const std::string flag_INSPIRATIONAL( "INSPIRATIONAL" ); static const std::string flag_INSTALL_DIFFICULT( "INSTALL_DIFFICULT" ); -static const std::string flag_INTERNAL( "INTERNAL" ); static const std::string flag_IR_EFFECT( "IR_EFFECT" ); static const std::string flag_IRREMOVABLE( "IRREMOVABLE" ); static const std::string flag_IS_ARMOR( "IS_ARMOR" ); @@ -1126,10 +1093,8 @@ static const std::string flag_LEAK_DAM( "LEAK_DAM" ); static const std::string flag_LIQUID( "LIQUID" ); static const std::string flag_LIQUIDCONT( "LIQUIDCONT" ); static const std::string flag_LITCIG( "LITCIG" ); -static const std::string flag_LOCKABLE_CARGO( "LOCKABLE_CARGO" ); static const std::string flag_LOCKED( "LOCKED" ); static const std::string flag_LONE_START( "LONE_START" ); -static const std::string flag_LOW_FINAL_AIR_DRAG( "LOW_FINAL_AIR_DRAG" ); static const std::string flag_LUPINE( "LUPINE" ); static const std::string flag_MAG_BELT( "MAG_BELT" ); static const std::string flag_MAG_BULKY( "MAG_BULKY" ); @@ -1151,20 +1116,14 @@ static const std::string flag_MILLABLE( "MILLABLE" ); static const std::string flag_MINEABLE( "MINEABLE" ); static const std::string flag_MOUNTABLE( "MOUNTABLE" ); static const std::string flag_MOUNTED_GUN( "MOUNTED_GUN" ); -static const std::string flag_MUFFLER( "MUFFLER" ); static const std::string flag_MUSCLE_ARMS( "MUSCLE_ARMS" ); static const std::string flag_MUSCLE_LEGS( "MUSCLE_LEGS" ); static const std::string flag_MUSHY( "MUSHY" ); static const std::string flag_MYCUS_OK( "MYCUS_OK" ); static const std::string flag_NANOFAB_TEMPLATE( "NANOFAB_TEMPLATE" ); static const std::string flag_NEED_ACTIVE_TO_MELEE( "NEED_ACTIVE_TO_MELEE" ); -static const std::string flag_NEEDS_BATTERY_MOUNT( "NEEDS_BATTERY_MOUNT" ); -static const std::string flag_NEEDS_JACKING( "NEEDS_JACKING" ); static const std::string flag_NEEDS_NO_LUBE( "NEEDS_NO_LUBE" ); static const std::string flag_NEEDS_UNFOLD( "NEEDS_UNFOLD" ); -static const std::string flag_NEEDS_WHEEL_MOUNT_HEAVY( "NEEDS_WHEEL_MOUNT_HEAVY" ); -static const std::string flag_NEEDS_WHEEL_MOUNT_LIGHT( "NEEDS_WHEEL_MOUNT_LIGHT" ); -static const std::string flag_NEEDS_WHEEL_MOUNT_MEDIUM( "NEEDS_WHEEL_MOUNT_MEDIUM" ); static const std::string flag_NEGATIVE_MONOTONY_OK( "NEGATIVE_MONOTONY_OK" ); static const std::string flag_NEVER_JAMS( "NEVER_JAMS" ); static const std::string flag_no_auto_equip( "no_auto_equip" ); @@ -1178,25 +1137,19 @@ static const std::string flag_NO_QUICKDRAW( "NO_QUICKDRAW" ); static const std::string flag_NO_RELOAD( "NO_RELOAD" ); static const std::string flag_NO_REPAIR( "NO_REPAIR" ); static const std::string flag_NO_RESIZE( "NO_RESIZE" ); -static const std::string flag_NO_ROOF_NEEDED( "NO_ROOF_NEEDED" ); static const std::string flag_NO_SALVAGE( "NO_SALVAGE" ); static const std::string flag_NO_STERILE( "NO_STERILE" ); static const std::string flag_NO_TAKEOFF( "NO_TAKEOFF" ); static const std::string flag_NO_UNLOAD( "NO_UNLOAD" ); static const std::string flag_NO_UNWIELD( "NO_UNWIELD" ); static const std::string flag_NOCOLLIDE( "NOCOLLIDE" ); -static const std::string flag_NOINSTALL( "NOINSTALL" ); static const std::string flag_NOITEM( "NOITEM" ); static const std::string flag_NON_FOULING( "NON-FOULING" ); -static const std::string flag_NONBELTABLE( "NONBELTABLE" ); static const std::string flag_NONCONDUCTIVE( "NONCONDUCTIVE" ); static const std::string flag_NPC_ACTIVATE( "NPC_ACTIVATE" ); static const std::string flag_NPC_SAFE( "NPC_SAFE" ); static const std::string flag_NUTRIENT_OVERRIDE( "NUTRIENT_OVERRIDE" ); -static const std::string flag_ON_CONTROLS( "ON_CONTROLS" ); -static const std::string flag_ON_ROOF( "ON_ROOF" ); static const std::string flag_ONLY_ONE( "ONLY_ONE" ); -static const std::string flag_OPAQUE( "OPAQUE" ); static const std::string flag_OPENABLE( "OPENABLE" ); static const std::string flag_OPENCLOSE_INSIDE( "OPENCLOSE_INSIDE" ); static const std::string flag_ORGANIC( "ORGANIC" ); @@ -1212,7 +1165,6 @@ static const std::string flag_PLANTABLE( "PLANTABLE" ); static const std::string flag_PLANTER( "PLANTER" ); static const std::string flag_PLOWABLE( "PLOWABLE" ); static const std::string flag_POCKETS( "POCKETS" ); -static const std::string flag_POWER_TRANSFER( "POWER_TRANSFER" ); static const std::string flag_POWERARMOR_COMPATIBLE( "POWERARMOR_COMPATIBLE" ); static const std::string flag_POWERED( "POWERED" ); static const std::string flag_PRED1( "PRED1" ); @@ -1222,8 +1174,6 @@ static const std::string flag_PRED4( "PRED4" ); static const std::string flag_PRIMITIVE_RANGED_WEAPON( "PRIMITIVE_RANGED_WEAPON" ); static const std::string flag_PROCESSING( "PROCESSING" ); static const std::string flag_PROCESSING_RESULT( "PROCESSING_RESULT" ); -static const std::string flag_PROTRUSION( "PROTRUSION" ); -static const std::string flag_PSEUDO( "PSEUDO" ); static const std::string flag_PSYCHOPATH( "PSYCHOPATH" ); static const std::string flag_PULPED( "PULPED" ); static const std::string flag_PUMP_ACTION( "PUMP_ACTION" ); @@ -1241,7 +1191,6 @@ static const std::string flag_RADIOSIGNAL_1( "RADIOSIGNAL_1" ); static const std::string flag_RADIOSIGNAL_2( "RADIOSIGNAL_2" ); static const std::string flag_RADIOSIGNAL_3( "RADIOSIGNAL_3" ); static const std::string flag_RAIN_PROTECT( "RAIN_PROTECT" ); -static const std::string flag_RAINPROOF( "RAINPROOF" ); static const std::string flag_RAMP_END( "RAMP_END" ); static const std::string flag_RAW( "RAW" ); static const std::string flag_REACH_ATTACK( "REACH_ATTACK" ); @@ -1252,7 +1201,6 @@ static const std::string flag_REDUCED_WEIGHT( "REDUCED_WEIGHT" ); static const std::string flag_RELOAD_AND_SHOOT( "RELOAD_AND_SHOOT" ); static const std::string flag_RELOAD_EJECT( "RELOAD_EJECT" ); static const std::string flag_RELOAD_ONE( "RELOAD_ONE" ); -static const std::string flag_REMOTE_CONTROLS( "REMOTE_CONTROLS" ); static const std::string flag_REQUIRES_TINDER( "REQUIRES_TINDER" ); static const std::string flag_RESTRICT_HANDS( "RESTRICT_HANDS" ); static const std::string flag_REVIVE_SPECIAL( "REVIVE_SPECIAL" ); @@ -1260,7 +1208,6 @@ static const std::string flag_ROAD( "ROAD" ); static const std::string flag_ROLLER_INLINE( "ROLLER_INLINE" ); static const std::string flag_ROLLER_ONE( "ROLLER_ONE" ); static const std::string flag_ROLLER_QUAD( "ROLLER_QUAD" ); -static const std::string flag_ROOF( "ROOF" ); static const std::string flag_ROUGH( "ROUGH" ); static const std::string flag_RUBBLE( "RUBBLE" ); static const std::string flag_SAFE_FUEL_OFF( "SAFE_FUEL_OFF" ); @@ -1270,9 +1217,7 @@ static const std::string flag_SAPIOVORE( "SAPIOVORE" ); static const std::string flag_SCEN_ONLY( "SCEN_ONLY" ); static const std::string flag_SEALED( "SEALED" ); static const std::string flag_SEAT( "SEAT" ); -static const std::string flag_SEATBELT( "SEATBELT" ); static const std::string flag_SECRET( "SECRET" ); -static const std::string flag_SECURITY( "SECURITY" ); static const std::string flag_SEMITANGIBLE( "SEMITANGIBLE" ); static const std::string flag_SHARP( "SHARP" ); static const std::string flag_SHRUB( "SHRUB" ); @@ -1285,15 +1230,11 @@ static const std::string flag_SLOW_WIELD( "SLOW_WIELD" ); static const std::string flag_SLOWS_THIRST( "SLOWS_THIRST" ); static const std::string flag_SMOKABLE( "SMOKABLE" ); static const std::string flag_SMOKED( "SMOKED" ); -static const std::string flag_SOLAR_PANEL( "SOLAR_PANEL" ); -static const std::string flag_SPACE_HEATER( "SPACE_HEATER" ); static const std::string flag_SPEAR( "SPEAR" ); static const std::string flag_SPEEDLOADER( "SPEEDLOADER" ); static const std::string flag_SPLINT( "SPLINT" ); static const std::string flag_SPR_START( "SPR_START" ); -static const std::string flag_STABLE( "STABLE" ); static const std::string flag_STEERABLE( "STEERABLE" ); -static const std::string flag_STEREO( "STEREO" ); static const std::string flag_STR_DRAW( "STR_DRAW" ); static const std::string flag_STR_RELOAD( "STR_RELOAD" ); static const std::string flag_STURDY( "STURDY" ); @@ -1313,14 +1254,9 @@ static const std::string flag_TIE_UP( "TIE_UP" ); static const std::string flag_TINDER( "TINDER" ); static const std::string flag_TINY( "TINY" ); static const std::string flag_TOBACCO( "TOBACCO" ); -static const std::string flag_TRACK( "TRACK" ); -static const std::string flag_TRACKED( "TRACKED" ); static const std::string flag_TRADER_AVOID( "TRADER_AVOID" ); static const std::string flag_TRANSPARENT( "TRANSPARENT" ); static const std::string flag_TREE( "TREE" ); -static const std::string flag_TURRET( "TURRET" ); -static const std::string flag_TURRET_CONTROLS( "TURRET_CONTROLS" ); -static const std::string flag_TURRET_MOUNT( "TURRET_MOUNT" ); static const std::string flag_UNARMED_BONUS( "UNARMED_BONUS" ); static const std::string flag_UNARMED_WEAPON( "UNARMED_WEAPON" ); static const std::string flag_UNBREAKABLE_MELEE( "UNBREAKABLE_MELEE" ); @@ -1328,7 +1264,6 @@ static const std::string flag_UNCRAFT_LIQUIDS_CONTAINED( "UNCRAFT_LIQUIDS_CONTAI static const std::string flag_UNCRAFT_SINGLE_CHARGE( "UNCRAFT_SINGLE_CHARGE " ); static const std::string flag_UNDERSIZE( "UNDERSIZE" ); static const std::string flag_UNDERWATER_GUN( "UNDERWATER_GUN" ); -static const std::string flag_UNMOUNT_ON_MOVE( "UNMOUNT_ON_MOVE" ); static const std::string flag_UNRECOVERABLE( "UNRECOVERABLE" ); static const std::string flag_UNSTABLE( "UNSTABLE" ); static const std::string flag_URSINE_HONEY( "URSINE_HONEY" ); @@ -1340,31 +1275,16 @@ static const std::string flag_USE_UPS( "USE_UPS" ); static const std::string flag_USES_BIONIC_POWER( "USES_BIONIC_POWER" ); static const std::string flag_VARSIZE( "VARSIZE" ); static const std::string flag_VEHICLE( "VEHICLE" ); -static const std::string flag_VISION( "VISION" ); static const std::string flag_WAIST( "WAIST" ); static const std::string flag_WALL( "WALL" ); -static const std::string flag_WATCH( "WATCH" ); static const std::string flag_WATER_EXTINGUISH( "WATER_EXTINGUISH" ); static const std::string flag_WATER_FRIENDLY( "WATER_FRIENDLY" ); -static const std::string flag_WATER_PURIFIER( "WATER_PURIFIER" ); -static const std::string flag_WATER_WHEEL( "WATER_WHEEL" ); static const std::string flag_WATERPROOF( "WATERPROOF" ); static const std::string flag_WATERPROOF_GUN( "WATERPROOF_GUN" ); -static const std::string flag_WELDRIG( "WELDRIG" ); static const std::string flag_WET( "WET" ); -static const std::string flag_WHEEL( "WHEEL" ); -static const std::string flag_WHEEL_MOUNT_HEAVY( "WHEEL_MOUNT_HEAVY" ); -static const std::string flag_WHEEL_MOUNT_LIGHT( "WHEEL_MOUNT_LIGHT" ); -static const std::string flag_WHEEL_MOUNT_MEDIUM( "WHEEL_MOUNT_MEDIUM" ); static const std::string flag_WHIP( "WHIP" ); static const std::string flag_WIN_START( "WIN_START" ); static const std::string flag_WIND_EXTINGUISH( "WIND_EXTINGUISH" ); -static const std::string flag_WIND_POWERED( "WIND_POWERED" ); -static const std::string flag_WIND_TURBINE( "WIND_TURBINE" ); -static const std::string flag_WINDOW( "WINDOW" ); -static const std::string flag_WINDOW_CURTAIN( "WINDOW_CURTAIN" ); -static const std::string flag_WINDSHIELD( "WINDSHIELD" ); -static const std::string flag_WORKBENCH( "WORKBENCH" ); static const std::string flag_WRITE_MESSAGE( "WRITE_MESSAGE" ); static const std::string flag_YOUNG( "YOUNG" ); diff --git a/src/veh_interact.cpp b/src/veh_interact.cpp index 8f99b5540d563..20b26cc28f247 100644 --- a/src/veh_interact.cpp +++ b/src/veh_interact.cpp @@ -180,7 +180,7 @@ veh_interact::veh_interact( vehicle &veh, const point &p ) for( const auto &e : vpart_info::all() ) { const vpart_info &vp = e.second; vpart_shapes[ vp.name() + vp.item ].push_back( &vp ); - if( vp.has_flag( flag_WHEEL ) ) { + if( vp.has_flag( "WHEEL" ) ) { wheel_types.push_back( &vp ); } } @@ -648,7 +648,7 @@ bool veh_interact::can_install_part() if( is_drive_conflict() ) { return false; } - if( sel_vpart_info->has_flag( flag_FUNNEL ) ) { + if( sel_vpart_info->has_flag( "FUNNEL" ) ) { if( std::none_of( parts_here.begin(), parts_here.end(), [&]( const int e ) { return veh->parts[e].is_tank(); } ) ) { @@ -661,7 +661,7 @@ bool veh_interact::can_install_part() } } - if( sel_vpart_info->has_flag( flag_TURRET ) ) { + if( sel_vpart_info->has_flag( "TURRET" ) ) { if( std::any_of( parts_here.begin(), parts_here.end(), [&]( const int e ) { return veh->parts[e].is_turret(); } ) ) { @@ -674,11 +674,11 @@ bool veh_interact::can_install_part() } } - bool is_engine = sel_vpart_info->has_flag( flag_ENGINE ); + bool is_engine = sel_vpart_info->has_flag( "ENGINE" ); //count current engines, some engines don't require higher skill int engines = 0; int dif_eng = 0; - if( is_engine && sel_vpart_info->has_flag( flag_E_HIGHER_SKILL ) ) { + if( is_engine && sel_vpart_info->has_flag( "E_HIGHER_SKILL" ) ) { for( const vpart_reference &vp : veh->get_avail_parts( "ENGINE" ) ) { if( vp.has_feature( "E_HIGHER_SKILL" ) ) { engines++; @@ -688,7 +688,7 @@ bool veh_interact::can_install_part() } int dif_steering = 0; - if( sel_vpart_info->has_flag( flag_STEERABLE ) ) { + if( sel_vpart_info->has_flag( "STEERABLE" ) ) { std::set axles; for( auto &p : veh->steering ) { if( !veh->part_flag( p, "TRACKED" ) ) { @@ -738,7 +738,7 @@ bool veh_interact::can_install_part() bool use_aid = false; bool use_str = false; item base( sel_vpart_info->item ); - if( sel_vpart_info->has_flag( flag_NEEDS_JACKING ) ) { + if( sel_vpart_info->has_flag( "NEEDS_JACKING" ) ) { qual = quality_JACK; lvl = jack_quality( *veh ); str = veh->lift_strength(); @@ -846,7 +846,7 @@ bool veh_interact::do_install( std::string &msg ) tab_filters[1] = [&]( const vpart_info * p ) { auto &part = *p; return part.has_flag( VPFLAG_CARGO ) && // Cargo - !part.has_flag( flag_TURRET ); + !part.has_flag( "TURRET" ); }; tab_filters[2] = [&]( const vpart_info * p ) { auto &part = *p; @@ -860,44 +860,44 @@ bool veh_interact::do_install( std::string &msg ) }; tab_filters[3] = [&]( const vpart_info * p ) { auto &part = *p; - return part.has_flag( flag_TRACK ) || //Util + return part.has_flag( "TRACK" ) || //Util part.has_flag( VPFLAG_FRIDGE ) || part.has_flag( VPFLAG_FREEZER ) || - part.has_flag( flag_KITCHEN ) || - part.has_flag( flag_WELDRIG ) || - part.has_flag( flag_CRAFTRIG ) || - part.has_flag( flag_CHEMLAB ) || - part.has_flag( flag_FORGE ) || - part.has_flag( flag_HORN ) || - part.has_flag( flag_BEEPER ) || - part.has_flag( flag_AUTOPILOT ) || - part.has_flag( flag_WATCH ) || - part.has_flag( flag_ALARMCLOCK ) || + part.has_flag( "KITCHEN" ) || + part.has_flag( "WELDRIG" ) || + part.has_flag( "CRAFTRIG" ) || + part.has_flag( "CHEMLAB" ) || + part.has_flag( "FORGE" ) || + part.has_flag( "HORN" ) || + part.has_flag( "BEEPER" ) || + part.has_flag( "AUTOPILOT" ) || + part.has_flag( "WATCH" ) || + part.has_flag( "ALARMCLOCK" ) || part.has_flag( VPFLAG_RECHARGE ) || - part.has_flag( flag_VISION ) || - part.has_flag( flag_POWER_TRANSFER ) || - part.has_flag( flag_FAUCET ) || - part.has_flag( flag_STEREO ) || - part.has_flag( flag_CHIMES ) || - part.has_flag( flag_MUFFLER ) || - part.has_flag( flag_REMOTE_CONTROLS ) || - part.has_flag( flag_CURTAIN ) || - part.has_flag( flag_SEATBELT ) || - part.has_flag( flag_SECURITY ) || - part.has_flag( flag_SEAT ) || - part.has_flag( flag_BED ) || - part.has_flag( flag_SPACE_HEATER ) || - part.has_flag( flag_COOLER ) || - part.has_flag( flag_DOOR_MOTOR ) || - part.has_flag( flag_WATER_PURIFIER ) || - part.has_flag( flag_WORKBENCH ); + part.has_flag( "VISION" ) || + part.has_flag( "POWER_TRANSFER" ) || + part.has_flag( "FAUCET" ) || + part.has_flag( "STEREO" ) || + part.has_flag( "CHIMES" ) || + part.has_flag( "MUFFLER" ) || + part.has_flag( "REMOTE_CONTROLS" ) || + part.has_flag( "CURTAIN" ) || + part.has_flag( "SEATBELT" ) || + part.has_flag( "SECURITY" ) || + part.has_flag( "SEAT" ) || + part.has_flag( "BED" ) || + part.has_flag( "SPACE_HEATER" ) || + part.has_flag( "COOLER" ) || + part.has_flag( "DOOR_MOTOR" ) || + part.has_flag( "WATER_PURIFIER" ) || + part.has_flag( "WORKBENCH" ); }; tab_filters[4] = [&]( const vpart_info * p ) { auto &part = *p; return( part.has_flag( VPFLAG_OBSTACLE ) || // Hull - part.has_flag( flag_ROOF ) || + part.has_flag( "ROOF" ) || part.has_flag( VPFLAG_ARMOR ) ) && - !part.has_flag( flag_WHEEL ) && + !part.has_flag( "WHEEL" ) && !tab_filters[3]( p ); }; tab_filters[5] = [&]( const vpart_info * p ) { @@ -907,7 +907,7 @@ bool veh_interact::do_install( std::string &msg ) part.has_flag( VPFLAG_CONTROLS ) || part.location == "fuel_source" || part.location == "on_battery_mount" || - ( part.location.empty() && part.has_flag( flag_FUEL_TANK ) ); + ( part.location.empty() && part.has_flag( "FUEL_TANK" ) ); }; // Other: everything that's not in the other filters @@ -983,7 +983,7 @@ bool veh_interact::do_install( std::string &msg ) default: break; } - if( veh->is_foldable() && !sel_vpart_info->has_flag( flag_FOLDABLE ) && + if( veh->is_foldable() && !sel_vpart_info->has_flag( "FOLDABLE" ) && !query_yn( _( "Installing this part will make the vehicle unfoldable. Continue?" ) ) ) { return true; } @@ -1660,7 +1660,7 @@ bool veh_interact::can_remove_part( int idx, const player &p ) bool use_aid = false; bool use_str = false; item base( sel_vpart_info->item ); - if( sel_vpart_info->has_flag( flag_NEEDS_JACKING ) ) { + if( sel_vpart_info->has_flag( "NEEDS_JACKING" ) ) { qual = quality_JACK; lvl = jack_quality( *veh ); str = veh->lift_strength(); @@ -2014,7 +2014,7 @@ void veh_interact::move_cursor( const point &d, int dstart_at ) if( pt.base.damage() > 0 && pt.info().is_repairable() ) { need_repair.push_back( i ); } - if( pt.info().has_flag( flag_WHEEL ) ) { + if( pt.info().has_flag( "WHEEL" ) ) { wheel = &pt; } } @@ -2558,9 +2558,9 @@ void veh_interact::display_details( const vpart_info *part ) std::string label; if( part->has_flag( VPFLAG_SEATBELT ) ) { label = small_mode ? _( "Str" ) : _( "Strength" ); - } else if( part->has_flag( flag_HORN ) ) { + } else if( part->has_flag( "HORN" ) ) { label = _( "Noise" ); - } else if( part->has_flag( flag_MUFFLER ) ) { + } else if( part->has_flag( "MUFFLER" ) ) { label = small_mode ? _( "NoisRed" ) : _( "Noise Reduction" ); } else if( part->has_flag( VPFLAG_EXTENDS_VISION ) ) { label = _( "Range" ); diff --git a/src/veh_type.cpp b/src/veh_type.cpp index fc015e2031646..e0486058a8f52 100644 --- a/src/veh_type.cpp +++ b/src/veh_type.cpp @@ -31,7 +31,6 @@ #include "game_constants.h" #include "item.h" #include "mapdata.h" -#include "cata_string_consts.h" class npc; @@ -403,15 +402,15 @@ void vpart_info::load( const JsonObject &jo, const std::string &src ) def.damage_reduction = load_damage_array( dred ); } - if( def.has_flag( flag_ENGINE ) ) { + if( def.has_flag( "ENGINE" ) ) { load_engine( def.engine_info, jo, def.fuel_type ); } - if( def.has_flag( flag_WHEEL ) ) { + if( def.has_flag( "WHEEL" ) ) { load_wheel( def.wheel_info, jo ); } - if( def.has_flag( flag_WORKBENCH ) ) { + if( def.has_flag( "WORKBENCH" ) ) { load_workbench( def.workbench_info, jo ); } @@ -577,7 +576,7 @@ void vpart_info::check() if( part.folded_volume < 0_ml ) { debugmsg( "vehicle part %s has negative folded volume", part.id.c_str() ); } - if( part.has_flag( flag_FOLDABLE ) && part.folded_volume == 0_ml ) { + if( part.has_flag( "FOLDABLE" ) && part.folded_volume == 0_ml ) { debugmsg( "vehicle part %s has folding part with zero folded volume", part.name() ); } if( !item::type_is_defined( part.default_ammo ) ) { @@ -602,13 +601,13 @@ void vpart_info::check() part.id.c_str(), part.fuel_type.c_str() ); part.fuel_type = "null"; } - if( part.has_flag( flag_TURRET ) && !base_item_type.gun ) { + if( part.has_flag( "TURRET" ) && !base_item_type.gun ) { debugmsg( "vehicle part %s has the TURRET flag, but is not made from a gun item", part.id.c_str() ); } - if( !part.emissions.empty() && !part.has_flag( flag_EMITTER ) ) { + if( !part.emissions.empty() && !part.has_flag( "EMITTER" ) ) { debugmsg( "vehicle part %s has emissions set, but the EMITTER flag is not set", part.id.c_str() ); } - if( part.has_flag( flag_EMITTER ) ) { + if( part.has_flag( "EMITTER" ) ) { if( part.emissions.empty() ) { debugmsg( "vehicle part %s has the EMITTER flag, but no emissions were set", part.id.c_str() ); } else { @@ -620,7 +619,7 @@ void vpart_info::check() } } } - if( part.has_flag( flag_WHEEL ) && !base_item_type.wheel ) { + if( part.has_flag( "WHEEL" ) && !base_item_type.wheel ) { debugmsg( "vehicle part %s has the WHEEL flag, but base item %s is not a wheel. THIS WILL CRASH!", part.id.c_str(), part.item ); } @@ -682,7 +681,7 @@ int vpart_info::format_description( std::string &msg, const nc_color &format_col long_descrip += description.translated(); } for( const auto &flagid : flags ) { - if( flagid == flag_ALARMCLOCK || flagid == flag_WATCH ) { + if( flagid == "ALARMCLOCK" || flagid == "WATCH" ) { continue; } json_flag flag = json_flag::get( flagid ); @@ -693,15 +692,15 @@ int vpart_info::format_description( std::string &msg, const nc_color &format_col long_descrip += _( flag.info() ); } } - if( ( has_flag( flag_SEAT ) || has_flag( flag_BED ) ) && !has_flag( flag_BELTABLE ) ) { - json_flag nobelt = json_flag::get( flag_NONBELTABLE ); + if( ( has_flag( "SEAT" ) || has_flag( "BED" ) ) && !has_flag( "BELTABLE" ) ) { + json_flag nobelt = json_flag::get( "NONBELTABLE" ); long_descrip += " " + _( nobelt.info() ); } - if( has_flag( flag_BOARDABLE ) && has_flag( flag_OPENABLE ) ) { - json_flag nobelt = json_flag::get( flag_DOOR ); + if( has_flag( "BOARDABLE" ) && has_flag( "OPENABLE" ) ) { + json_flag nobelt = json_flag::get( "DOOR" ); long_descrip += " " + _( nobelt.info() ); } - if( has_flag( flag_TURRET ) ) { + if( has_flag( "TURRET" ) ) { class::item base( item ); long_descrip += string_format( _( "\nRange: %1$5d Damage: %2$5.0f" ), base.gun_range( true ), @@ -1068,7 +1067,7 @@ void vehicle_prototype::finalize() } } - if( pt.part.obj().has_flag( flag_CARGO ) ) { + if( pt.part.obj().has_flag( "CARGO" ) ) { cargo_spots.insert( pt.pos ); } } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b64019151dc74..3042bd524756d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1075,7 +1075,7 @@ bool vehicle::is_engine_type( const int e, const itype_id &ft ) const bool vehicle::is_perpetual_type( const int e ) const { const itype_id &ft = part_info( engines[e] ).fuel_type; - return item( ft ).has_flag( flag_PERPETUAL ); + return item( ft ).has_flag( "PERPETUAL" ); } bool vehicle::is_engine_on( const int e ) const @@ -1233,7 +1233,7 @@ bool vehicle::has_structural_part( const point &dp ) const { for( const int elem : parts_at_relative( dp, false ) ) { if( part_info( elem ).location == part_location_structure && - !part_info( elem ).has_flag( flag_PROTRUSION ) ) { + !part_info( elem ).has_flag( "PROTRUSION" ) ) { return true; } } @@ -1270,7 +1270,7 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const //It also has to be a real part, not the null part const vpart_info &part = id.obj(); - if( part.has_flag( flag_NOINSTALL ) ) { + if( part.has_flag( "NOINSTALL" ) ) { return false; } @@ -1281,11 +1281,11 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const return false; } // If its a part that harnesses animals that dont allow placing on it. - if( !parts_in_square.empty() && part_info( parts_in_square[0] ).has_flag( flag_ANIMAL_CTRL ) ) { + if( !parts_in_square.empty() && part_info( parts_in_square[0] ).has_flag( "ANIMAL_CTRL" ) ) { return false; } //No other part can be placed on a protrusion - if( !parts_in_square.empty() && part_info( parts_in_square[0] ).has_flag( flag_PROTRUSION ) ) { + if( !parts_in_square.empty() && part_info( parts_in_square[0] ).has_flag( "PROTRUSION" ) ) { return false; } @@ -1300,7 +1300,7 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } // Until we have an interface for handling multiple components with CARGO space, // exclude them from being mounted in the same tile. - if( part.has_flag( flag_CARGO ) && other_part.has_flag( flag_CARGO ) ) { + if( part.has_flag( "CARGO" ) && other_part.has_flag( "CARGO" ) ) { return false; } @@ -1329,7 +1329,7 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const if( part.has_flag( VPFLAG_ALTERNATOR ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_E_ALTERNATOR ) ) { + if( part_info( elem ).has_flag( "E_ALTERNATOR" ) ) { anchor_found = true; } } @@ -1339,10 +1339,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Seatbelts must be installed on a seat - if( part.has_flag( flag_SEATBELT ) ) { + if( part.has_flag( "SEATBELT" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_BELTABLE ) ) { + if( part_info( elem ).has_flag( "BELTABLE" ) ) { anchor_found = true; } } @@ -1352,10 +1352,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Internal must be installed into a cargo area. - if( part.has_flag( flag_INTERNAL ) ) { + if( part.has_flag( "INTERNAL" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_CARGO ) ) { + if( part_info( elem ).has_flag( "CARGO" ) ) { anchor_found = true; } } @@ -1366,10 +1366,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const // curtains must be installed on (reinforced)windshields // TODO: do this automatically using "location":"on_mountpoint" - if( part.has_flag( flag_WINDOW_CURTAIN ) ) { + if( part.has_flag( "WINDOW_CURTAIN" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_WINDOW ) ) { + if( part_info( elem ).has_flag( "WINDOW" ) ) { anchor_found = true; } } @@ -1379,10 +1379,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } // Security system must be installed on controls - if( part.has_flag( flag_ON_CONTROLS ) ) { + if( part.has_flag( "ON_CONTROLS" ) ) { bool anchor_found = false; for( auto it : parts_in_square ) { - if( part_info( it ).has_flag( flag_CONTROLS ) ) { + if( part_info( it ).has_flag( "CONTROLS" ) ) { anchor_found = true; } } @@ -1393,10 +1393,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const // Cargo locks must go on lockable cargo containers // TODO: do this automatically using "location":"on_mountpoint" - if( part.has_flag( flag_CARGO_LOCKING ) ) { + if( part.has_flag( "CARGO_LOCKING" ) ) { bool anchor_found = false; for( auto it : parts_in_square ) { - if( part_info( it ).has_flag( flag_LOCKABLE_CARGO ) ) { + if( part_info( it ).has_flag( "LOCKABLE_CARGO" ) ) { anchor_found = true; } } @@ -1406,10 +1406,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Swappable storage battery must be installed on a BATTERY_MOUNT - if( part.has_flag( flag_NEEDS_BATTERY_MOUNT ) ) { + if( part.has_flag( "NEEDS_BATTERY_MOUNT" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_BATTERY_MOUNT ) ) { + if( part_info( elem ).has_flag( "BATTERY_MOUNT" ) ) { anchor_found = true; } } @@ -1419,10 +1419,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Door motors need OPENABLE - if( part.has_flag( flag_DOOR_MOTOR ) ) { + if( part.has_flag( "DOOR_MOTOR" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_OPENABLE ) ) { + if( part_info( elem ).has_flag( "OPENABLE" ) ) { anchor_found = true; } } @@ -1432,28 +1432,28 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Mirrors cannot be mounted on OPAQUE parts - if( part.has_flag( flag_VISION ) && !part.has_flag( flag_CAMERA ) ) { + if( part.has_flag( "VISION" ) && !part.has_flag( "CAMERA" ) ) { for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_OPAQUE ) ) { + if( part_info( elem ).has_flag( "OPAQUE" ) ) { return false; } } } //and vice versa - if( part.has_flag( flag_OPAQUE ) ) { + if( part.has_flag( "OPAQUE" ) ) { for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_VISION ) && - !part_info( elem ).has_flag( flag_CAMERA ) ) { + if( part_info( elem ).has_flag( "VISION" ) && + !part_info( elem ).has_flag( "CAMERA" ) ) { return false; } } } //Turrets must be installed on a turret mount - if( part.has_flag( flag_TURRET ) ) { + if( part.has_flag( "TURRET" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_TURRET_MOUNT ) ) { + if( part_info( elem ).has_flag( "TURRET_MOUNT" ) ) { anchor_found = true; break; } @@ -1464,19 +1464,19 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Turret mounts must NOT be installed on other (modded) turret mounts - if( part.has_flag( flag_TURRET_MOUNT ) ) { + if( part.has_flag( "TURRET_MOUNT" ) ) { for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_TURRET_MOUNT ) ) { + if( part_info( elem ).has_flag( "TURRET_MOUNT" ) ) { return false; } } } //Roof-mounted parts must be installed on a roofs - if( part.has_flag( flag_ON_ROOF ) ) { + if( part.has_flag( "ON_ROOF" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_ROOF ) ) { + if( part_info( elem ).has_flag( "ROOF" ) ) { anchor_found = true; break; } @@ -1487,10 +1487,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } // Wheels that need axles must be installed on a wheel mount - if( part.has_flag( flag_NEEDS_WHEEL_MOUNT_LIGHT ) ) { + if( part.has_flag( "NEEDS_WHEEL_MOUNT_LIGHT" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_WHEEL_MOUNT_LIGHT ) ) { + if( part_info( elem ).has_flag( "WHEEL_MOUNT_LIGHT" ) ) { anchor_found = true; break; } @@ -1499,10 +1499,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const return false; } } - if( part.has_flag( flag_NEEDS_WHEEL_MOUNT_MEDIUM ) ) { + if( part.has_flag( "NEEDS_WHEEL_MOUNT_MEDIUM" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_WHEEL_MOUNT_MEDIUM ) ) { + if( part_info( elem ).has_flag( "WHEEL_MOUNT_MEDIUM" ) ) { anchor_found = true; break; } @@ -1511,10 +1511,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const return false; } } - if( part.has_flag( flag_NEEDS_WHEEL_MOUNT_HEAVY ) ) { + if( part.has_flag( "NEEDS_WHEEL_MOUNT_HEAVY" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_WHEEL_MOUNT_HEAVY ) ) { + if( part_info( elem ).has_flag( "WHEEL_MOUNT_HEAVY" ) ) { anchor_found = true; break; } @@ -1525,10 +1525,10 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const } //Turret controls must be installed on a turret - if( part.has_flag( flag_TURRET_CONTROLS ) ) { + if( part.has_flag( "TURRET_CONTROLS" ) ) { bool anchor_found = false; for( const auto &elem : parts_in_square ) { - if( part_info( elem ).has_flag( flag_TURRET ) ) { + if( part_info( elem ).has_flag( "TURRET" ) ) { anchor_found = true; break; } @@ -1686,7 +1686,7 @@ bool vehicle::is_connected( const vehicle_part &to, const vehicle_part &from, if( !parts_there.empty() && !parts[ parts_there[ 0 ] ].removed && part_info( parts_there[ 0 ] ).location == "structure" && - !part_info( parts_there[ 0 ] ).has_flag( flag_PROTRUSION ) ) { + !part_info( parts_there[ 0 ] ).has_flag( "PROTRUSION" ) ) { //Only add the part if we haven't been here before bool found = false; for( auto &elem : discovered ) { @@ -2399,7 +2399,7 @@ bool vehicle::split_vehicles( const std::vector> &new_vehs, for( size_t sp = 0; sp < split_parts.size(); sp++ ) { int p = split_parts[ sp ]; if( part_info( p ).location == part_location_structure && - !part_info( p ).has_flag( flag_PROTRUSION ) ) { + !part_info( p ).has_flag( "PROTRUSION" ) ) { split_part0 = sp; break; } @@ -3344,15 +3344,15 @@ int vehicle::fuel_left( const itype_id &ftype, bool recurse ) const const int p = avail_part_with_feature( vp->part_index(), VPFLAG_ENGINE, true ); if( p >= 0 && is_part_on( p ) && part_info( p ).fuel_type == fuel_type_muscle ) { //Broken limbs prevent muscle engines from working - if( ( part_info( p ).has_flag( flag_MUSCLE_LEGS ) && ( g->u.get_working_leg_count() >= 2 ) ) || - ( part_info( p ).has_flag( flag_MUSCLE_ARMS ) && + if( ( part_info( p ).has_flag( "MUSCLE_LEGS" ) && ( g->u.get_working_leg_count() >= 2 ) ) || + ( part_info( p ).has_flag( "MUSCLE_ARMS" ) && ( g->u.get_working_arm_count() >= 2 ) ) ) { fl += 10; } } } // As do any other engine flagged as perpetual - } else if( item( ftype ).has_flag( flag_PERPETUAL ) ) { + } else if( item( ftype ).has_flag( "PERPETUAL" ) ) { fl += 10; } @@ -3470,7 +3470,7 @@ int vehicle::basic_consumption( const itype_id &ftype ) const int vehicle::consumption_per_hour( const itype_id &ftype, int fuel_rate_w ) const { item fuel = item( ftype ); - if( fuel_rate_w == 0 || fuel.has_flag( flag_PERPETUAL ) || !engine_on ) { + if( fuel_rate_w == 0 || fuel.has_flag( "PERPETUAL" ) || !engine_on ) { return 0; } // consume this fuel type's share of alternator load for 3600 seconds @@ -3793,7 +3793,7 @@ void vehicle::noise_and_smoke( int load, time_duration time ) cur_stress = std::max( cur_stress, 1.0 ); double part_noise = cur_stress * part_info( p ).engine_noise_factor(); - if( part_info( p ).has_flag( flag_E_COMBUSTION ) ) { + if( part_info( p ).has_flag( "E_COMBUSTION" ) ) { combustion = true; double health = parts[p].health_percent(); if( parts[ p ].base.faults.count( fault_filter_fuel ) ) { @@ -3917,16 +3917,16 @@ double vehicle::coeff_air_drag() const if( p.info().location != part_location_center ) { return false; } - return !( p.inside || p.info().has_flag( flag_NO_ROOF_NEEDED ) || - p.info().has_flag( flag_WINDSHIELD ) || - p.info().has_flag( flag_OPENABLE ) ); + return !( p.inside || p.info().has_flag( "NO_ROOF_NEEDED" ) || + p.info().has_flag( "WINDSHIELD" ) || + p.info().has_flag( "OPENABLE" ) ); }; const auto d_protrusion = [&]( std::vector parts_at ) { if( parts_at.size() > 1 ) { return false; } else { - return parts[ parts_at.front() ].info().has_flag( flag_PROTRUSION ); + return parts[ parts_at.front() ].info().has_flag( "PROTRUSION" ); } }; const auto d_check_min = [&]( int &value, const vehicle_part & p, bool test ) { @@ -3949,22 +3949,22 @@ double vehicle::coeff_air_drag() const d_check_min( drag[ col ].pro, parts[ p ], d_protrusion( parts_at ) ); for( int pa_index : parts_at ) { const vehicle_part &pa = parts[ pa_index ]; - d_check_max( drag[ col ].hboard, pa, pa.info().has_flag( flag_HALF_BOARD ) ); - d_check_max( drag[ col ].fboard, pa, pa.info().has_flag( flag_FULL_BOARD ) ); - d_check_max( drag[ col ].aisle, pa, pa.info().has_flag( flag_AISLE ) ); - d_check_max( drag[ col ].shield, pa, pa.info().has_flag( flag_WINDSHIELD ) && + d_check_max( drag[ col ].hboard, pa, pa.info().has_flag( "HALF_BOARD" ) ); + d_check_max( drag[ col ].fboard, pa, pa.info().has_flag( "FULL_BOARD" ) ); + d_check_max( drag[ col ].aisle, pa, pa.info().has_flag( "AISLE" ) ); + d_check_max( drag[ col ].shield, pa, pa.info().has_flag( "WINDSHIELD" ) && pa.is_available() ); - d_check_max( drag[ col ].seat, pa, pa.info().has_flag( flag_SEAT ) || - pa.info().has_flag( flag_BED ) ); + d_check_max( drag[ col ].seat, pa, pa.info().has_flag( "SEAT" ) || + pa.info().has_flag( "BED" ) ); d_check_max( drag[ col ].turret, pa, pa.info().location == part_location_onroof && - !pa.info().has_flag( flag_SOLAR_PANEL ) ); - d_check_max( drag[ col ].roof, pa, pa.info().has_flag( flag_ROOF ) ); - d_check_max( drag[ col ].panel, pa, pa.info().has_flag( flag_SOLAR_PANEL ) ); - d_check_max( drag[ col ].windmill, pa, pa.info().has_flag( flag_WIND_TURBINE ) ); - d_check_max( drag[ col ].sail, pa, pa.info().has_flag( flag_WIND_POWERED ) ); + !pa.info().has_flag( "SOLAR_PANEL" ) ); + d_check_max( drag[ col ].roof, pa, pa.info().has_flag( "ROOF" ) ); + d_check_max( drag[ col ].panel, pa, pa.info().has_flag( "SOLAR_PANEL" ) ); + d_check_max( drag[ col ].windmill, pa, pa.info().has_flag( "WIND_TURBINE" ) ); + d_check_max( drag[ col ].sail, pa, pa.info().has_flag( "WIND_POWERED" ) ); d_check_max( drag[ col ].exposed, pa, d_exposed( pa ) ); - d_check_min( drag[ col ].last, pa, pa.info().has_flag( flag_LOW_FINAL_AIR_DRAG ) || - pa.info().has_flag( flag_HALF_BOARD ) ); + d_check_min( drag[ col ].last, pa, pa.info().has_flag( "LOW_FINAL_AIR_DRAG" ) || + pa.info().has_flag( "HALF_BOARD" ) ); } } double height = 0; @@ -4182,7 +4182,7 @@ bool vehicle::sufficient_wheel_config() const return false; } else if( wheelcache.size() == 1 ) { //Has to be a stable wheel, and one wheel can only support a 1-3 tile vehicle - if( !part_info( wheelcache.front() ).has_flag( flag_STABLE ) || + if( !part_info( wheelcache.front() ).has_flag( "STABLE" ) || all_parts_at_location( part_location_structure ).size() > 3 ) { return false; } @@ -4624,7 +4624,7 @@ void vehicle::update_alternator_load() if( engine_on ) { int engine_vpower = 0; for( size_t e = 0; e < engines.size(); ++e ) { - if( is_engine_on( e ) && parts[engines[e]].info().has_flag( flag_E_ALTERNATOR ) ) { + if( is_engine_on( e ) && parts[engines[e]].info().has_flag( "E_ALTERNATOR" ) ) { engine_vpower += part_vpower_w( engines[e] ); } } @@ -4805,7 +4805,7 @@ int vehicle::traverse_vehicle_graph( Vehicle *start_veh, int amount, Func action g->u.add_msg_if_player( m_debug, "Traversing graph with %d power", amount ); for( auto &p : current_veh->loose_parts ) { - if( !current_veh->part_info( p ).has_flag( flag_POWER_TRANSFER ) ) { + if( !current_veh->part_info( p ).has_flag( "POWER_TRANSFER" ) ) { continue; // ignore loose parts that aren't power transfer cables } @@ -5425,22 +5425,22 @@ void vehicle::refresh() if( vpi.has_flag( VPFLAG_SOLAR_PANEL ) ) { solar_panels.push_back( p ); } - if( vpi.has_flag( flag_WIND_TURBINE ) ) { + if( vpi.has_flag( "WIND_TURBINE" ) ) { wind_turbines.push_back( p ); } - if( vpi.has_flag( flag_WIND_POWERED ) ) { + if( vpi.has_flag( "WIND_POWERED" ) ) { sails.push_back( p ); } - if( vpi.has_flag( flag_WATER_WHEEL ) ) { + if( vpi.has_flag( "WATER_WHEEL" ) ) { water_wheels.push_back( p ); } - if( vpi.has_flag( flag_FUNNEL ) ) { + if( vpi.has_flag( "FUNNEL" ) ) { funnels.push_back( p ); } - if( vpi.has_flag( flag_UNMOUNT_ON_MOVE ) ) { + if( vpi.has_flag( "UNMOUNT_ON_MOVE" ) ) { loose_parts.push_back( p ); } - if( vpi.has_flag( flag_EMITTER ) ) { + if( vpi.has_flag( "EMITTER" ) ) { emitters.push_back( p ); } if( vpi.has_flag( VPFLAG_WHEEL ) ) { @@ -5461,29 +5461,29 @@ void vehicle::refresh() railwheel_xmax = std::max( railwheel_xmax, pt.x ); railwheel_ymax = std::max( railwheel_ymax, pt.y ); } - if( ( vpi.has_flag( flag_STEERABLE ) && part_with_feature( pt, flag_STEERABLE, true ) != -1 ) || - vpi.has_flag( flag_TRACKED ) ) { + if( ( vpi.has_flag( "STEERABLE" ) && part_with_feature( pt, "STEERABLE", true ) != -1 ) || + vpi.has_flag( "TRACKED" ) ) { // TRACKED contributes to steering effectiveness but // (a) doesn't count as a steering axle for install difficulty // (b) still contributes to drag for the center of steering calculation steering.push_back( p ); } - if( vpi.has_flag( flag_SECURITY ) ) { + if( vpi.has_flag( "SECURITY" ) ) { speciality.push_back( p ); } - if( vp.part().enabled && vpi.has_flag( flag_EXTRA_DRAG ) ) { + if( vp.part().enabled && vpi.has_flag( "EXTRA_DRAG" ) ) { extra_drag += vpi.power; } - if( vpi.has_flag( flag_EXTRA_DRAG ) && ( vpi.has_flag( flag_WIND_TURBINE ) || - vpi.has_flag( flag_WATER_WHEEL ) ) ) { + if( vpi.has_flag( "EXTRA_DRAG" ) && ( vpi.has_flag( "WIND_TURBINE" ) || + vpi.has_flag( "WATER_WHEEL" ) ) ) { extra_drag += vpi.power; } - if( camera_on && vpi.has_flag( flag_CAMERA ) ) { + if( camera_on && vpi.has_flag( "CAMERA" ) ) { vp.part().enabled = true; - } else if( !camera_on && vpi.has_flag( flag_CAMERA ) ) { + } else if( !camera_on && vpi.has_flag( "CAMERA" ) ) { vp.part().enabled = false; } - if( vpi.has_flag( flag_TURRET ) && !has_part( global_part_pos3( vp.part() ), "TURRET_CONTROLS" ) ) { + if( vpi.has_flag( "TURRET" ) && !has_part( global_part_pos3( vp.part() ), "TURRET_CONTROLS" ) ) { vp.part().enabled = false; } } @@ -5826,7 +5826,7 @@ void vehicle::damage_all( int dmg1, int dmg2, damage_type type, const point &imp const size_t p = vp.part_index(); int distance = 1 + square_dist( vp.mount(), impact ); if( distance > 1 && part_info( p ).location == part_location_structure && - !part_info( p ).has_flag( flag_PROTRUSION ) ) { + !part_info( p ).has_flag( "PROTRUSION" ) ) { damage_direct( p, rng( dmg1, dmg2 ) / ( distance * distance ), type ); } } diff --git a/src/visitable.cpp b/src/visitable.cpp index 216e71e91941e..9eef817548b92 100644 --- a/src/visitable.cpp +++ b/src/visitable.cpp @@ -433,7 +433,7 @@ VisitResponse visitable::visit_items( auto cur = static_cast( this ); // skip inaccessible items - if( g->m.has_flag( flag_SEALED, *cur ) && !g->m.has_flag( flag_LIQUIDCONT, *cur ) ) { + if( g->m.has_flag( "SEALED", *cur ) && !g->m.has_flag( "LIQUIDCONT", *cur ) ) { return VisitResponse::NEXT; } @@ -779,7 +779,7 @@ static int charges_of_internal( const T &self, const M &main, const itype_id &id if( e->typeId() == id ) { // includes charges from any included magazine. qty = sum_no_wrap( qty, e->ammo_remaining() ); - if( e->has_flag( flag_USE_UPS ) ) { + if( e->has_flag( "USE_UPS" ) ) { found_tool_with_UPS = true; } } @@ -887,7 +887,7 @@ static int amount_of_internal( const T &self, const itype_id &id, bool pseudo, i int qty = 0; self.visit_items( [&qty, &id, &pseudo, &limit, &filter]( const item * e ) { if( ( id == "any" || e->typeId() == id ) && filter( *e ) && ( pseudo || - !e->has_flag( flag_PSEUDO ) ) ) { + !e->has_flag( "PSEUDO" ) ) ) { qty = sum_no_wrap( qty, 1 ); } return qty != limit ? VisitResponse::NEXT : VisitResponse::ABORT; diff --git a/src/weather.cpp b/src/weather.cpp index d718115382810..261391bb14468 100644 --- a/src/weather.cpp +++ b/src/weather.cpp @@ -354,8 +354,8 @@ static void wet_player( int amount ) { if( !is_player_outside() || g->u.has_trait( trait_FEATHERS ) || - g->u.weapon.has_flag( flag_RAIN_PROTECT ) || - ( !one_in( 50 ) && g->u.worn_with_flag( flag_RAINPROOF ) ) ) { + g->u.weapon.has_flag( "RAIN_PROTECT" ) || + ( !one_in( 50 ) && g->u.worn_with_flag( "RAINPROOF" ) ) ) { return; } // Coarse correction to get us back to previously intended soaking rate. @@ -480,10 +480,10 @@ void weather_effect::lightning() void weather_effect::light_acid() { if( calendar::once_every( 1_minutes ) && is_player_outside() ) { - if( g->u.weapon.has_flag( flag_RAIN_PROTECT ) && !one_in( 3 ) ) { + if( g->u.weapon.has_flag( "RAIN_PROTECT" ) && !one_in( 3 ) ) { add_msg( _( "Your %s protects you from the acidic drizzle." ), g->u.weapon.tname() ); } else { - if( g->u.worn_with_flag( flag_RAINPROOF ) && !one_in( 4 ) ) { + if( g->u.worn_with_flag( "RAINPROOF" ) && !one_in( 4 ) ) { add_msg( _( "Your clothing protects you from the acidic drizzle." ) ); } else { bool has_helmet = false; @@ -507,10 +507,10 @@ void weather_effect::light_acid() void weather_effect::acid() { if( calendar::once_every( 2_turns ) && is_player_outside() ) { - if( g->u.weapon.has_flag( flag_RAIN_PROTECT ) && one_in( 4 ) ) { + if( g->u.weapon.has_flag( "RAIN_PROTECT" ) && one_in( 4 ) ) { add_msg( _( "Your umbrella protects you from the acid rain." ) ); } else { - if( g->u.worn_with_flag( flag_RAINPROOF ) && one_in( 2 ) ) { + if( g->u.worn_with_flag( "RAINPROOF" ) && one_in( 2 ) ) { add_msg( _( "Your clothing protects you from the acid rain." ) ); } else { bool has_helmet = false; @@ -875,7 +875,7 @@ double get_local_windpower( double windpower, const oter_id &omter, const tripoi bool is_wind_blocker( const tripoint &location ) { - return g->m.has_flag( flag_BLOCK_WIND, location ); + return g->m.has_flag( "BLOCK_WIND", location ); } // Description of Wind Speed - https://en.wikipedia.org/wiki/Beaufort_scale diff --git a/tests/comestible_test.cpp b/tests/comestible_test.cpp index d3d2a06781ab6..4d51d5285829c 100644 --- a/tests/comestible_test.cpp +++ b/tests/comestible_test.cpp @@ -17,7 +17,6 @@ #include "optional.h" #include "string_id.h" #include "value_ptr.h" -#include "cata_string_consts.h" struct all_stats { statistics calories; @@ -125,7 +124,7 @@ TEST_CASE( "recipe_permutations", "[recipe]" ) const recipe &recipe_obj = recipe_pair.first.obj(); item res_it = food_or_food_container( recipe_obj.create_result() ); const bool is_food = res_it.is_food(); - const bool has_override = res_it.has_flag( flag_NUTRIENT_OVERRIDE ); + const bool has_override = res_it.has_flag( "NUTRIENT_OVERRIDE" ); if( is_food && !has_override ) { // Collection of kcal values of all ingredient permutations all_stats mystats = run_stats( diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 3c55d4561e34e..b50fa708317a9 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -31,7 +31,6 @@ #include "memory_fast.h" #include "player_helpers.h" -#include "cata_string_consts.h" class Creature; @@ -384,9 +383,9 @@ TEST_CASE( "npc-movement" ) REQUIRE( g->m.passable( p ) ); } if( type == 'R' ) { - REQUIRE( g->m.has_flag( flag_UNSTABLE, p ) ); + REQUIRE( g->m.has_flag( "UNSTABLE", p ) ); } else { - REQUIRE( !g->m.has_flag( flag_UNSTABLE, p ) ); + REQUIRE( !g->m.has_flag( "UNSTABLE", p ) ); } if( type == 'V' || type == 'W' || type == 'M' ) { REQUIRE( g->m.veh_at( p ).part_with_feature( VPFLAG_BOARDABLE, true ).has_value() ); diff --git a/tests/reload_option_test.cpp b/tests/reload_option_test.cpp index 3110a4dc78e4d..4064ee57b4b2c 100644 --- a/tests/reload_option_test.cpp +++ b/tests/reload_option_test.cpp @@ -5,7 +5,6 @@ #include "item.h" #include "item_location.h" #include "avatar.h" -#include "cata_string_consts.h" TEST_CASE( "revolver_reload_option", "[reload],[reload_option],[gun]" ) { @@ -14,7 +13,7 @@ TEST_CASE( "revolver_reload_option", "[reload],[reload_option],[gun]" ) item &gun = dummy.i_add( item( "sw_619", 0, 0 ) ); item &ammo = dummy.i_add( item( "38_special", 0, gun.ammo_capacity() ) ); item_location ammo_location( dummy, &ammo ); - REQUIRE( gun.has_flag( flag_RELOAD_ONE ) ); + REQUIRE( gun.has_flag( "RELOAD_ONE" ) ); REQUIRE( gun.ammo_remaining() == 0 ); const item::reload_option gun_option( &dummy, &gun, &gun, ammo_location ); diff --git a/tests/reloading_test.cpp b/tests/reloading_test.cpp index 110dad8759f3b..09d8aa5da8d79 100644 --- a/tests/reloading_test.cpp +++ b/tests/reloading_test.cpp @@ -18,7 +18,6 @@ #include "player_activity.h" #include "type_id.h" #include "value_ptr.h" -#include "cata_string_consts.h" TEST_CASE( "reload_gun_with_integral_magazine", "[reload],[gun]" ) { @@ -61,7 +60,7 @@ TEST_CASE( "reload_gun_with_integral_magazine_using_speedloader", "[reload],[gun REQUIRE( gun.magazine_integral() ); REQUIRE( loader_pos != INT_MIN ); REQUIRE( speedloader.ammo_remaining() == 0 ); - REQUIRE( speedloader.has_flag( flag_SPEEDLOADER ) ); + REQUIRE( speedloader.has_flag( "SPEEDLOADER" ) ); bool speedloader_success = speedloader.reload( dummy, item_location( dummy, &ammo ), ammo.charges ); diff --git a/tests/vehicle_turrets_test.cpp b/tests/vehicle_turrets_test.cpp index 0bd67ad94903d..397a209d31dff 100644 --- a/tests/vehicle_turrets_test.cpp +++ b/tests/vehicle_turrets_test.cpp @@ -19,14 +19,13 @@ #include "units.h" #include "type_id.h" #include "point.h" -#include "cata_string_consts.h" static std::vector turret_types() { std::vector res; for( const auto &e : vpart_info::all() ) { - if( e.second.has_flag( flag_TURRET ) ) { + if( e.second.has_flag( "TURRET" ) ) { res.push_back( &e.second ); } }