From c0ba822ee46551a40ad6b43e8f56b80e27ae35b5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Sat, 8 Jun 2024 00:17:25 +0100 Subject: Add GoodInstance --- src/openvic-simulation/history/ProvinceHistory.cpp | 5 +++-- src/openvic-simulation/history/ProvinceHistory.hpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/openvic-simulation/history') diff --git a/src/openvic-simulation/history/ProvinceHistory.cpp b/src/openvic-simulation/history/ProvinceHistory.cpp index 87d0713..c4d92b8 100644 --- a/src/openvic-simulation/history/ProvinceHistory.cpp +++ b/src/openvic-simulation/history/ProvinceHistory.cpp @@ -20,7 +20,7 @@ bool ProvinceHistoryMap::_load_history_entry( ) { BuildingTypeManager const& building_type_manager = game_manager.get_economy_manager().get_building_type_manager(); CountryManager const& country_manager = game_manager.get_country_manager(); - GoodManager const& good_manager = game_manager.get_economy_manager().get_good_manager(); + GoodDefinitionManager const& good_definition_manager = game_manager.get_economy_manager().get_good_definition_manager(); IdeologyManager const& ideology_manager = game_manager.get_politics_manager().get_ideology_manager(); TerrainTypeManager const& terrain_type_manager = game_manager.get_map_definition().get_terrain_type_manager(); @@ -65,7 +65,8 @@ bool ProvinceHistoryMap::_load_history_entry( "colony", ZERO_OR_ONE, expect_identifier(expect_mapped_string(colony_status_map, assign_variable_callback(entry.colonial))), "is_slave", ZERO_OR_ONE, expect_bool(assign_variable_callback(entry.slave)), - "trade_goods", ZERO_OR_ONE, good_manager.expect_good_identifier(assign_variable_callback_pointer_opt(entry.rgo)), + "trade_goods", ZERO_OR_ONE, + good_definition_manager.expect_good_definition_identifier(assign_variable_callback_pointer_opt(entry.rgo)), "life_rating", ZERO_OR_ONE, expect_uint(assign_variable_callback(entry.life_rating)), "terrain", ZERO_OR_ONE, terrain_type_manager.expect_terrain_type_identifier( assign_variable_callback_pointer_opt(entry.terrain_type) diff --git a/src/openvic-simulation/history/ProvinceHistory.hpp b/src/openvic-simulation/history/ProvinceHistory.hpp index c4cbd49..015b7be 100644 --- a/src/openvic-simulation/history/ProvinceHistory.hpp +++ b/src/openvic-simulation/history/ProvinceHistory.hpp @@ -16,7 +16,7 @@ namespace OpenVic { struct ProvinceHistoryMap; struct ProvinceDefinition; struct Country; - struct Good; + struct GoodDefinition; struct TerrainType; struct Ideology; struct GameManager; @@ -33,7 +33,7 @@ namespace OpenVic { std::optional PROPERTY(slave); std::vector PROPERTY(add_cores); std::vector PROPERTY(remove_cores); - std::optional PROPERTY(rgo); + std::optional PROPERTY(rgo); std::optional PROPERTY(life_rating); std::optional PROPERTY(terrain_type); ordered_map PROPERTY(province_buildings); -- cgit v1.2.3-56-ga3b1