From 86dd609511b643a6556c42622ec891c092366c66 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Fri, 29 Sep 2023 00:08:15 +0100 Subject: Updated SIM submodule + building info wrapper --- extension/deps/openvic-simulation | 2 +- extension/src/openvic-extension/GameSingleton.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/deps/openvic-simulation b/extension/deps/openvic-simulation index 8256fe4..0479592 160000 --- a/extension/deps/openvic-simulation +++ b/extension/deps/openvic-simulation @@ -1 +1 @@ -Subproject commit 8256fe4c9468e23f5397d92796a741893b9469bc +Subproject commit 04795924456062db1631686a90f13d963791ad34 diff --git a/extension/src/openvic-extension/GameSingleton.cpp b/extension/src/openvic-extension/GameSingleton.cpp index e0dc14e..ade6ec9 100644 --- a/extension/src/openvic-extension/GameSingleton.cpp +++ b/extension/src/openvic-extension/GameSingleton.cpp @@ -232,7 +232,7 @@ Dictionary GameSingleton::get_province_info_from_index(int32_t index) const { if (rgo != nullptr) ret[get_province_info_rgo_key()] = std_to_godot_string(rgo->get_identifier()); ret[get_province_info_life_rating_key()] = province->get_life_rating(); - + TerrainType const* terrain_type = province->get_terrain_type(); if (terrain_type != nullptr) ret[get_province_info_terrain_type_key()] = std_to_godot_string(terrain_type->get_identifier()); @@ -244,16 +244,16 @@ Dictionary GameSingleton::get_province_info_from_index(int32_t index) const { distribution_t const& cultures = province->get_culture_distribution(); if (!cultures.empty()) ret[get_province_info_pop_cultures_key()] = _distribution_to_dictionary(cultures); - std::vector const& buildings = province->get_buildings(); + std::vector const& buildings = province->get_buildings(); if (!buildings.empty()) { Array buildings_array; buildings_array.resize(buildings.size()); for (size_t idx = 0; idx < buildings.size(); ++idx) { - Building const& building = buildings[idx]; + BuildingInstance const& building = buildings[idx]; Dictionary building_dict; building_dict[get_building_info_building_key()] = std_to_godot_string(building.get_identifier()); - building_dict[get_building_info_level_key()] = static_cast(building.get_level()); + building_dict[get_building_info_level_key()] = static_cast(building.get_current_level()); building_dict[get_building_info_expansion_state_key()] = static_cast(building.get_expansion_state()); building_dict[get_building_info_start_date_key()] = std_to_godot_string(building.get_start_date().to_string()); building_dict[get_building_info_end_date_key()] = std_to_godot_string(building.get_end_date().to_string()); -- cgit v1.2.3-56-ga3b1