diff options
author | Hop311 <Hop3114@gmail.com> | 2024-06-13 18:59:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 18:59:47 +0200 |
commit | bfd539513af435564daf70f94f6cce146dd5c948 (patch) | |
tree | 7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/scripts/Condition.hpp | |
parent | 01a8f60aaca9784d814f4cb35a3fc4be86e1dd20 (diff) | |
parent | 4b39e77304094708d5c503b6a221386408cc4409 (diff) |
Merge pull request #165 from OpenVicProject/instance-definition-managers
Separated GameManager into Definition and Instance Managers
Diffstat (limited to 'src/openvic-simulation/scripts/Condition.hpp')
-rw-r--r-- | src/openvic-simulation/scripts/Condition.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/openvic-simulation/scripts/Condition.hpp b/src/openvic-simulation/scripts/Condition.hpp index 5aa45e8..748453f 100644 --- a/src/openvic-simulation/scripts/Condition.hpp +++ b/src/openvic-simulation/scripts/Condition.hpp @@ -10,7 +10,7 @@ namespace OpenVic { struct ConditionManager; struct ConditionScript; - struct GameManager; + struct DefinitionManager; enum class value_type_t : uint8_t { NO_TYPE = 0, @@ -222,7 +222,9 @@ namespace OpenVic { using real_t = fixed_point_t; using identifier_real_t = std::pair<std::string, real_t>; using condition_list_t = std::vector<ConditionNode>; - using value_t = std::variant<string_t, boolean_t, double_boolean_t, integer_t, real_t, identifier_real_t, condition_list_t>; + using value_t = std::variant< + string_t, boolean_t, double_boolean_t, integer_t, real_t, identifier_real_t, condition_list_t + >; private: Condition const* PROPERTY(condition); @@ -252,25 +254,25 @@ namespace OpenVic { ); NodeTools::callback_t<std::string_view> expect_parse_identifier( - GameManager const& game_manager, identifier_type_t identifier_type, + DefinitionManager const& definition_manager, identifier_type_t identifier_type, NodeTools::callback_t<HasIdentifier const*> callback ) const; NodeTools::node_callback_t expect_condition_node( - GameManager const& game_manager, Condition const& condition, scope_t this_scope, + DefinitionManager const& definition_manager, Condition const& condition, scope_t this_scope, scope_t from_scope, scope_t cur_scope, NodeTools::callback_t<ConditionNode&&> callback ) const; NodeTools::node_callback_t expect_condition_node_list( - GameManager const& game_manager, scope_t this_scope, scope_t from_scope, + DefinitionManager const& definition_manager, scope_t this_scope, scope_t from_scope, scope_t cur_scope, bool top_scope, NodeTools::callback_t<ConditionNode&&> callback ) const; public: - bool setup_conditions(GameManager const& game_manager); + bool setup_conditions(DefinitionManager const& definition_manager); NodeTools::node_callback_t expect_condition_script( - GameManager const& game_manager, scope_t initial_scope, scope_t this_scope, scope_t from_scope, + DefinitionManager const& definition_manager, scope_t initial_scope, scope_t this_scope, scope_t from_scope, NodeTools::callback_t<ConditionNode&&> callback ) const; }; |