diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-03 22:23:39 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-13 09:35:21 +0100 |
commit | e91bd6c3322a73c3ac6707329e81b6f2edc0b8be (patch) | |
tree | c05ff2506a24bfe7d88a1dad002e3c3ac6eb04e1 /src/openvic-simulation/map/ProvinceInstance.cpp | |
parent | 55eb6aab174172b63c44d801823ed8dc02ff0402 (diff) |
ModifierEffectCache & location to fieldsto_fields
Diffstat (limited to 'src/openvic-simulation/map/ProvinceInstance.cpp')
-rw-r--r-- | src/openvic-simulation/map/ProvinceInstance.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp index 2c4479e..b5cca55 100644 --- a/src/openvic-simulation/map/ProvinceInstance.cpp +++ b/src/openvic-simulation/map/ProvinceInstance.cpp @@ -18,7 +18,9 @@ using namespace OpenVic; ProvinceInstance::ProvinceInstance( - ProvinceDefinition const& new_province_definition, decltype(pop_type_distribution)::keys_t const& pop_type_keys, + ModifierEffectCache const& new_modifier_effect_cache, + ProvinceDefinition const& new_province_definition, + decltype(pop_type_distribution)::keys_t const& pop_type_keys, decltype(ideology_distribution)::keys_t const& ideology_keys ) : HasIdentifierAndColour { new_province_definition }, province_definition { new_province_definition }, @@ -33,7 +35,7 @@ ProvinceInstance::ProvinceInstance( event_modifiers {}, slave { false }, crime { nullptr }, - rgo { pop_type_keys }, + rgo { new_modifier_effect_cache, pop_type_keys }, buildings { "buildings", false }, armies {}, navies {}, @@ -368,14 +370,11 @@ void ProvinceInstance::update_gamestate(const Date today, DefineManager const& d _update_pops(define_manager); } -void ProvinceInstance::province_tick(const Date today, ModifierEffectCache const& modifier_effect_cache) { +void ProvinceInstance::province_tick(const Date today) { for (BuildingInstance& building : buildings.get_items()) { building.tick(today); } - rgo.rgo_tick( - *this, - modifier_effect_cache - ); + rgo.rgo_tick(); } template<UnitType::branch_t Branch> @@ -415,6 +414,8 @@ bool ProvinceInstance::setup(BuildingTypeManager const& building_type_manager) { return false; } + rgo.setup_location_ptr(*this); + bool ret = true; if (!province_definition.is_water()) { @@ -479,8 +480,8 @@ bool ProvinceInstance::apply_history_to_province(ProvinceHistoryEntry const& ent return ret; } -void ProvinceInstance::initialise_rgo(ModifierEffectCache const& modifier_effect_cache) { - rgo.initialise_rgo_size_multiplier(*this, modifier_effect_cache); +void ProvinceInstance::initialise_rgo() { + rgo.initialise_rgo_size_multiplier(); } void ProvinceInstance::setup_pop_test_values(IssueManager const& issue_manager) { |