aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/modifier/Modifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/modifier/Modifier.cpp')
-rw-r--r--src/openvic-simulation/modifier/Modifier.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/openvic-simulation/modifier/Modifier.cpp b/src/openvic-simulation/modifier/Modifier.cpp
index 73b30ce..c7c8087 100644
--- a/src/openvic-simulation/modifier/Modifier.cpp
+++ b/src/openvic-simulation/modifier/Modifier.cpp
@@ -58,6 +58,18 @@ fixed_point_t ModifierValue::get_effect(ModifierEffect const& effect, bool* effe
}
return it->second;
}
+
+ if (effect_found != nullptr) {
+ *effect_found = false;
+ }
+ return fixed_point_t::_0();
+}
+
+fixed_point_t ModifierValue::get_effect_nullcheck(ModifierEffect const* effect, bool* effect_found) const {
+ if (effect != nullptr) {
+ return get_effect(*effect, effect_found);
+ }
+
if (effect_found != nullptr) {
*effect_found = false;
}