aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics/NationalFocus.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-31 01:47:31 +0100
committer hop311 <hop3114@gmail.com>2024-01-02 14:41:28 +0100
commit5f64f983d0cead266a28791be42162c443fd2a75 (patch)
treeda5fbb48d6c01d6faedd16b46ff846c65fdb4c33 /src/openvic-simulation/politics/NationalFocus.hpp
parent9988b21278dc1c8df044631bd2935a7e450a7bff (diff)
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.hpp27
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