aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country/CountryInstance.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-11-01 22:38:28 +0100
committer hop311 <hop3114@gmail.com>2024-11-02 00:04:34 +0100
commit5027ffca60ffa5d6bcc1aa65851bc37d138f2402 (patch)
tree72d228e2e5e78f90b64d92789e7b588913debc98 /src/openvic-simulation/country/CountryInstance.cpp
parentfa0235d4eac01816a4832249f28ccadfb6dd6e40 (diff)
(WIP) Register conditions with parse and execute callbacks
Diffstat (limited to 'src/openvic-simulation/country/CountryInstance.cpp')
-rw-r--r--src/openvic-simulation/country/CountryInstance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvic-simulation/country/CountryInstance.cpp b/src/openvic-simulation/country/CountryInstance.cpp
index 4ecb902..5313af4 100644
--- a/src/openvic-simulation/country/CountryInstance.cpp
+++ b/src/openvic-simulation/country/CountryInstance.cpp
@@ -207,6 +207,10 @@ bool CountryInstance::clear_country_flag(std::string_view flag, bool warn) {
return true;
}
+bool CountryInstance::has_country_flag(std::string_view flag) const {
+ return country_flags.contains(flag);
+}
+
#define ADD_AND_REMOVE(item) \
bool CountryInstance::add_##item(std::remove_pointer_t<decltype(item##s)::value_type>& new_item) { \
if (!item##s.emplace(&new_item).second) { \