diff options
author | zaaarf <80046572+zaaarf@users.noreply.github.com> | 2023-12-05 22:53:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 22:53:07 +0100 |
commit | 48a3f1729d709847d7cad33f594c77cac414e802 (patch) | |
tree | d890ed3ca182a960a35e5d1edae16e32e7f2b836 /src/openvic-simulation/politics | |
parent | db00dcfb8c72448fea73e752e1f5c18047738876 (diff) | |
parent | fa2ca50905f327713207069cf9a2e66cf6c00076 (diff) |
Merge pull request #83 from OpenVicProject/dataloading-inventions
Dataloading inventions
Diffstat (limited to 'src/openvic-simulation/politics')
-rw-r--r-- | src/openvic-simulation/politics/Rebel.cpp | 14 | ||||
-rw-r--r-- | src/openvic-simulation/politics/Rebel.hpp | 6 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/openvic-simulation/politics/Rebel.cpp b/src/openvic-simulation/politics/Rebel.cpp index e58b3de..ec39c9e 100644 --- a/src/openvic-simulation/politics/Rebel.cpp +++ b/src/openvic-simulation/politics/Rebel.cpp @@ -142,4 +142,18 @@ bool RebelManager::load_rebels_file( lock_rebel_types(); return ret; +} + +bool RebelManager::generate_modifiers(ModifierManager& modifier_manager) { + bool ret = true; + + modifier_manager.register_complex_modifier("rebel_org_gain"); + + ret &= modifier_manager.add_modifier_effect("rebel_org_gain_all", false); + + for (RebelType const& rebel_type : get_rebel_types()) { + std::string modifier_name = StringUtils::append_string_views("rebel_org_gain_", rebel_type.get_identifier()); + ret &= modifier_manager.add_modifier_effect(modifier_name, false); + } + return ret; }
\ No newline at end of file diff --git a/src/openvic-simulation/politics/Rebel.hpp b/src/openvic-simulation/politics/Rebel.hpp index f012829..ba7b33f 100644 --- a/src/openvic-simulation/politics/Rebel.hpp +++ b/src/openvic-simulation/politics/Rebel.hpp @@ -1,5 +1,6 @@ #pragma once +#include "openvic-simulation/misc/Modifier.hpp" #include "openvic-simulation/types/IdentifierRegistry.hpp" #include "openvic-simulation/politics/Government.hpp" #include "openvic-simulation/politics/Ideology.hpp" @@ -78,8 +79,7 @@ namespace OpenVic { bool reinforcing, bool general, bool smart, bool unit_transfer, fixed_point_t occupation_mult ); - bool load_rebels_file( - IdeologyManager const& ideology_manager, GovernmentTypeManager const& government_type_manager, ast::NodeCPtr root - ); + bool load_rebels_file(IdeologyManager const& ideology_manager, GovernmentTypeManager const& government_type_manager, ast::NodeCPtr root); + bool generate_modifiers(ModifierManager& modifier_manager); }; }
\ No newline at end of file |