aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/ProvinceInstance.hpp
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/ProvinceInstance.hpp
parent309deb6a5b28c8e2b24e73d06f1418bb992b4cd7 (diff)
Test that modifier calculation methods produce the same resultsresultant-modifier-test
Diffstat (limited to 'src/openvic-simulation/map/ProvinceInstance.hpp')
-rw-r--r--src/openvic-simulation/map/ProvinceInstance.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.hpp b/src/openvic-simulation/map/ProvinceInstance.hpp
index e7c0326..2794a50 100644
--- a/src/openvic-simulation/map/ProvinceInstance.hpp
+++ b/src/openvic-simulation/map/ProvinceInstance.hpp
@@ -11,6 +11,8 @@
#include "openvic-simulation/types/HasIdentifier.hpp"
#include "openvic-simulation/types/OrderedContainers.hpp"
+#include "openvic-simulation/ModifierCalculationTestToggle.hpp"
+
namespace OpenVic {
struct MapInstance;
struct ProvinceDefinition;
@@ -70,10 +72,14 @@ namespace OpenVic {
CountryInstance* PROPERTY(controller);
ordered_set<CountryInstance*> PROPERTY(cores);
+#if OV_MODIFIER_CALCULATION_TEST
+ const bool ADD_OWNER_CONTRIBUTION;
+#else
public:
static constexpr bool ADD_OWNER_CONTRIBUTION = true;
private:
+#endif
// The total/resultant modifier affecting this province, including owner country contributions if
// ADD_OWNER_CONTRIBUTION is true.
ModifierSum PROPERTY(modifier_sum);
@@ -102,6 +108,9 @@ namespace OpenVic {
size_t PROPERTY(max_supported_regiments);
ProvinceInstance(
+#if OV_MODIFIER_CALCULATION_TEST
+ bool new_ADD_OWNER_CONTRIBUTION,
+#endif
ProvinceDefinition const& new_province_definition, decltype(pop_type_distribution)::keys_t const& pop_type_keys,
decltype(ideology_distribution)::keys_t const& ideology_keys
);