From 5a032d01ea1813b45d4aaca7eaa2ad51154688df Mon Sep 17 00:00:00 2001 From: Ramza13 <52087122+Ramza13@users.noreply.github.com> Date: Thu, 20 Feb 2020 15:15:53 -0500 Subject: [PATCH 1/2] move ter_str_ids --- src/activity_handlers.cpp | 8 +- src/cata_string_consts.h | 110 ++++++++++++++++++++++- src/iexamine.cpp | 14 +-- src/iuse.cpp | 12 +-- src/map.cpp | 16 ++-- src/mapgen_functions.cpp | 10 +-- src/mission_start.cpp | 2 +- src/monattack.cpp | 2 +- src/monster.cpp | 2 +- src/overmap_ui.cpp | 2 +- src/sounds.cpp | 180 +++++++++++++++++++------------------- 11 files changed, 232 insertions(+), 126 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 6fb4a357098d9..6835e56dbca58 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1504,19 +1504,19 @@ void activity_handlers::forage_finish( player_activity *act, player *p ) switch( season_of_year( calendar::turn ) ) { case SPRING: loc = "forage_spring"; - next_ter = ter_str_id( "t_underbrush_harvested_spring" ); + next_ter = ter_underbrush_harvested_spring; break; case SUMMER: loc = "forage_summer"; - next_ter = ter_str_id( "t_underbrush_harvested_summer" ); + next_ter = ter_underbrush_harvested_summer; break; case AUTUMN: loc = "forage_autumn"; - next_ter = ter_str_id( "t_underbrush_harvested_autumn" ); + next_ter = ter_underbrush_harvested_autumn; break; case WINTER: loc = "forage_winter"; - next_ter = ter_str_id( "t_underbrush_harvested_winter" ); + next_ter = ter_underbrush_harvested_winter; break; default: debugmsg( "Invalid season" ); diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h index 1fb7906d9bea7..2e4b9e68229bd 100644 --- a/src/cata_string_consts.h +++ b/src/cata_string_consts.h @@ -921,6 +921,7 @@ static const mtype_id mon_zombie_technician( "mon_zombie_technician" ); static const mtype_id mon_zombie_tough( "mon_zombie_tough" ); static const mtype_id mon_zombie_waif( "mon_zombie_waif" ); + 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" ); @@ -1203,6 +1204,7 @@ static const std::string flag_ORGANIC( "ORGANIC" ); static const std::string flag_OUTER( "OUTER" ); static const std::string flag_OVERSIZE( "OVERSIZE" ); static const std::string flag_PARTIAL_DEAF( "PARTIAL_DEAF" ); +static const std::string flag_PERMEABLE( "PERMEABLE" ); static const std::string flag_PERPETUAL( "PERPETUAL" ); static const std::string flag_PERSONAL( "PERSONAL" ); static const std::string flag_PLACE_ITEM( "PLACE_ITEM" ); @@ -1242,6 +1244,7 @@ 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( "RAMP" ); 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" ); @@ -1368,6 +1371,7 @@ static const std::string flag_WORKBENCH( "WORKBENCH" ); static const std::string flag_WRITE_MESSAGE( "WRITE_MESSAGE" ); static const std::string flag_YOUNG( "YOUNG" ); + static const skill_id skill_archery( "archery" ); static const skill_id skill_barter( "barter" ); static const skill_id skill_bashing( "bashing" ); @@ -1508,15 +1512,117 @@ static const matec_id matec_WBLOCK_2( "WBLOCK_2" ); static const matec_id matec_WBLOCK_3( "WBLOCK_3" ); static const matec_id matec_WHIP_DISARM( "WHIP_DISARM" ); + +static const ter_str_id ter_bridge( "t_bridge" ); +static const ter_str_id ter_chainfence( "t_chainfence" ); +static const ter_str_id ter_clay( "t_clay" ); +static const ter_str_id ter_claymound( "t_claymound" ); +static const ter_str_id ter_conveyor( "t_conveyor" ); static const ter_str_id ter_dirt( "t_dirt" ); +static const ter_str_id ter_dirtfloor( "t_dirtfloor" ); +static const ter_str_id ter_dirtmound( "t_dirtmound" ); +static const ter_str_id ter_dirtmoundfloor( "t_dirtmoundfloor" ); +static const ter_str_id ter_elevator( "t_elevator" ); +static const ter_str_id ter_gas_pump( "t_gas_pump" ); +static const ter_str_id ter_gas_pump_a( "t_gas_pump_a" ); +static const ter_str_id ter_gas_tank( "t_gas_tank" ); +static const ter_str_id ter_golf_hole( "t_golf_hole" ); +static const ter_str_id ter_grass( "t_grass" ); static const ter_str_id ter_grass_dead( "t_grass_dead" ); +static const ter_str_id ter_grass_golf( "t_grass_golf" ); +static const ter_str_id ter_grass_long( "t_grass_long" ); +static const ter_str_id ter_grass_tall( "t_grass_tall" ); +static const ter_str_id ter_grass_white( "t_grass_white" ); +static const ter_str_id ter_grate( "t_grate" ); +static const ter_str_id ter_grave( "t_grave" ); +static const ter_str_id ter_grave_new( "t_grave_new" ); +static const ter_str_id ter_guardrail_bg_dp( "t_guardrail_bg_dp" ); +static const ter_str_id ter_machinery_electronic( "t_machinery_electronic" ); +static const ter_str_id ter_machinery_heavy( "t_machinery_heavy" ); +static const ter_str_id ter_machinery_light( "t_machinery_light" ); +static const ter_str_id ter_machinery_old( "t_machinery_old" ); +static const ter_str_id ter_metal_floor( "t_metal_floor" ); +static const ter_str_id ter_moss( "t_moss" ); +static const ter_str_id ter_nanofab_body( "t_nanofab_body" ); +static const ter_str_id ter_ov_smreb_cage( "t_ov_smreb_cage" ); +static const ter_str_id ter_palisade_gate_o( "t_palisade_gate_o" ); +static const ter_str_id ter_pit( "t_pit" ); +static const ter_str_id ter_pit_corpsed( "t_pit_corpsed" ); +static const ter_str_id ter_pit_covered( "t_pit_covered" ); +static const ter_str_id ter_pit_glass( "t_pit_glass" ); +static const ter_str_id ter_pit_shallow( "t_pit_shallow" ); +static const ter_str_id ter_pit_spiked( "t_pit_spiked" ); +static const ter_str_id ter_pit_spiked_covered( "t_pit_spiked_covered" ); +static const ter_str_id ter_plut_generator( "t_plut_generator" ); +static const ter_str_id ter_railroad_rubble( "t_railroad_rubble" ); +static const ter_str_id ter_railroad_tie( "t_railroad_tie" ); +static const ter_str_id ter_railroad_tie_d( "t_railroad_tie_d" ); +static const ter_str_id ter_railroad_tie_d1( "t_railroad_tie_d1" ); +static const ter_str_id ter_railroad_tie_d2( "t_railroad_tie_d2" ); +static const ter_str_id ter_railroad_tie_h( "t_railroad_tie_h" ); +static const ter_str_id ter_railroad_tie_v( "t_railroad_tie_v" ); +static const ter_str_id ter_railroad_track( "t_railroad_track" ); +static const ter_str_id ter_railroad_track_d( "t_railroad_track_d" ); +static const ter_str_id ter_railroad_track_d_on_tie( "t_railroad_track_d_on_tie" ); +static const ter_str_id ter_railroad_track_d1( "t_railroad_track_d1" ); +static const ter_str_id ter_railroad_track_d2( "t_railroad_track_d2" ); +static const ter_str_id ter_railroad_track_h( "t_railroad_track_h" ); +static const ter_str_id ter_railroad_track_h_on_tie( "t_railroad_track_h_on_tie" ); +static const ter_str_id ter_railroad_track_on_tie( "t_railroad_track_on_tie" ); +static const ter_str_id ter_railroad_track_v( "t_railroad_track_v" ); +static const ter_str_id ter_railroad_track_v_on_tie( "t_railroad_track_v_on_tie" ); +static const ter_str_id ter_rootcellar( "t_rootcellar" ); +static const ter_str_id ter_sand( "t_sand" ); +static const ter_str_id ter_sandbox( "t_sandbox" ); +static const ter_str_id ter_sandmound( "t_sandmound" ); +static const ter_str_id ter_sewage( "t_sewage" ); +static const ter_str_id ter_shrub( "t_shrub" ); +static const ter_str_id ter_shrub_blackberry( "t_shrub_blackberry" ); +static const ter_str_id ter_shrub_blackberry_harvested( "t_shrub_blackberry_harvested" ); +static const ter_str_id ter_shrub_blueberry( "t_shrub_blueberry" ); +static const ter_str_id ter_shrub_blueberry_harvested( "t_shrub_blueberry_harvested" ); +static const ter_str_id ter_shrub_grape( "t_shrub_grape" ); +static const ter_str_id ter_shrub_grape_harvested( "t_shrub_grape_harvested" ); +static const ter_str_id ter_shrub_huckleberry( "t_shrub_huckleberry" ); +static const ter_str_id ter_shrub_huckleberry_harvested( "t_shrub_huckleberry_harvested" ); +static const ter_str_id ter_shrub_hydrangea( "t_shrub_hydrangea" ); +static const ter_str_id ter_shrub_hydrangea_harvested( "t_shrub_hydrangea_harvested" ); +static const ter_str_id ter_shrub_lilac( "t_shrub_lilac" ); +static const ter_str_id ter_shrub_lilac_harvested( "t_shrub_lilac_harvested" ); +static const ter_str_id ter_shrub_peanut( "t_shrub_peanut" ); +static const ter_str_id ter_shrub_peanut_harvested( "t_shrub_peanut_harvested" ); +static const ter_str_id ter_shrub_raspberry( "t_shrub_raspberry" ); +static const ter_str_id ter_shrub_raspberry_harvested( "t_shrub_raspberry_harvested" ); +static const ter_str_id ter_shrub_rose( "t_shrub_rose" ); +static const ter_str_id ter_shrub_rose_harvested( "t_shrub_rose_harvested" ); +static const ter_str_id ter_shrub_strawberry( "t_shrub_strawberry" ); +static const ter_str_id ter_shrub_strawberry_harvested( "t_shrub_strawberry_harvested" ); +static const ter_str_id ter_slide( "t_slide" ); static const ter_str_id ter_stump( "t_stump" ); +static const ter_str_id ter_swater_dp( "t_swater_dp" ); +static const ter_str_id ter_swater_sh( "t_swater_sh" ); +static const ter_str_id ter_tree_birch_harvested( "t_tree_birch_harvested" ); static const ter_str_id ter_tree_dead( "t_tree_dead" ); static const ter_str_id ter_tree_deadpine( "t_tree_deadpine" ); -static const ter_str_id ter_tree_birch_harvested( "t_tree_birch_harvested" ); -static const ter_str_id ter_tree_willow_harvested( "t_tree_willow_harvested" ); static const ter_str_id ter_tree_hickory_dead( "t_tree_hickory_dead" ); +static const ter_str_id ter_tree_willow_harvested( "t_tree_willow_harvested" ); static const ter_str_id ter_trunk( "t_trunk" ); +static const ter_str_id ter_underbrush( "t_underbrush" ); +static const ter_str_id ter_underbrush_harvested_autumn( "t_underbrush_harvested_autumn" ); +static const ter_str_id ter_underbrush_harvested_spring( "t_underbrush_harvested_spring" ); +static const ter_str_id ter_underbrush_harvested_summer( "t_underbrush_harvested_summer" ); +static const ter_str_id ter_underbrush_harvested_winter( "t_underbrush_harvested_winter" ); +static const ter_str_id ter_utility_light( "t_utility_light" ); +static const ter_str_id ter_water_dp( "t_water_dp" ); +static const ter_str_id ter_water_moving_dp( "t_water_moving_dp" ); +static const ter_str_id ter_water_moving_sh( "t_water_moving_sh" ); +static const ter_str_id ter_water_pool( "t_water_pool" ); +static const ter_str_id ter_water_sh( "t_water_sh" ); + + +static const oter_str_id oter_forest( "forest" ); +static const oter_str_id oter_forest_thick( "forest_thick" ); + static const std::string part_location_structure( "structure" ); static const std::string part_location_center( "center" ); diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 834196bc4e720..28c54448a62db 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -149,7 +149,7 @@ void iexamine::nanofab( player &p, const tripoint &examp ) bool table_exists = false; tripoint spawn_point; for( const auto &valid_location : g->m.points_in_radius( examp, 1 ) ) { - if( g->m.ter( valid_location ) == ter_str_id( "t_nanofab_body" ) ) { + if( g->m.ter( valid_location ) == ter_nanofab_body ) { spawn_point = valid_location; table_exists = true; break; @@ -3788,7 +3788,7 @@ static int getNearPumpCount( const tripoint &p ) int result = 0; for( const tripoint &tmp : g->m.points_in_radius( p, 12 ) ) { const auto t = g->m.ter( tmp ); - if( t == ter_str_id( "t_gas_pump" ) || t == ter_str_id( "t_gas_pump_a" ) ) { + if( t == ter_gas_pump || t == ter_gas_pump_a ) { result++; } } @@ -3802,7 +3802,7 @@ cata::optional iexamine::getNearFilledGasTank( const tripoint ¢er, gas_units = 0; for( const tripoint &tmp : g->m.points_in_radius( center, SEEX * 2 ) ) { - if( g->m.ter( tmp ) != ter_str_id( "t_gas_tank" ) ) { + if( g->m.ter( tmp ) != ter_gas_tank ) { continue; } @@ -3908,7 +3908,7 @@ cata::optional iexamine::getGasPumpByNumber( const tripoint &p, int nu int k = 0; for( const tripoint &tmp : g->m.points_in_radius( p, 12 ) ) { const auto t = g->m.ter( tmp ); - if( ( t == ter_str_id( "t_gas_pump" ) || t == ter_str_id( "t_gas_pump_a" ) ) && number == k++ ) { + if( ( t == ter_gas_pump || t == ter_gas_pump_a ) && number == k++ ) { return tmp; } } @@ -3972,11 +3972,11 @@ static void turnOnSelectedPump( const tripoint &p, int number ) int k = 0; for( const tripoint &tmp : g->m.points_in_radius( p, 12 ) ) { const auto t = g->m.ter( tmp ); - if( t == ter_str_id( "t_gas_pump" ) || t == ter_str_id( "t_gas_pump_a" ) ) { + if( t == ter_gas_pump || t == ter_gas_pump_a ) { if( number == k++ ) { - g->m.ter_set( tmp, ter_str_id( "t_gas_pump_a" ) ); + g->m.ter_set( tmp, ter_gas_pump_a ); } else { - g->m.ter_set( tmp, ter_str_id( "t_gas_pump" ) ); + g->m.ter_set( tmp, ter_gas_pump ); } } } diff --git a/src/iuse.cpp b/src/iuse.cpp index a75be7903300a..207f232e2ae20 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -149,14 +149,14 @@ static extended_photo_def photo_def_for_camera_point( const tripoint &aim_point, std::vector &monster_vec, std::vector &player_vec ); static const std::vector camera_ter_whitelist_flags = { - "HIDE_PLACE", "FUNGUS", "TREE", "PERMEABLE", "SHRUB", - "PLACE_ITEM", "GROWTH_HARVEST", "GROWTH_MATURE", "GOES_UP", - "GOES_DOWN", "RAMP", "SHARP", "SIGN", "CLIMBABLE" + flag_HIDE_PLACE, flag_FUNGUS, flag_TREE, flag_PERMEABLE, flag_SHRUB, + flag_PLACE_ITEM, flag_GROWTH_HARVEST, flag_GROWTH_MATURE, flag_GOES_UP, + flag_GOES_DOWN, flag_RAMP, flag_SHARP, flag_SIGN, flag_CLIMBABLE }; static const std::vector camera_ter_whitelist_types = { - ter_str_id( "t_pit_covered" ), ter_str_id( "t_grave_new" ), ter_str_id( "t_grave" ), ter_str_id( "t_pit" ), - ter_str_id( "t_pit_shallow" ), ter_str_id( "t_pit_corpsed" ), ter_str_id( "t_pit_spiked" ), - ter_str_id( "t_pit_spiked_covered" ), ter_str_id( "t_pit_glass" ), ter_str_id( "t_pit_glass" ), ter_str_id( "t_utility_light" ) + ter_pit_covered, ter_grave_new, ter_grave, ter_pit, + ter_pit_shallow, ter_pit_corpsed, ter_pit_spiked, + ter_pit_spiked_covered, ter_pit_glass, ter_pit_glass, ter_utility_light }; void remove_radio_mod( item &it, player &p ) diff --git a/src/map.cpp b/src/map.cpp index 8b03f010f952e..9340a784a1f91 100755 --- a/src/map.cpp +++ b/src/map.cpp @@ -6972,13 +6972,13 @@ void map::rad_scorch( const tripoint &p, const time_duration &time_since_last_ac const ter_id tid = ter( p ); // TODO: De-hardcode this static const std::map dies_into {{ - {t_grass, ter_str_id( "t_dirt" )}, - {t_tree_young, ter_str_id( "t_dirt" )}, - {t_tree_pine, ter_str_id( "t_tree_deadpine" )}, - {t_tree_birch, ter_str_id( "t_tree_birch_harvested" )}, - {t_tree_willow, ter_str_id( "t_tree_willow_harvested" )}, - {t_tree_hickory, ter_str_id( "t_tree_hickory_dead" )}, - {t_tree_hickory_harvested, ter_str_id( "t_tree_hickory_dead" )}, + {t_grass, ter_dirt}, + {t_tree_young, ter_dirt}, + {t_tree_pine, ter_tree_deadpine}, + {t_tree_birch, ter_tree_birch_harvested}, + {t_tree_willow, ter_tree_willow_harvested}, + {t_tree_hickory, ter_tree_hickory_dead}, + {t_tree_hickory_harvested, ter_tree_hickory_dead}, }}; const auto iter = dies_into.find( tid ); @@ -6991,7 +6991,7 @@ void map::rad_scorch( const tripoint &p, const time_duration &time_since_last_ac if( tr.has_flag( flag_SHRUB ) ) { ter_set( p, t_dirt ); } else if( tr.has_flag( flag_TREE ) ) { - ter_set( p, ter_str_id( "t_tree_dead" ) ); + ter_set( p, ter_tree_dead ); } } diff --git a/src/mapgen_functions.cpp b/src/mapgen_functions.cpp index 80f46030fbe7c..901576ad030ef 100644 --- a/src/mapgen_functions.cpp +++ b/src/mapgen_functions.cpp @@ -1975,7 +1975,7 @@ void mapgen_cave( mapgendata &dat ) m->place_spawns( GROUP_CAVE, 2, point( 6, 6 ), point( 18, 18 ), 1.0 ); } else { // We're above ground! // First, draw a forest - mapgendata forest_mapgen_dat( dat, oter_str_id( "forest" ).id() ); + mapgendata forest_mapgen_dat( dat, oter_forest.id() ); mapgen_forest( forest_mapgen_dat ); // Clear the center with some rocks square( m, t_rock, SEEX - 6, SEEY - 6, SEEX + 5, SEEY + 5 ); @@ -2936,7 +2936,7 @@ void mapgen_forest( mapgendata &dat ) void mapgen_forest_trail_straight( mapgendata &dat ) { map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_str_id( "forest_thick" ).id() ); + mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); mapgen_forest( forest_mapgen_dat ); const auto center_offset = [&dat]() { @@ -2974,7 +2974,7 @@ void mapgen_forest_trail_straight( mapgendata &dat ) void mapgen_forest_trail_curved( mapgendata &dat ) { map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_str_id( "forest_thick" ).id() ); + mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); mapgen_forest( forest_mapgen_dat ); const auto center_offset = [&dat]() { @@ -3020,7 +3020,7 @@ void mapgen_forest_trail_curved( mapgendata &dat ) void mapgen_forest_trail_tee( mapgendata &dat ) { map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_str_id( "forest_thick" ).id() ); + mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); mapgen_forest( forest_mapgen_dat ); const auto center_offset = [&dat]() { @@ -3065,7 +3065,7 @@ void mapgen_forest_trail_tee( mapgendata &dat ) void mapgen_forest_trail_four_way( mapgendata &dat ) { map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_str_id( "forest_thick" ).id() ); + mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); mapgen_forest( forest_mapgen_dat ); const auto center_offset = [&dat]() { diff --git a/src/mission_start.cpp b/src/mission_start.cpp index 1e947909cd1f8..b6395f05c76c0 100644 --- a/src/mission_start.cpp +++ b/src/mission_start.cpp @@ -564,7 +564,7 @@ void mission_start::ranch_scavenger_3( mission *miss ) bay.spawn_item( point( 17, 21 ), "wheel_wide" ); bay.spawn_item( point( 23, 18 ), "v8_combustion" ); bay.furn_set( point( 23, 17 ), furn_str_id( "f_arcade_machine" ) ); - bay.ter_set( point( 23, 16 ), ter_str_id( "t_machinery_light" ) ); + bay.ter_set( point( 23, 16 ), ter_machinery_light ); bay.furn_set( point( 20, 21 ), f_woodstove ); bay.save(); diff --git a/src/monattack.cpp b/src/monattack.cpp index 948a6b4d38926..4aa522dddebdd 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -3376,7 +3376,7 @@ bool mattack::searchlight( monster *z ) for( int x = zposx - 24; x < zposx + 24; x++ ) { for( int y = zposy - 24; y < zposy + 24; y++ ) { tripoint dest( x, y, z->posz() ); - if( g->m.ter( dest ) == ter_str_id( "t_plut_generator" ) ) { + if( g->m.ter( dest ) == ter_plut_generator ) { generator_ok = true; } } diff --git a/src/monster.cpp b/src/monster.cpp index 1a1594433b278..5c839e393c5ed 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -2001,7 +2001,7 @@ void monster::process_turn() explosion_handler::emp_blast( zap ); // Fries electronics due to the intensity of the field } const auto t = g->m.ter( zap ); - if( t == ter_str_id( "t_gas_pump" ) || t == ter_str_id( "t_gas_pump_a" ) ) { + if( t == ter_gas_pump || t == ter_gas_pump_a ) { if( one_in( 4 ) ) { explosion_handler::explosion( pos(), 40, 0.8, true ); if( player_sees ) { diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index 9af3ee84b407c..1287fb88ca9e0 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -478,7 +478,7 @@ void draw( const catacurses::window &w, const catacurses::window &wbar, const tr // Whether showing hordes is currently enabled const bool showhordes = uistate.overmap_show_hordes; - const oter_id forest = oter_str_id( "forest" ).id(); + const oter_id forest = oter_forest.id(); std::string sZoneName; tripoint tripointZone = tripoint( -1, -1, -1 ); diff --git a/src/sounds.cpp b/src/sounds.cpp index 7f3415b75b305..376e658b623ba 100644 --- a/src/sounds.cpp +++ b/src/sounds.cpp @@ -1249,104 +1249,104 @@ void sfx::do_footstep() int heard_volume = sfx::get_heard_volume( g->u.pos() ); const auto terrain = g->m.ter( g->u.pos() ).id(); static const std::set grass = { - ter_str_id( "t_grass" ), - ter_str_id( "t_shrub" ), - ter_str_id( "t_shrub_peanut" ), - ter_str_id( "t_shrub_peanut_harvested" ), - ter_str_id( "t_shrub_blueberry" ), - ter_str_id( "t_shrub_blueberry_harvested" ), - ter_str_id( "t_shrub_strawberry" ), - ter_str_id( "t_shrub_strawberry_harvested" ), - ter_str_id( "t_shrub_blackberry" ), - ter_str_id( "t_shrub_blackberry_harvested" ), - ter_str_id( "t_shrub_huckleberry" ), - ter_str_id( "t_shrub_huckleberry_harvested" ), - ter_str_id( "t_shrub_raspberry" ), - ter_str_id( "t_shrub_raspberry_harvested" ), - ter_str_id( "t_shrub_grape" ), - ter_str_id( "t_shrub_grape_harvested" ), - ter_str_id( "t_shrub_rose" ), - ter_str_id( "t_shrub_rose_harvested" ), - ter_str_id( "t_shrub_hydrangea" ), - ter_str_id( "t_shrub_hydrangea_harvested" ), - ter_str_id( "t_shrub_lilac" ), - ter_str_id( "t_shrub_lilac_harvested" ), - ter_str_id( "t_underbrush" ), - ter_str_id( "t_underbrush_harvested_spring" ), - ter_str_id( "t_underbrush_harvested_summer" ), - ter_str_id( "t_underbrush_harvested_autumn" ), - ter_str_id( "t_underbrush_harvested_winter" ), - ter_str_id( "t_moss" ), - ter_str_id( "t_grass_white" ), - ter_str_id( "t_grass_long" ), - ter_str_id( "t_grass_tall" ), - ter_str_id( "t_grass_dead" ), - ter_str_id( "t_grass_golf" ), - ter_str_id( "t_golf_hole" ), - ter_str_id( "t_trunk" ), - ter_str_id( "t_stump" ), + ter_grass, + ter_shrub, + ter_shrub_peanut, + ter_shrub_peanut_harvested, + ter_shrub_blueberry, + ter_shrub_blueberry_harvested, + ter_shrub_strawberry, + ter_shrub_strawberry_harvested, + ter_shrub_blackberry, + ter_shrub_blackberry_harvested, + ter_shrub_huckleberry, + ter_shrub_huckleberry_harvested, + ter_shrub_raspberry, + ter_shrub_raspberry_harvested, + ter_shrub_grape, + ter_shrub_grape_harvested, + ter_shrub_rose, + ter_shrub_rose_harvested, + ter_shrub_hydrangea, + ter_shrub_hydrangea_harvested, + ter_shrub_lilac, + ter_shrub_lilac_harvested, + ter_underbrush, + ter_underbrush_harvested_spring, + ter_underbrush_harvested_summer, + ter_underbrush_harvested_autumn, + ter_underbrush_harvested_winter, + ter_moss, + ter_grass_white, + ter_grass_long, + ter_grass_tall, + ter_grass_dead, + ter_grass_golf, + ter_golf_hole, + ter_trunk, + ter_stump, }; static const std::set dirt = { - ter_str_id( "t_dirt" ), - ter_str_id( "t_dirtmound" ), - ter_str_id( "t_dirtmoundfloor" ), - ter_str_id( "t_sand" ), - ter_str_id( "t_clay" ), - ter_str_id( "t_dirtfloor" ), - ter_str_id( "t_palisade_gate_o" ), - ter_str_id( "t_sandbox" ), - ter_str_id( "t_claymound" ), - ter_str_id( "t_sandmound" ), - ter_str_id( "t_rootcellar" ), - ter_str_id( "t_railroad_rubble" ), - ter_str_id( "t_railroad_track" ), - ter_str_id( "t_railroad_track_h" ), - ter_str_id( "t_railroad_track_v" ), - ter_str_id( "t_railroad_track_d" ), - ter_str_id( "t_railroad_track_d1" ), - ter_str_id( "t_railroad_track_d2" ), - ter_str_id( "t_railroad_tie" ), - ter_str_id( "t_railroad_tie_d" ), - ter_str_id( "t_railroad_tie_d" ), - ter_str_id( "t_railroad_tie_h" ), - ter_str_id( "t_railroad_tie_v" ), - ter_str_id( "t_railroad_tie_d" ), - ter_str_id( "t_railroad_track_on_tie" ), - ter_str_id( "t_railroad_track_h_on_tie" ), - ter_str_id( "t_railroad_track_v_on_tie" ), - ter_str_id( "t_railroad_track_d_on_tie" ), - ter_str_id( "t_railroad_tie" ), - ter_str_id( "t_railroad_tie_h" ), - ter_str_id( "t_railroad_tie_v" ), - ter_str_id( "t_railroad_tie_d1" ), - ter_str_id( "t_railroad_tie_d2" ), + ter_dirt, + ter_dirtmound, + ter_dirtmoundfloor, + ter_sand, + ter_clay, + ter_dirtfloor, + ter_palisade_gate_o, + ter_sandbox, + ter_claymound, + ter_sandmound, + ter_rootcellar, + ter_railroad_rubble, + ter_railroad_track, + ter_railroad_track_h, + ter_railroad_track_v, + ter_railroad_track_d, + ter_railroad_track_d1, + ter_railroad_track_d2, + ter_railroad_tie, + ter_railroad_tie_d, + ter_railroad_tie_d, + ter_railroad_tie_h, + ter_railroad_tie_v, + ter_railroad_tie_d, + ter_railroad_track_on_tie, + ter_railroad_track_h_on_tie, + ter_railroad_track_v_on_tie, + ter_railroad_track_d_on_tie, + ter_railroad_tie, + ter_railroad_tie_h, + ter_railroad_tie_v, + ter_railroad_tie_d1, + ter_railroad_tie_d2, }; static const std::set metal = { - ter_str_id( "t_ov_smreb_cage" ), - ter_str_id( "t_metal_floor" ), - ter_str_id( "t_grate" ), - ter_str_id( "t_bridge" ), - ter_str_id( "t_elevator" ), - ter_str_id( "t_guardrail_bg_dp" ), - ter_str_id( "t_slide" ), - ter_str_id( "t_conveyor" ), - ter_str_id( "t_machinery_light" ), - ter_str_id( "t_machinery_heavy" ), - ter_str_id( "t_machinery_old" ), - ter_str_id( "t_machinery_electronic" ), + ter_ov_smreb_cage, + ter_metal_floor, + ter_grate, + ter_bridge, + ter_elevator, + ter_guardrail_bg_dp, + ter_slide, + ter_conveyor, + ter_machinery_light, + ter_machinery_heavy, + ter_machinery_old, + ter_machinery_electronic, }; static const std::set water = { - ter_str_id( "t_water_moving_sh" ), - ter_str_id( "t_water_moving_dp" ), - ter_str_id( "t_water_sh" ), - ter_str_id( "t_water_dp" ), - ter_str_id( "t_swater_sh" ), - ter_str_id( "t_swater_dp" ), - ter_str_id( "t_water_pool" ), - ter_str_id( "t_sewage" ), + ter_water_moving_sh, + ter_water_moving_dp, + ter_water_sh, + ter_water_dp, + ter_swater_sh, + ter_swater_dp, + ter_water_pool, + ter_sewage, }; static const std::set chain_fence = { - ter_str_id( "t_chainfence" ), + ter_chainfence, }; if( !g->u.wearing_something_on( bp_foot_l ) ) { play_variant_sound( "plmove", "walk_barefoot", heard_volume, 0, 0.8, 1.2 ); From 479400c453da8a762ea926e9cba199b6b6f2c7f2 Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Fri, 21 Feb 2020 01:43:03 +0300 Subject: [PATCH 2/2] Update cata_string_consts.h --- src/cata_string_consts.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h index 2e4b9e68229bd..b770d2ce27d81 100644 --- a/src/cata_string_consts.h +++ b/src/cata_string_consts.h @@ -921,7 +921,6 @@ static const mtype_id mon_zombie_technician( "mon_zombie_technician" ); static const mtype_id mon_zombie_tough( "mon_zombie_tough" ); static const mtype_id mon_zombie_waif( "mon_zombie_waif" ); - 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" ); @@ -1371,7 +1370,6 @@ static const std::string flag_WORKBENCH( "WORKBENCH" ); static const std::string flag_WRITE_MESSAGE( "WRITE_MESSAGE" ); static const std::string flag_YOUNG( "YOUNG" ); - static const skill_id skill_archery( "archery" ); static const skill_id skill_barter( "barter" ); static const skill_id skill_bashing( "bashing" ); @@ -1512,7 +1510,6 @@ static const matec_id matec_WBLOCK_2( "WBLOCK_2" ); static const matec_id matec_WBLOCK_3( "WBLOCK_3" ); static const matec_id matec_WHIP_DISARM( "WHIP_DISARM" ); - static const ter_str_id ter_bridge( "t_bridge" ); static const ter_str_id ter_chainfence( "t_chainfence" ); static const ter_str_id ter_clay( "t_clay" ); @@ -1619,11 +1616,9 @@ static const ter_str_id ter_water_moving_sh( "t_water_moving_sh" ); static const ter_str_id ter_water_pool( "t_water_pool" ); static const ter_str_id ter_water_sh( "t_water_sh" ); - static const oter_str_id oter_forest( "forest" ); static const oter_str_id oter_forest_thick( "forest_thick" ); - static const std::string part_location_structure( "structure" ); static const std::string part_location_center( "center" ); static const std::string part_location_onroof( "on_roof" );