10
10
#include " datastructure/constexpr_map.h"
11
11
#include " gamestate/activity/condition/command_in_queue.h"
12
12
#include " gamestate/activity/condition/next_command.h"
13
+ #include " gamestate/activity/condition/next_command_switch.h"
13
14
#include " gamestate/activity/event/command_in_queue.h"
14
15
#include " gamestate/activity/event/wait.h"
15
16
#include " gamestate/activity/types.h"
16
17
#include " gamestate/activity/xor_event_gate.h"
17
18
#include " gamestate/activity/xor_gate.h"
19
+ #include " gamestate/activity/xor_switch_gate.h"
18
20
#include " gamestate/api/types.h"
19
21
#include " gamestate/system/types.h"
20
22
@@ -237,7 +239,9 @@ static const auto ACTIVITY_NODE_DEFS = datastructure::create_const_map<std::stri
237
239
std::pair(" engine.util.activity.node.type.XORGate" ,
238
240
activity::node_t ::XOR_GATE),
239
241
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));
241
245
242
246
/* *
243
247
* 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
265
269
std::pair(" engine.util.activity.condition.type.NextCommandMove" ,
266
270
std::function (gamestate::activity::next_command_move)));
267
271
272
+ /* *
273
+ * Maps API activity event types to event primer functions.
274
+ */
268
275
static const auto ACTIVITY_EVENT_PRIMERS = datastructure::create_const_map<std::string, activity::event_primer_t >(
269
276
std::pair (" engine.util.activity.event.type.CommandInQueue" ,
270
277
std::function (gamestate::activity::primer_command_in_queue)),
@@ -273,6 +280,19 @@ static const auto ACTIVITY_EVENT_PRIMERS = datastructure::create_const_map<std::
273
280
std::pair(" engine.util.activity.event.type.WaitAbility" ,
274
281
std::function (gamestate::activity::primer_wait)));
275
282
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
+
276
296
/* *
277
297
* Maps internal patch property types to nyan API values.
278
298
*/
0 commit comments