aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
diff options
context:
space:
mode:
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
commit19026ff6aee8748df4777ec044065d13460e806a (patch)
treeb72561d0f46f16650cdbdede18c31587e1dddb80 /src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
parent8defcd5daa1acd2c61aa1cd0a26478d472fed9b0 (diff)
Cache pops by type per state and provincestate_cache_owners
Diffstat (limited to 'src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp')
-rw-r--r--src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp b/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
index a15e87d..d94a22a 100644
--- a/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
+++ b/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
@@ -23,25 +23,19 @@ namespace OpenVic {
fixed_point_t PROPERTY(total_employee_income_cache);
IndexedMap<PopType, Pop::pop_size_t> PROPERTY(employee_count_per_type_cache);
- Pop::pop_size_t update_size_and_return_total_worker_count(
- ProvinceInstance& location,
- ModifierEffectCache const& modifier_effect_cache,
- const fixed_point_t size_modifier
- );
fixed_point_t calculate_size_modifier(ProvinceInstance const& location, ModifierEffectCache const& modifier_effect_cache) const;
void hire(ProvinceInstance& location, const Pop::pop_size_t available_worker_count);
fixed_point_t produce(
ProvinceInstance& location,
- std::vector<Pop*>& owner_pops_cache,
- Pop::pop_size_t& total_owner_count_in_state_cache,
- ModifierEffectCache const& modifier_effect_cache,
- const fixed_point_t size_modifier
+ std::vector<Pop*> const* const owner_pops_cache,
+ const Pop::pop_size_t total_owner_count_in_state_cache,
+ ModifierEffectCache const& modifier_effect_cache
);
void pay_employees(
ProvinceInstance& location,
const fixed_point_t revenue,
const Pop::pop_size_t total_worker_count_in_province,
- std::vector<Pop*>& owner_pops_cache,
+ std::vector<Pop*>* const owner_pops_cache,
const Pop::pop_size_t total_owner_count_in_state_cache
);
@@ -59,6 +53,7 @@ namespace OpenVic {
constexpr bool is_valid() const {
return production_type_nullable != nullptr;
}
- void initialise_for_new_game(ProvinceInstance& location, ModifierEffectCache const& modifier_effect_cache);
+ void initialise_rgo_size_multiplier(ProvinceInstance& location, ModifierEffectCache const& modifier_effect_cache);
+ void rgo_tick(ProvinceInstance& location, ModifierEffectCache const& modifier_effect_cache);
};
}