aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/country')
-rw-r--r--src/openvic-simulation/country/CountryInstance.cpp17
-rw-r--r--src/openvic-simulation/country/CountryInstance.hpp10
2 files changed, 24 insertions, 3 deletions
diff --git a/src/openvic-simulation/country/CountryInstance.cpp b/src/openvic-simulation/country/CountryInstance.cpp
index 4ecb902..d3a0f2a 100644
--- a/src/openvic-simulation/country/CountryInstance.cpp
+++ b/src/openvic-simulation/country/CountryInstance.cpp
@@ -10,6 +10,8 @@
#include "openvic-simulation/politics/Ideology.hpp"
#include "openvic-simulation/research/Invention.hpp"
#include "openvic-simulation/research/Technology.hpp"
+#include "openvic-simulation/types/Sliders.hpp"
+#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
using namespace OpenVic;
@@ -56,6 +58,11 @@ CountryInstance::CountryInstance(
/* Budget */
cash_stockpile { 0 },
+ poor_tax_rate_slider {50},
+ middle_tax_rate_slider { 50},
+ rich_tax_rate_slider {50},
+
+ // TODO:
/* Technology */
technology_unlock_levels { &technology_keys },
@@ -280,6 +287,10 @@ bool CountryInstance::add_reform(Reform const& new_reform) {
}
}
+bool CountryInstance::set_value_for_slider(SliderManager& slider, int const* new_value) {
+
+}
+
template<UnitType::branch_t Branch>
bool CountryInstance::add_unit_instance_group(UnitInstanceGroup<Branch>& group) {
if (get_unit_instance_groups<Branch>().emplace(static_cast<UnitInstanceGroupBranched<Branch>*>(&group)).second) {
@@ -974,8 +985,8 @@ void CountryInstance::update_modifier_sum(Date today, StaticModifierCache const&
modifier_sum.add_modifier(static_modifier_cache.get_infamy(), country_source, infamy);
modifier_sum.add_modifier(static_modifier_cache.get_literacy(), country_source, national_literacy);
modifier_sum.add_modifier(static_modifier_cache.get_plurality(), country_source, plurality);
- // TODO - difficulty modifiers, war, peace, debt_default_to, bad_debter, generalised_debt_default,
- // total_occupation, total_blockaded, in_bankrupcy
+ // TODO - difficulty modifiers, war, peace, debt_default_to, bad_debtor, generalised_debt_default,
+ // total_occupation, total_blockaded, in_bankruptcy
// TODO - handle triggered modifiers
@@ -1198,7 +1209,7 @@ void CountryInstanceManager::update_rankings(Date today, DefineManager const& de
}
// Sort the great powers list by total rank, as pre-existing great powers may have changed rank order and new great
- // powers will have beeen added to the end of the list regardless of rank.
+ // powers will have been added to the end of the list regardless of rank.
std::sort(great_powers.begin(), great_powers.end(), [](CountryInstance const* a, CountryInstance const* b) -> bool {
return a->get_total_rank() < b->get_total_rank();
});
diff --git a/src/openvic-simulation/country/CountryInstance.hpp b/src/openvic-simulation/country/CountryInstance.hpp
index 6e01649..67a2981 100644
--- a/src/openvic-simulation/country/CountryInstance.hpp
+++ b/src/openvic-simulation/country/CountryInstance.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <utility>
#include <vector>
#include <plf_colony.h>
@@ -12,8 +13,11 @@
#include "openvic-simulation/types/Date.hpp"
#include "openvic-simulation/types/IdentifierRegistry.hpp"
#include "openvic-simulation/types/IndexedMap.hpp"
+#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
+#include "openvic-simulation/types/Sliders.hpp"
#include "openvic-simulation/utility/Getters.hpp"
+
namespace OpenVic {
struct CountryInstanceManager;
struct CountryDefinition;
@@ -98,6 +102,10 @@ namespace OpenVic {
/* Budget */
fixed_point_t PROPERTY(cash_stockpile);
+ slider_value_t PROPERTY(poor_tax_rate_slider);
+ slider_value_t PROPERTY(middle_tax_rate_slider);
+ slider_value_t PROPERTY(rich_tax_rate_slider);
+
// TODO - cash stockpile change over last 30 days
/* Technology */
@@ -227,6 +235,8 @@ namespace OpenVic {
bool set_ruling_party(CountryParty const& new_ruling_party);
bool add_reform(Reform const& new_reform);
+ bool set_value_for_slider(SliderManager& slider_manager, int const* new_value);
+
template<UnitType::branch_t Branch>
bool add_unit_instance_group(UnitInstanceGroup<Branch>& group);
template<UnitType::branch_t Branch>