From 508a3ad82c9e20092ede373cdff7ec8d4ed9e881 Mon Sep 17 00:00:00 2001 From: hop311 Date: Thu, 6 Jun 2024 23:22:24 +0100 Subject: Use separate MapDefinition and MapInstance --- extension/src/openvic-extension/singletons/ModelSingleton.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extension/src/openvic-extension/singletons/ModelSingleton.cpp') diff --git a/extension/src/openvic-extension/singletons/ModelSingleton.cpp b/extension/src/openvic-extension/singletons/ModelSingleton.cpp index 152a7f4..091bd8a 100644 --- a/extension/src/openvic-extension/singletons/ModelSingleton.cpp +++ b/extension/src/openvic-extension/singletons/ModelSingleton.cpp @@ -311,7 +311,7 @@ TypedArray ModelSingleton::get_units() const { TypedArray ret; - for (ProvinceInstance const& province : game_singleton->get_game_manager().get_map().get_province_instances()) { + for (ProvinceInstance const& province : game_singleton->get_game_manager().get_map_instance().get_province_instances()) { if (province.get_province_definition().is_water()) { if (!add_unit_dict(province.get_navies(), ret)) { UtilityFunctions::push_error( @@ -445,7 +445,7 @@ TypedArray ModelSingleton::get_buildings() const { TypedArray ret; - for (ProvinceInstance const& province : game_singleton->get_game_manager().get_map().get_province_instances()) { + for (ProvinceInstance const& province : game_singleton->get_game_manager().get_map_instance().get_province_instances()) { if (!province.get_province_definition().is_water()) { for (BuildingInstance const& building : province.get_buildings()) { if (!add_building_dict(building, province, ret)) { -- cgit v1.2.3-56-ga3b1