1010#include " datastructure/constexpr_map.h"
1111#include " gamestate/activity/condition/command_in_queue.h"
1212#include " gamestate/activity/condition/next_command.h"
13+ #include " gamestate/activity/condition/next_command_switch.h"
1314#include " gamestate/activity/event/command_in_queue.h"
1415#include " gamestate/activity/event/wait.h"
1516#include " gamestate/activity/types.h"
1617#include " gamestate/activity/xor_event_gate.h"
1718#include " gamestate/activity/xor_gate.h"
19+ #include " gamestate/activity/xor_switch_gate.h"
1820#include " gamestate/api/types.h"
1921#include " gamestate/system/types.h"
2022
@@ -237,7 +239,9 @@ static const auto ACTIVITY_NODE_DEFS = datastructure::create_const_map<std::stri
237239 std::pair(" engine.util.activity.node.type.XORGate" ,
238240 activity::node_t ::XOR_GATE),
239241 std::pair(" engine.util.activity.node.type.XOREventGate" ,
240- activity::node_t ::XOR_EVENT_GATE));
242+ activity::node_t ::XOR_EVENT_GATE),
243+ std::pair(" engine.util.activity.node.type.XORSwitchGate" ,
244+ activity::node_t ::XOR_SWITCH_GATE));
241245
242246/* *
243247 * Maps API activity task system types to engine system types.
@@ -265,6 +269,9 @@ static const auto ACTIVITY_CONDITIONS = datastructure::create_const_map<std::str
265269 std::pair(" engine.util.activity.condition.type.NextCommandMove" ,
266270 std::function (gamestate::activity::next_command_move)));
267271
272+ /* *
273+ * Maps API activity event types to event primer functions.
274+ */
268275static const auto ACTIVITY_EVENT_PRIMERS = datastructure::create_const_map<std::string, activity::event_primer_t >(
269276 std::pair (" engine.util.activity.event.type.CommandInQueue" ,
270277 std::function (gamestate::activity::primer_command_in_queue)),
@@ -273,6 +280,19 @@ static const auto ACTIVITY_EVENT_PRIMERS = datastructure::create_const_map<std::
273280 std::pair(" engine.util.activity.event.type.WaitAbility" ,
274281 std::function (gamestate::activity::primer_wait)));
275282
283+ /* *
284+ * Maps API activity switch condition types to lookup functions.
285+ */
286+ static const auto ACTIVITY_SWITCH_CONDITIONS = datastructure::create_const_map<std::string,
287+ activity::XorSwitchGate::lookup_function_t >(
288+ std::pair (" engine.util.activity.switch_condition.type.NextCommand" ,
289+ std::function (gamestate::activity::next_command_switch)));
290+
291+ static const auto ACTIVITY_SWITCH_CONDITION_TYPES = datastructure::create_const_map<std::string,
292+ switch_condition_t >(
293+ std::pair (" engine.util.activity.switch_condition.type.NextCommand" ,
294+ switch_condition_t ::NEXT_COMMAND));
295+
276296/* *
277297 * Maps internal patch property types to nyan API values.
278298 */
0 commit comments