diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-10-29 00:31:04 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-10-29 11:35:49 +0100 |
commit | d63997ad287de6bc80cdf7c7652bee7c6c4567e7 (patch) | |
tree | 4c944a07154d499c97977d52a445c80569c6afc3 /src/openvic-simulation/modifier/ModifierManager.cpp | |
parent | 0f2074fc51cfab930e2a672125c1625d9a47fb06 (diff) |
movement_cost is a province modifiermovement_cost
Diffstat (limited to 'src/openvic-simulation/modifier/ModifierManager.cpp')
-rw-r--r-- | src/openvic-simulation/modifier/ModifierManager.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/openvic-simulation/modifier/ModifierManager.cpp b/src/openvic-simulation/modifier/ModifierManager.cpp index cd330fd..83e1756 100644 --- a/src/openvic-simulation/modifier/ModifierManager.cpp +++ b/src/openvic-simulation/modifier/ModifierManager.cpp @@ -509,7 +509,7 @@ bool ModifierManager::setup_modifier_effects() { ret &= register_terrain_modifier_effect( modifier_effect_cache.movement_cost_base, "movement_cost", true, PROPORTION_DECIMAL ); - ret &= register_base_country_modifier_effect( + ret &= register_base_province_modifier_effect( modifier_effect_cache.movement_cost_percentage_change, "movement_cost", false, PROPORTION_DECIMAL ); ret &= register_base_province_modifier_effect( @@ -589,7 +589,7 @@ bool ModifierManager::load_event_modifiers(const ast::NodeCPtr root) { IconModifier::icon_t icon = 0; bool ret = expect_dictionary_keys_and_default( - expect_province_event_modifier(modifier_value), + expect_base_province_modifier(modifier_value), "icon", ZERO_OR_ONE, expect_uint(assign_variable_callback(icon)) )(value); @@ -780,16 +780,6 @@ NodeTools::key_value_callback_t ModifierManager::expect_base_province_modifier(M expect_base_country_modifier(modifier_value) ); } -NodeTools::key_value_callback_t ModifierManager::expect_province_event_modifier(ModifierValue& modifier_value) const { - return [this, &modifier_value](const std::string_view key, const ast::NodeCPtr value) -> bool { - if (strings_equal_case_insensitive(key, "movement_cost")) { - return _add_modifier_cb(modifier_value, modifier_effect_cache.movement_cost_percentage_change, value); - } - else { - return expect_base_province_modifier(modifier_value)(key, value); - } - }; -} NodeTools::key_value_callback_t ModifierManager::expect_terrain_modifier(ModifierValue& modifier_value) const { return _expect_modifier_effect_with_fallback( terrain_modifier_effects, |