diff options
author | hop311 <hop3114@gmail.com> | 2024-10-19 12:31:40 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-10-19 12:31:40 +0200 |
commit | 35909d6e79d524f19f9b69dffd02fcf162be5093 (patch) | |
tree | fff57526931ab126e1250457e7ccc07c793504f4 /src/openvic-simulation/map/ProvinceInstance.cpp | |
parent | 18ab144ec4ecf1efca68a26bc79b9d54e28e54f8 (diff) |
Switch to excluding given modifier effect targets rather than using a positive filter
Diffstat (limited to 'src/openvic-simulation/map/ProvinceInstance.cpp')
-rw-r--r-- | src/openvic-simulation/map/ProvinceInstance.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp index 57a33a4..236efd2 100644 --- a/src/openvic-simulation/map/ProvinceInstance.cpp +++ b/src/openvic-simulation/map/ProvinceInstance.cpp @@ -255,7 +255,7 @@ fixed_point_t ProvinceInstance::get_modifier_effect_value(ModifierEffect const& using enum ModifierEffect::target_t; if (owner != nullptr) { - if ((effect.get_targets() & PROVINCE) == NO_TARGETS) { + if (ModifierEffect::excludes_targets(effect.get_targets(), PROVINCE)) { // Non-province targeted effects are already added to the country modifier sum return owner->get_modifier_effect_value(effect); } else { @@ -285,7 +285,7 @@ void ProvinceInstance::push_contributing_modifiers( using enum ModifierEffect::target_t; if (owner != nullptr) { - if ((effect.get_targets() & PROVINCE) == NO_TARGETS) { + if (ModifierEffect::excludes_targets(effect.get_targets(), PROVINCE)) { // Non-province targeted effects are already added to the country modifier sum owner->push_contributing_modifiers(effect, contributions); } else { |