diff --git a/src/build_reqs.h b/src/build_reqs.h index 66fe94fe69db0..6b08bbf2a3b6e 100644 --- a/src/build_reqs.h +++ b/src/build_reqs.h @@ -40,6 +40,6 @@ struct parameterized_build_reqs { build_reqs get_build_reqs_for_furn_ter_ids( const std::pair, std::map> &changed_ids, - ter_id const &base_ter = t_dirt ); + ter_id const &base_ter = ter_str_id( "t_dirt" ).id() ); #endif // CATA_SRC_BUILD_REQS_H diff --git a/src/map.h b/src/map.h index 691507c8320ec..4c726dafaa315 100644 --- a/src/map.h +++ b/src/map.h @@ -1083,10 +1083,10 @@ class map void make_rubble( const tripoint &p, const furn_id &rubble_type, bool items, const ter_id &floor_type, bool overwrite = false ); void make_rubble( const tripoint &p, const furn_id &rubble_type, bool items ) { - make_rubble( p, rubble_type, items, t_dirt, false ); + make_rubble( p, rubble_type, items, ter_str_id( "t_dirt" ).id(), false ); } void make_rubble( const tripoint &p ) { - make_rubble( p, f_rubble, false, t_dirt, false ); + make_rubble( p, f_rubble, false, ter_str_id( "t_dirt" ).id(), false ); } bool is_outside( const tripoint &p ) const; @@ -2633,7 +2633,7 @@ class fake_map : public tinymap private: std::vector> temp_submaps_; public: - explicit fake_map( const ter_id &ter_type = t_dirt ); + explicit fake_map( const ter_id &ter_type = ter_str_id( "t_dirt" ).id() ); ~fake_map() override; static constexpr int fake_map_z = -OVERMAP_DEPTH; }; diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 39709b65c309d..1356494697264 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -742,12 +742,11 @@ void map_data_common_t::set_groups( std::bitset &bits, } } -ter_id t_null, t_dirt; +ter_id t_null; void set_ter_ids() { t_null = ter_id( "t_null" ); - t_dirt = ter_id( "t_dirt" ); for( const ter_t &elem : terrain_data.get_all() ) { ter_t &ter = const_cast( elem ); diff --git a/src/mapdata.h b/src/mapdata.h index 10d480af2187a..cfb3cb6701e7b 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -698,7 +698,7 @@ t_basalt "t_basalt" */ // NOLINTNEXTLINE(cata-static-int_id-constants) -extern ter_id t_null, t_dirt; +extern ter_id t_null; /* runtime index: furn_id furn_id refers to a position in the furnlist[] where the furn_t struct is stored. See note diff --git a/src/mapgen_functions.h b/src/mapgen_functions.h index a1a01d583e846..a41487861ef74 100644 --- a/src/mapgen_functions.h +++ b/src/mapgen_functions.h @@ -76,7 +76,7 @@ bool apply_construction_marker( const update_mapgen_id &update_mapgen_id, const mapgen_arguments &args, bool mirror_horizontal, bool mirror_vertical, int rotation, bool apply ); std::pair, std::map> get_changed_ids_from_update( - const update_mapgen_id &, const mapgen_arguments &, ter_id const &base_ter = t_dirt ); + const update_mapgen_id &, const mapgen_arguments &, ter_id const &base_ter = ter_str_id( "t_dirt" ).id() ); mapgen_parameters get_map_special_params( const std::string &mapgen_id ); void resolve_regional_terrain_and_furniture( const mapgendata &dat );