diff options
author | zaaarf <me@zaaarf.foo> | 2023-12-10 13:35:25 +0100 |
---|---|---|
committer | zaaarf <me@zaaarf.foo> | 2023-12-10 23:19:43 +0100 |
commit | 85155e033e9b03d71752626137a75f6418a5786c (patch) | |
tree | 986b02c46996447780975f389b9b99d01a5fc600 /src/openvic-simulation/history/ProvinceHistory.hpp | |
parent | 34fbe27857d77d6f193d6d1848b953a4596cedd2 (diff) |
feat: implemented pop history loading
Diffstat (limited to 'src/openvic-simulation/history/ProvinceHistory.hpp')
-rw-r--r-- | src/openvic-simulation/history/ProvinceHistory.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvic-simulation/history/ProvinceHistory.hpp b/src/openvic-simulation/history/ProvinceHistory.hpp index e4adc08..b69408e 100644 --- a/src/openvic-simulation/history/ProvinceHistory.hpp +++ b/src/openvic-simulation/history/ProvinceHistory.hpp @@ -17,6 +17,7 @@ namespace OpenVic { struct ProvinceHistoryEntry : HistoryEntry { friend struct ProvinceHistoryMap; + friend struct ProvinceHistoryManager; private: Province const& PROPERTY(province); @@ -33,8 +34,10 @@ namespace OpenVic { std::map<BuildingType const*, BuildingType::level_t> PROPERTY(province_buildings); std::map<BuildingType const*, BuildingType::level_t> PROPERTY(state_buildings); fixed_point_map_t<Ideology const*> PROPERTY(party_loyalties); + std::vector<Pop> PROPERTY(pops); ProvinceHistoryEntry(Province const& new_province, Date new_date); + bool _load_province_pop_history(PopManager const& pop_manager, ast::NodeCPtr root); }; struct ProvinceHistoryManager; @@ -45,6 +48,8 @@ namespace OpenVic { private: Province const& PROPERTY(province); + ProvinceHistoryEntry* _get_entry(Date date); + protected: ProvinceHistoryMap(Province const& new_province); @@ -66,5 +71,6 @@ namespace OpenVic { ProvinceHistoryMap const* get_province_history(Province const* province) const; bool load_province_history_file(GameManager const& game_manager, Province const& province, ast::NodeCPtr root); + bool load_pop_history_file(GameManager const& game_manager, Date date, ast::NodeCPtr root); }; } // namespace OpenVic |