diff options
author | hop311 <hop3114@gmail.com> | 2024-03-18 20:30:27 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-03-20 23:31:32 +0100 |
commit | 721577e1210c8e9a526b69c77b0bddb098fd5d1e (patch) | |
tree | 0f94bd4f362415e3d0e106a7268018774c6837b2 /src/openvic-simulation/politics/Issue.hpp | |
parent | c11d262a4d2c987c8cf8e0d4b24929cbe56bb289 (diff) |
Add Issue/Reform/Party colours + improve loading
Diffstat (limited to 'src/openvic-simulation/politics/Issue.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Issue.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/openvic-simulation/politics/Issue.hpp b/src/openvic-simulation/politics/Issue.hpp index b836e6f..68302bd 100644 --- a/src/openvic-simulation/politics/Issue.hpp +++ b/src/openvic-simulation/politics/Issue.hpp @@ -1,6 +1,5 @@ #pragma once -#include "openvic-simulation/dataloader/NodeTools.hpp" #include "openvic-simulation/misc/Modifier.hpp" #include "openvic-simulation/politics/Rule.hpp" #include "openvic-simulation/scripts/ConditionScript.hpp" @@ -22,7 +21,7 @@ namespace OpenVic { }; // Issue (i.e. protectionism) - struct Issue : Modifier { + struct Issue : HasIdentifierAndColour, ModifierValue { friend struct IssueManager; private: @@ -32,7 +31,7 @@ namespace OpenVic { protected: Issue( - std::string_view new_identifier, ModifierValue&& new_values, IssueGroup const& new_group, + std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, IssueGroup const& new_group, RuleSet&& new_rules, bool new_jingoism ); @@ -83,8 +82,8 @@ namespace OpenVic { EffectScript PROPERTY(on_execute_effect); Reform( - std::string_view new_identifier, ModifierValue&& new_values, ReformGroup const& new_group, size_t new_ordinal, - RuleSet&& new_rules, tech_cost_t new_technology_cost, ConditionScript&& new_allow, + std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, ReformGroup const& new_group, + size_t new_ordinal, RuleSet&& new_rules, tech_cost_t new_technology_cost, ConditionScript&& new_allow, ConditionScript&& new_on_execute_trigger, EffectScript&& new_on_execute_effect ); @@ -119,13 +118,14 @@ namespace OpenVic { public: bool add_issue_group(std::string_view identifier); bool add_issue( - std::string_view identifier, ModifierValue&& values, IssueGroup const* group, RuleSet&& rules, bool jingoism + std::string_view identifier, colour_t new_colour, ModifierValue&& values, IssueGroup const* group, RuleSet&& rules, + bool jingoism ); bool add_reform_type(std::string_view identifier, bool uncivilised); bool add_reform_group(std::string_view identifier, ReformType const* type, bool ordered, bool administrative); bool add_reform( - std::string_view identifier, ModifierValue&& values, ReformGroup const* group, size_t ordinal, RuleSet&& rules, - Reform::tech_cost_t technology_cost, ConditionScript&& allow, ConditionScript&& on_execute_trigger, + std::string_view identifier, colour_t new_colour, ModifierValue&& values, ReformGroup const* group, size_t ordinal, + RuleSet&& rules, Reform::tech_cost_t technology_cost, ConditionScript&& allow, ConditionScript&& on_execute_trigger, EffectScript&& on_execute_effect ); bool load_issues_file(ModifierManager const& modifier_manager, RuleManager const& rule_manager, ast::NodeCPtr root); |