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/map/Crime.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/map/Crime.hpp')
-rw-r--r-- | src/openvic-simulation/map/Crime.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/openvic-simulation/map/Crime.hpp b/src/openvic-simulation/map/Crime.hpp index 26f52ab..01044f9 100644 --- a/src/openvic-simulation/map/Crime.hpp +++ b/src/openvic-simulation/map/Crime.hpp @@ -9,7 +9,10 @@ namespace OpenVic { private: const bool PROPERTY(default_active); - Crime(std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon, bool new_default_active); + Crime( + std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon, ConditionScript&& new_trigger, + bool new_default_active + ); public: Crime(Crime&&) = default; @@ -21,9 +24,12 @@ namespace OpenVic { public: bool add_crime_modifier( - std::string_view identifier, ModifierValue&& values, Modifier::icon_t icon, bool default_active + std::string_view identifier, ModifierValue&& values, Modifier::icon_t icon, ConditionScript&& trigger, + bool default_active ); bool load_crime_modifiers(ModifierManager const& modifier_manager, ast::NodeCPtr root); + + bool parse_scripts(GameManager const& game_manager); }; } |