aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/ModelSingleton.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-06-07 00:22:24 +0200
committer hop311 <hop3114@gmail.com>2024-06-13 21:22:11 +0200
commit508a3ad82c9e20092ede373cdff7ec8d4ed9e881 (patch)
tree3eb84f934534099aa89cfcbe67fd1098869a1ef0 /extension/src/openvic-extension/singletons/ModelSingleton.cpp
parent3dd525092e3a6027f20f0a1afdf8e871a9eecd34 (diff)
Use separate MapDefinition and MapInstancemap-instance
Diffstat (limited to 'extension/src/openvic-extension/singletons/ModelSingleton.cpp')
-rw-r--r--extension/src/openvic-extension/singletons/ModelSingleton.cpp4
1 files changed, 2 insertions, 2 deletions
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<Dictionary> ModelSingleton::get_units() const {
TypedArray<Dictionary> 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<Dictionary> ModelSingleton::get_buildings() const {
TypedArray<Dictionary> 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)) {