diff options
author | hop311 <hop3114@gmail.com> | 2024-06-08 01:17:25 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-06-08 01:17:25 +0200 |
commit | c0ba822ee46551a40ad6b43e8f56b80e27ae35b5 (patch) | |
tree | ebc9c03b5bd0a6b11068ac37aca302f6ceb24a18 /src/openvic-simulation/history | |
parent | 1198a780916e65cae048dd3478f614c1d18db846 (diff) |
Add GoodInstancegood-instance
Diffstat (limited to 'src/openvic-simulation/history')
-rw-r--r-- | src/openvic-simulation/history/ProvinceHistory.cpp | 5 | ||||
-rw-r--r-- | src/openvic-simulation/history/ProvinceHistory.hpp | 4 |
2 files changed, 5 insertions, 4 deletions
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<ProvinceInstance::life_rating_t>(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<bool> PROPERTY(slave); std::vector<Country const*> PROPERTY(add_cores); std::vector<Country const*> PROPERTY(remove_cores); - std::optional<Good const*> PROPERTY(rgo); + std::optional<GoodDefinition const*> PROPERTY(rgo); std::optional<ProvinceInstance::life_rating_t> PROPERTY(life_rating); std::optional<TerrainType const*> PROPERTY(terrain_type); ordered_map<BuildingType const*, BuildingType::level_t> PROPERTY(province_buildings); |