diff options
author | hop311 <hop3114@gmail.com> | 2023-12-31 01:47:31 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-02 14:41:28 +0100 |
commit | 5f64f983d0cead266a28791be42162c443fd2a75 (patch) | |
tree | da5fbb48d6c01d6faedd16b46ff846c65fdb4c33 /src/openvic-simulation/politics/Ideology.hpp | |
parent | 9988b21278dc1c8df044631bd2935a7e450a7bff (diff) |
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.hpp | 21 |
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); }; } |