diff options
5 files changed, 3 insertions, 17 deletions
diff --git a/src/openvic-simulation/modifier/ModifierEffect.hpp b/src/openvic-simulation/modifier/ModifierEffect.hpp index b6164e0..9eb425b 100644 --- a/src/openvic-simulation/modifier/ModifierEffect.hpp +++ b/src/openvic-simulation/modifier/ModifierEffect.hpp @@ -46,7 +46,7 @@ namespace OpenVic { // TODO - format/precision, e.g. 80% vs 0.8 vs 0.800, 2 vs 2.0 vs 200% ModifierEffect( - std::string_view new_identifier, bool new_is_positive_good, format_t new_format, target_t mew_targets, + std::string_view new_identifier, bool new_is_positive_good, format_t new_format, target_t new_targets, std::string_view new_localisation_key, bool new_has_no_effect ); diff --git a/src/openvic-simulation/modifier/ModifierEffectCache.cpp b/src/openvic-simulation/modifier/ModifierEffectCache.cpp index 0e7141f..291ef9c 100644 --- a/src/openvic-simulation/modifier/ModifierEffectCache.cpp +++ b/src/openvic-simulation/modifier/ModifierEffectCache.cpp @@ -205,7 +205,6 @@ ModifierEffectCache::ModifierEffectCache() mine_rgo_size_local { nullptr }, movement_cost_base { nullptr }, movement_cost_percentage_change { nullptr }, - movement_cost_percentage_change_fake { nullptr }, number_of_voters { nullptr }, pop_consciousness_modifier { nullptr }, pop_militancy_modifier { nullptr }, diff --git a/src/openvic-simulation/modifier/ModifierEffectCache.hpp b/src/openvic-simulation/modifier/ModifierEffectCache.hpp index e88aaea..9a0e9de 100644 --- a/src/openvic-simulation/modifier/ModifierEffectCache.hpp +++ b/src/openvic-simulation/modifier/ModifierEffectCache.hpp @@ -175,7 +175,6 @@ namespace OpenVic { ModifierEffect const* PROPERTY(mine_rgo_size_local); ModifierEffect const* PROPERTY(movement_cost_base); ModifierEffect const* PROPERTY(movement_cost_percentage_change); - ModifierEffect const* PROPERTY(movement_cost_percentage_change_fake); //shows up but does nothing in Victoria 2 ModifierEffect const* PROPERTY(number_of_voters); ModifierEffect const* PROPERTY(pop_consciousness_modifier); ModifierEffect const* PROPERTY(pop_militancy_modifier); 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, diff --git a/src/openvic-simulation/modifier/ModifierManager.hpp b/src/openvic-simulation/modifier/ModifierManager.hpp index 49e3559..eb524a3 100644 --- a/src/openvic-simulation/modifier/ModifierManager.hpp +++ b/src/openvic-simulation/modifier/ModifierManager.hpp @@ -97,7 +97,6 @@ namespace OpenVic { NodeTools::key_value_callback_t _expect_shared_tech_country_modifier_effect(ModifierValue& modifier_value) const; public: - bool register_complex_modifier(const std::string_view identifier); static std::string get_flat_identifier(const std::string_view complex_modifier_identifier, const std::string_view variant_identifier); @@ -132,7 +131,6 @@ namespace OpenVic { ) const; NodeTools::key_value_callback_t expect_base_country_modifier(ModifierValue& modifier_value) const; NodeTools::key_value_callback_t expect_base_province_modifier(ModifierValue& modifier_value) const; - NodeTools::key_value_callback_t expect_province_event_modifier(ModifierValue& modifier_value) const; NodeTools::key_value_callback_t expect_terrain_modifier(ModifierValue& modifier_value) const; }; } |