aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/MapInstance.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-10-19 13:58:20 +0200
committer hop311 <hop3114@gmail.com>2024-10-29 14:53:14 +0100
commitb7b94da345d66f839164ec25450576525474b357 (patch)
treeeba311a156fd5a1626092362840047e0dd0ed79e /src/openvic-simulation/map/MapInstance.cpp
parent309deb6a5b28c8e2b24e73d06f1418bb992b4cd7 (diff)
Test that modifier calculation methods produce the same resultsresultant-modifier-test
Diffstat (limited to 'src/openvic-simulation/map/MapInstance.cpp')
-rw-r--r--src/openvic-simulation/map/MapInstance.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openvic-simulation/map/MapInstance.cpp b/src/openvic-simulation/map/MapInstance.cpp
index d8ec2fb..2875a66 100644
--- a/src/openvic-simulation/map/MapInstance.cpp
+++ b/src/openvic-simulation/map/MapInstance.cpp
@@ -42,6 +42,9 @@ ProvinceDefinition::index_t MapInstance::get_selected_province_index() const {
}
bool MapInstance::setup(
+#if OV_MODIFIER_CALCULATION_TEST
+ bool ADD_OWNER_CONTRIBUTION,
+#endif
BuildingTypeManager const& building_type_manager,
decltype(ProvinceInstance::pop_type_distribution)::keys_t const& pop_type_keys,
decltype(ProvinceInstance::ideology_distribution)::keys_t const& ideology_keys
@@ -60,7 +63,12 @@ bool MapInstance::setup(
province_instances.reserve(map_definition.get_province_definition_count());
for (ProvinceDefinition const& province : map_definition.get_province_definitions()) {
- ret &= province_instances.add_item({ province, pop_type_keys, ideology_keys });
+ ret &= province_instances.add_item({
+#if OV_MODIFIER_CALCULATION_TEST
+ ADD_OWNER_CONTRIBUTION,
+#endif
+ province, pop_type_keys, ideology_keys
+ });
}
province_instances.lock();