diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-17 16:08:11 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-17 16:08:11 +0200 |
commit | 5549753a6ae909b1a65f52a1cc67ef2b5efae55a (patch) | |
tree | 5801afa7f578c830ed4a604640a485223ecd81ec /src/openvic-simulation/map | |
parent | f95902fdd85f86c10b9c300099c67312fc81f11b (diff) |
Futher scaffolding for province positions loading
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r-- | src/openvic-simulation/map/Map.cpp | 6 | ||||
-rw-r--r-- | src/openvic-simulation/map/Map.hpp | 2 | ||||
-rw-r--r-- | src/openvic-simulation/map/Province.cpp | 2 | ||||
-rw-r--r-- | src/openvic-simulation/map/Province.hpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp index 29bec7b..6fbdc4f 100644 --- a/src/openvic-simulation/map/Map.cpp +++ b/src/openvic-simulation/map/Map.cpp @@ -523,10 +523,10 @@ bool Map::load_province_definitions(std::vector<LineObject> const& lines) { return ret; } -bool Map::load_province_positions(ast::NodeCPtr root) { +bool Map::load_province_positions(BuildingManager const& building_manager, ast::NodeCPtr root) { return expect_province_dictionary( - [](Province& province, ast::NodeCPtr node) -> bool { - return province.load_positions(node); + [&building_manager](Province& province, ast::NodeCPtr node) -> bool { + return province.load_positions(building_manager, node); } )(root); } diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp index 0e00055..5cba8da 100644 --- a/src/openvic-simulation/map/Map.hpp +++ b/src/openvic-simulation/map/Map.hpp @@ -114,7 +114,7 @@ namespace OpenVic { NodeTools::node_callback_t expect_province_dictionary(NodeTools::callback_t<Province&, ast::NodeCPtr> callback); bool load_province_definitions(std::vector<ovdl::csv::LineObject> const& lines); - bool load_province_positions(ast::NodeCPtr root); + bool load_province_positions(BuildingManager const& building_manager, ast::NodeCPtr root); bool load_region_file(ast::NodeCPtr root); }; } diff --git a/src/openvic-simulation/map/Province.cpp b/src/openvic-simulation/map/Province.cpp index 5a3543b..775c0a4 100644 --- a/src/openvic-simulation/map/Province.cpp +++ b/src/openvic-simulation/map/Province.cpp @@ -34,7 +34,7 @@ Province::life_rating_t Province::get_life_rating() const { return life_rating; } -bool Province::load_positions(ast::NodeCPtr root) { +bool Province::load_positions(BuildingManager const& building_manager, ast::NodeCPtr root) { // TODO - implement province position loading // (root is the dictionary after the province identifier) return true; diff --git a/src/openvic-simulation/map/Province.hpp b/src/openvic-simulation/map/Province.hpp index d4e34c5..bf407ae 100644 --- a/src/openvic-simulation/map/Province.hpp +++ b/src/openvic-simulation/map/Province.hpp @@ -43,7 +43,7 @@ namespace OpenVic { bool get_has_region() const; bool get_water() const; life_rating_t get_life_rating() const; - bool load_positions(ast::NodeCPtr root); + bool load_positions(BuildingManager const& building_manager, ast::NodeCPtr root); bool add_building(Building&& building); IDENTIFIER_REGISTRY_ACCESSORS(Building, building) |