aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-12-01 20:03:03 +0100
committer zaaarf <zaaarf@proton.me>2023-12-01 20:03:03 +0100
commit2d76e0766f0d65ffd8c9eb19eaec705445f91af0 (patch)
treea3ba37c2d652b95085ac8cf72a25941da26498ad /src/openvic-simulation/politics
parenta54898b7770e0d66b729216173960686c67e58bb (diff)
feat: replaced REF_GETTERS with PROPERTY_REF, added PROPERTY_CUSTOM_PREFIX
Diffstat (limited to 'src/openvic-simulation/politics')
-rw-r--r--src/openvic-simulation/politics/Government.hpp4
-rw-r--r--src/openvic-simulation/politics/Ideology.hpp2
-rw-r--r--src/openvic-simulation/politics/Issue.hpp4
-rw-r--r--src/openvic-simulation/politics/PoliticsManager.hpp16
4 files changed, 10 insertions, 16 deletions
diff --git a/src/openvic-simulation/politics/Government.hpp b/src/openvic-simulation/politics/Government.hpp
index fde7d32..0bc777a 100644
--- a/src/openvic-simulation/politics/Government.hpp
+++ b/src/openvic-simulation/politics/Government.hpp
@@ -10,8 +10,8 @@ namespace OpenVic {
private:
const std::vector<Ideology const*> PROPERTY(ideologies);
- const bool PROPERTY_CUSTOM_NAME(elections, holds_elections);
- const bool PROPERTY_CUSTOM_NAME(appoint_ruling_party, can_appoint_ruling_party);
+ const bool PROPERTY_CUSTOM_PREFIX(elections, holds);
+ const bool PROPERTY_CUSTOM_PREFIX(appoint_ruling_party, can);
const Timespan PROPERTY(term_duration);
const std::string PROPERTY_CUSTOM_NAME(flag_type_identifier, get_flag_type);
diff --git a/src/openvic-simulation/politics/Ideology.hpp b/src/openvic-simulation/politics/Ideology.hpp
index 47ae45b..dd3f07a 100644
--- a/src/openvic-simulation/politics/Ideology.hpp
+++ b/src/openvic-simulation/politics/Ideology.hpp
@@ -20,7 +20,7 @@ namespace OpenVic {
private:
IdeologyGroup const& PROPERTY(group);
- const bool PROPERTY_CUSTOM_NAME(uncivilised, is_uncivilised);
+ const bool PROPERTY_CUSTOM_PREFIX(uncivilised, is);
const bool PROPERTY(can_reduce_militancy);
const Date PROPERTY(spawn_date);
diff --git a/src/openvic-simulation/politics/Issue.hpp b/src/openvic-simulation/politics/Issue.hpp
index 0dceae9..e9d154f 100644
--- a/src/openvic-simulation/politics/Issue.hpp
+++ b/src/openvic-simulation/politics/Issue.hpp
@@ -56,8 +56,8 @@ namespace OpenVic {
private:
ReformType const& PROPERTY(type);
- const bool PROPERTY_CUSTOM_NAME(ordered, is_ordered); // next_step_only
- const bool PROPERTY_CUSTOM_NAME(administrative, is_administrative);
+ const bool PROPERTY_CUSTOM_PREFIX(ordered, is); // next_step_only
+ const bool PROPERTY_CUSTOM_PREFIX(administrative, is);
ReformGroup(std::string_view identifier, ReformType const& type, bool ordered, bool administrative);
diff --git a/src/openvic-simulation/politics/PoliticsManager.hpp b/src/openvic-simulation/politics/PoliticsManager.hpp
index b30d1c0..532e64f 100644
--- a/src/openvic-simulation/politics/PoliticsManager.hpp
+++ b/src/openvic-simulation/politics/PoliticsManager.hpp
@@ -9,19 +9,13 @@
namespace OpenVic {
struct PoliticsManager {
private:
- GovernmentTypeManager government_type_manager;
- IdeologyManager ideology_manager;
- IssueManager issue_manager;
- NationalValueManager national_value_manager;
- NationalFocusManager national_focus_manager;
+ GovernmentTypeManager PROPERTY_REF(government_type_manager);
+ IdeologyManager PROPERTY_REF(ideology_manager);
+ IssueManager PROPERTY_REF(issue_manager);
+ NationalValueManager PROPERTY_REF(national_value_manager);
+ NationalFocusManager PROPERTY_REF(national_focus_manager);
public:
- REF_GETTERS(government_type_manager)
- REF_GETTERS(ideology_manager)
- REF_GETTERS(issue_manager)
- REF_GETTERS(national_value_manager)
- REF_GETTERS(national_focus_manager)
-
inline bool load_government_types_file(ast::NodeCPtr root) {
return government_type_manager.load_government_types_file(ideology_manager, root);
}