aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-09-27 12:10:59 +0200
committer zaaarf <me@zaaarf.foo>2024-09-27 12:10:59 +0200
commit45ea5382921f71bd247f57210937c3d384d46cdf (patch)
treefbb752ea8c4bba4448dddcb87e5541df89f684fc /src/openvic-simulation/country
parent7e895eaea194e266b112cb507b0d643083f2ad4b (diff)
Added support for remove_culture custom instructionremove-culture
Diffstat (limited to 'src/openvic-simulation/country')
-rw-r--r--src/openvic-simulation/country/CountryInstance.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/openvic-simulation/country/CountryInstance.cpp b/src/openvic-simulation/country/CountryInstance.cpp
index 183b0c8..55ceb23 100644
--- a/src/openvic-simulation/country/CountryInstance.cpp
+++ b/src/openvic-simulation/country/CountryInstance.cpp
@@ -671,9 +671,13 @@ bool CountryInstance::apply_history_to_country(
bool ret = true;
- set_optional(primary_culture, entry.get_primary_culture());
- for (Culture const* culture : entry.get_accepted_cultures()) {
- ret &= add_accepted_culture(*culture);
+ set_optional(primary_culture, entry.get_primary_culture());
+ for (auto const& [culture, add] : entry.get_accepted_cultures()) {
+ if (add) {
+ ret &= add_accepted_culture(*culture);
+ } else {
+ ret &= remove_accepted_culture(*culture);
+ }
}
set_optional(religion, entry.get_religion());
if (entry.get_ruling_party()) {