aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics/Ideology.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-01-02 15:40:00 +0100
committer GitHub <noreply@github.com>2024-01-02 15:40:00 +0100
commit4c8da86c3bede8834f381fa63edaa3e140131f69 (patch)
treeff3433a63e91b9239eb7226e75054314182d6c1f /src/openvic-simulation/politics/Ideology.hpp
parent66b80459c9d49895de902432bce11176b1270878 (diff)
parent5f64f983d0cead266a28791be42162c443fd2a75 (diff)
Merge pull request #112 from OpenVicProject/script-framework
Added framework for loading all Conditions and Effects
Diffstat (limited to 'src/openvic-simulation/politics/Ideology.hpp')
-rw-r--r--src/openvic-simulation/politics/Ideology.hpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/openvic-simulation/politics/Ideology.hpp b/src/openvic-simulation/politics/Ideology.hpp
index 8039dbd..ad07f06 100644
--- a/src/openvic-simulation/politics/Ideology.hpp
+++ b/src/openvic-simulation/politics/Ideology.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "openvic-simulation/scripts/ConditionalWeight.hpp"
#include "openvic-simulation/types/IdentifierRegistry.hpp"
namespace OpenVic {
@@ -23,14 +24,25 @@ namespace OpenVic {
const bool PROPERTY_CUSTOM_PREFIX(uncivilised, is);
const bool PROPERTY(can_reduce_militancy);
const Date PROPERTY(spawn_date);
+ ConditionalWeight PROPERTY(add_political_reform);
+ ConditionalWeight PROPERTY(remove_political_reform);
+ ConditionalWeight PROPERTY(add_social_reform);
+ ConditionalWeight PROPERTY(remove_social_reform);
+ ConditionalWeight PROPERTY(add_military_reform);
+ ConditionalWeight PROPERTY(add_economic_reform);
// TODO - willingness to repeal/pass reforms (and its modifiers)
Ideology(
std::string_view new_identifier, colour_t new_colour, IdeologyGroup const& new_group, bool new_uncivilised,
- bool new_can_reduce_militancy, Date new_spawn_date
+ bool new_can_reduce_militancy, Date new_spawn_date, ConditionalWeight&& new_add_political_reform,
+ ConditionalWeight&& new_remove_political_reform, ConditionalWeight&& new_add_social_reform,
+ ConditionalWeight&& new_remove_social_reform, ConditionalWeight&& new_add_military_reform,
+ ConditionalWeight&& new_add_economic_reform
);
+ bool parse_scripts(GameManager const& game_manager);
+
public:
Ideology(Ideology&&) = default;
};
@@ -45,9 +57,14 @@ namespace OpenVic {
bool add_ideology(
std::string_view identifier, colour_t colour, IdeologyGroup const* group, bool uncivilised,
- bool can_reduce_militancy, Date spawn_date
+ bool can_reduce_militancy, Date spawn_date, ConditionalWeight&& add_political_reform,
+ ConditionalWeight&& remove_political_reform, ConditionalWeight&& add_social_reform,
+ ConditionalWeight&& remove_social_reform, ConditionalWeight&& add_military_reform,
+ ConditionalWeight&& add_economic_reform
);
bool load_ideology_file(ast::NodeCPtr root);
+
+ bool parse_scripts(GameManager const& game_manager);
};
}