diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-02 15:40:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 15:40:00 +0100 |
commit | 4c8da86c3bede8834f381fa63edaa3e140131f69 (patch) | |
tree | ff3433a63e91b9239eb7226e75054314182d6c1f /src/openvic-simulation/politics/NationalFocus.hpp | |
parent | 66b80459c9d49895de902432bce11176b1270878 (diff) | |
parent | 5f64f983d0cead266a28791be42162c443fd2a75 (diff) |
Merge pull request #112 from OpenVicProject/script-framework
Added framework for loading all Conditions and Effects
Diffstat (limited to 'src/openvic-simulation/politics/NationalFocus.hpp')
-rw-r--r-- | src/openvic-simulation/politics/NationalFocus.hpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/openvic-simulation/politics/NationalFocus.hpp b/src/openvic-simulation/politics/NationalFocus.hpp index 0fe0ddc..44e58e3 100644 --- a/src/openvic-simulation/politics/NationalFocus.hpp +++ b/src/openvic-simulation/politics/NationalFocus.hpp @@ -1,13 +1,12 @@ #pragma once -#include "openvic-simulation/types/IdentifierRegistry.hpp" -#include "openvic-simulation/utility/Getters.hpp" +#include "openvic-simulation/economy/Good.hpp" #include "openvic-simulation/misc/Modifier.hpp" -#include "openvic-simulation/pop/Pop.hpp" #include "openvic-simulation/politics/Ideology.hpp" -#include "openvic-simulation/economy/Good.hpp" - -#include <optional> +#include "openvic-simulation/pop/Pop.hpp" +#include "openvic-simulation/scripts/ConditionScript.hpp" +#include "openvic-simulation/types/IdentifierRegistry.hpp" +#include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { struct NationalFocusManager; @@ -34,6 +33,7 @@ namespace OpenVic { pop_promotion_map_t PROPERTY(encouraged_promotion); party_loyalty_map_t PROPERTY(encouraged_loyalty); production_map_t PROPERTY(encouraged_production); + ConditionScript PROPERTY(limit); NationalFocus( std::string_view new_identifier, @@ -42,9 +42,12 @@ namespace OpenVic { ModifierValue&& new_modifiers, pop_promotion_map_t&& new_encouraged_promotion, party_loyalty_map_t&& new_encouraged_loyalty, - production_map_t&& new_encouraged_production + production_map_t&& new_encouraged_production, + ConditionScript&& new_limit ); + bool parse_scripts(GameManager const& game_manager); + public: NationalFocus(NationalFocus&&) = default; }; @@ -64,9 +67,15 @@ namespace OpenVic { ModifierValue&& modifiers, NationalFocus::pop_promotion_map_t&& encouraged_promotion, NationalFocus::party_loyalty_map_t&& encouraged_loyalty, - NationalFocus::production_map_t&& encouraged_production + NationalFocus::production_map_t&& encouraged_production, + ConditionScript&& limit + ); + + bool load_national_foci_file( + PopManager const& pop_manager, IdeologyManager const& ideology_manager, GoodManager const& good_manager, + ModifierManager const& modifier_manager, ast::NodeCPtr root ); - bool load_national_foci_file(PopManager const& pop_manager, IdeologyManager const& ideology_manager, GoodManager const& good_manager, ModifierManager const& modifier_manager, ast::NodeCPtr root); + bool parse_scripts(GameManager const& game_manager); }; } // namespace OpenVic |