diff options
Diffstat (limited to 'src/openvic-simulation/misc')
-rw-r--r-- | src/openvic-simulation/misc/Modifier.cpp | 9 | ||||
-rw-r--r-- | src/openvic-simulation/misc/Modifier.hpp | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/openvic-simulation/misc/Modifier.cpp b/src/openvic-simulation/misc/Modifier.cpp index 4d6abb7..9163af5 100644 --- a/src/openvic-simulation/misc/Modifier.cpp +++ b/src/openvic-simulation/misc/Modifier.cpp @@ -33,6 +33,14 @@ size_t ModifierValue::get_effect_count() const { return values.size(); } +void ModifierValue::clear() { + values.clear(); +} + +bool ModifierValue::empty() const { + return values.empty(); +} + fixed_point_t ModifierValue::get_effect(ModifierEffect const* effect, bool* successful) { const effect_map_t::const_iterator it = values.find(effect); if (it != values.end()) { @@ -123,7 +131,6 @@ bool ModifierManager::setup_modifier_effects() { /* Country Modifier Effects */ ret &= add_modifier_effect("administrative_efficiency", true); ret &= add_modifier_effect("administrative_efficiency_modifier", true); - ret &= add_modifier_effect("administrative_multiplier", true); ret &= add_modifier_effect("artisan_input", false); ret &= add_modifier_effect("artisan_output", true); ret &= add_modifier_effect("artisan_throughput", true); diff --git a/src/openvic-simulation/misc/Modifier.hpp b/src/openvic-simulation/misc/Modifier.hpp index 58b335d..bd72a1e 100644 --- a/src/openvic-simulation/misc/Modifier.hpp +++ b/src/openvic-simulation/misc/Modifier.hpp @@ -37,7 +37,7 @@ namespace OpenVic { using effect_map_t = fixed_point_map_t<ModifierEffect const*>; private: - effect_map_t values; + effect_map_t PROPERTY(values); public: ModifierValue(); @@ -51,6 +51,8 @@ namespace OpenVic { /* Removes effect entries with a value of zero. */ void trim(); size_t get_effect_count() const; + void clear(); + bool empty() const; fixed_point_t get_effect(ModifierEffect const* effect, bool* successful = nullptr); bool has_effect(ModifierEffect const* effect) const; |