From 81e00e3291834dbae6e70224651bf66198ba154e Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 13 Sep 2024 00:11:33 +0100 Subject: Calculate country and province modifier sums (WIP) --- src/openvic-simulation/country/CountryInstance.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/openvic-simulation/country/CountryInstance.hpp') diff --git a/src/openvic-simulation/country/CountryInstance.hpp b/src/openvic-simulation/country/CountryInstance.hpp index a7128aa..4156a39 100644 --- a/src/openvic-simulation/country/CountryInstance.hpp +++ b/src/openvic-simulation/country/CountryInstance.hpp @@ -80,6 +80,12 @@ namespace OpenVic { ordered_set PROPERTY(core_provinces); ordered_set PROPERTY(states); + ModifierValue PROPERTY(base_modifier_sum); + ModifierValue PROPERTY(owned_provinces_modifier_sum); + std::vector PROPERTY(event_modifiers); + std::vector PROPERTY(static_modifiers); + std::vector PROPERTY(triggered_modifiers); + /* Production */ fixed_point_t PROPERTY(industrial_power); std::vector> PROPERTY(industrial_power_from_states); @@ -174,6 +180,7 @@ namespace OpenVic { unlock_level_t PROPERTY(gas_attack_unlock_level); unlock_level_t PROPERTY(gas_defence_unlock_level); std::vector PROPERTY(unit_variant_unlock_levels); + // TODO - stats for each unit type UNIT_BRANCHED_GETTER(get_unit_instance_groups, armies, navies); UNIT_BRANCHED_GETTER(get_leaders, generals, admirals); @@ -296,6 +303,7 @@ namespace OpenVic { public: + void update_base_modifier_sum(Date today); void update_gamestate(DefineManager const& define_manager, UnitTypeManager const& unit_type_manager); void tick(); }; @@ -341,6 +349,7 @@ namespace OpenVic { MapInstance& map_instance ); + void update_base_modifier_sums(Date today); void update_gamestate(Date today, DefineManager const& define_manager, UnitTypeManager const& unit_type_manager); void tick(); }; -- cgit v1.2.3-56-ga3b1