diff options
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r-- | src/openvic-simulation/map/Map.cpp | 8 | ||||
-rw-r--r-- | src/openvic-simulation/map/Map.hpp | 3 | ||||
-rw-r--r-- | src/openvic-simulation/map/TerrainType.cpp | 2 |
3 files changed, 2 insertions, 11 deletions
diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp index 777579e..13d0933 100644 --- a/src/openvic-simulation/map/Map.cpp +++ b/src/openvic-simulation/map/Map.cpp @@ -200,14 +200,6 @@ std::vector<Map::shape_pixel_t> const& Map::get_province_shape_image() const { return province_shape_image; } -TerrainTypeManager& Map::get_terrain_type_manager() { - return terrain_type_manager; -} - -TerrainTypeManager const& Map::get_terrain_type_manager() const { - return terrain_type_manager; -} - bool Map::add_mapmode(std::string_view identifier, Mapmode::colour_func_t colour_func) { if (identifier.empty()) { Logger::error("Invalid mapmode identifier - empty!"); diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp index 578b471..61b7b48 100644 --- a/src/openvic-simulation/map/Map.hpp +++ b/src/openvic-simulation/map/Map.hpp @@ -89,8 +89,7 @@ namespace OpenVic { size_t get_width() const; size_t get_height() const; std::vector<shape_pixel_t> const& get_province_shape_image() const; - TerrainTypeManager& get_terrain_type_manager(); - TerrainTypeManager const& get_terrain_type_manager() const; + REF_GETTERS(terrain_type_manager) bool add_region(std::string_view identifier, std::vector<std::string_view> const& province_identifiers); IDENTIFIER_REGISTRY_ACCESSORS(region) diff --git a/src/openvic-simulation/map/TerrainType.cpp b/src/openvic-simulation/map/TerrainType.cpp index 8624cdb..db910ce 100644 --- a/src/openvic-simulation/map/TerrainType.cpp +++ b/src/openvic-simulation/map/TerrainType.cpp @@ -115,7 +115,7 @@ bool TerrainTypeManager::_load_terrain_type_mapping(std::string_view mapping_key bool has_texture = true; bool ret = expect_dictionary_keys( - "type", ONE_EXACTLY, expect_identifier(expect_terrain_type_identifier(assign_variable_callback_pointer(type))), + "type", ONE_EXACTLY, expect_terrain_type_identifier(assign_variable_callback_pointer(type)), "color", ONE_EXACTLY, expect_list_reserve_length(terrain_indicies, expect_uint<TerrainTypeMapping::index_t>( [&terrain_indicies](TerrainTypeMapping::index_t val) -> bool { if (std::find(terrain_indicies.begin(), terrain_indicies.end(), val) == terrain_indicies.end()) { |