diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-02 15:20:30 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-02 21:09:18 +0100 |
commit | 19026ff6aee8748df4777ec044065d13460e806a (patch) | |
tree | b72561d0f46f16650cdbdede18c31587e1dddb80 /src/openvic-simulation/map/State.hpp | |
parent | 8defcd5daa1acd2c61aa1cd0a26478d472fed9b0 (diff) |
Cache pops by type per state and provincestate_cache_owners
Diffstat (limited to 'src/openvic-simulation/map/State.hpp')
-rw-r--r-- | src/openvic-simulation/map/State.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/openvic-simulation/map/State.hpp b/src/openvic-simulation/map/State.hpp index a39eea6..e1f5953 100644 --- a/src/openvic-simulation/map/State.hpp +++ b/src/openvic-simulation/map/State.hpp @@ -30,6 +30,7 @@ namespace OpenVic { fixed_point_t PROPERTY(average_consciousness); fixed_point_t PROPERTY(average_militancy); IndexedMap<PopType, Pop::pop_size_t> PROPERTY(pop_type_distribution); + IndexedMap<PopType, std::vector<Pop*>> PROPERTY(pops_cache_by_type); fixed_point_t PROPERTY(industrial_power); @@ -48,6 +49,8 @@ namespace OpenVic { std::string get_identifier() const; void update_gamestate(); + void state_tick(const Date today, ModifierEffectCache const& modifier_effect_cache); + IndexedMap<PopType, std::vector<Pop*>>& get_mutable_pops_cache_by_type(); }; struct Region; @@ -67,6 +70,7 @@ namespace OpenVic { size_t get_state_count() const; void update_gamestate(); + void tick(const Date today, ModifierEffectCache const& modifier_effect_cache); }; struct MapInstance; @@ -90,5 +94,6 @@ namespace OpenVic { void reset(); void update_gamestate(); + void tick(const Date today, ModifierEffectCache const& modifier_effect_cache); }; } |