1use spring_ai_sys::{
2 EventTopic as EventTopic_Sys, EventTopic_EVENT_COMMAND_FINISHED,
3 EventTopic_EVENT_ENEMY_CREATED, EventTopic_EVENT_ENEMY_DAMAGED,
4 EventTopic_EVENT_ENEMY_DESTROYED, EventTopic_EVENT_ENEMY_ENTER_LOS,
5 EventTopic_EVENT_ENEMY_ENTER_RADAR, EventTopic_EVENT_ENEMY_FINISHED,
6 EventTopic_EVENT_ENEMY_LEAVE_LOS, EventTopic_EVENT_ENEMY_LEAVE_RADAR, EventTopic_EVENT_INIT,
7 EventTopic_EVENT_LOAD, EventTopic_EVENT_LUA_MESSAGE, EventTopic_EVENT_MESSAGE,
8 EventTopic_EVENT_NULL, EventTopic_EVENT_PLAYER_COMMAND, EventTopic_EVENT_RELEASE,
9 EventTopic_EVENT_SAVE, EventTopic_EVENT_SEISMIC_PING, EventTopic_EVENT_UNIT_CAPTURED,
10 EventTopic_EVENT_UNIT_CREATED, EventTopic_EVENT_UNIT_DAMAGED, EventTopic_EVENT_UNIT_DESTROYED,
11 EventTopic_EVENT_UNIT_FINISHED, EventTopic_EVENT_UNIT_GIVEN, EventTopic_EVENT_UNIT_IDLE,
12 EventTopic_EVENT_UNIT_MOVE_FAILED, EventTopic_EVENT_UPDATE, EventTopic_EVENT_WEAPON_FIRED,
13};
14
15pub enum EventTopic {
16 CommandFinished,
17 EnemyCreated,
18 EnemyDamaged,
19 EnemyDestroyed,
20 EnemyEnterLOS,
21 EnemyEnterRadar,
22 EnemyFinished,
23 EnemyLeaveLOS,
24 EnemyLeaveRadar,
25 Init,
26 Load,
27 LuaMessage,
28 Message,
29 Null,
30 PlayerCommand,
31 Release,
32 Save,
33 SeismicPing,
34 UnitCaptured,
35 UnitCreated,
36 UnitDamaged,
37 UnitDestroyed,
38 UnitFinished,
39 UnitGiven,
40 UnitIdle,
41 UnitMoveFailed,
42 Update,
43 WeaponFired,
44}
45
46#[allow(non_upper_case_globals)]
47impl From<EventTopic_Sys> for EventTopic {
48 fn from(event_topic_sys: EventTopic_Sys) -> Self {
49 match event_topic_sys {
50 EventTopic_EVENT_COMMAND_FINISHED => EventTopic::CommandFinished,
51 EventTopic_EVENT_ENEMY_CREATED => EventTopic::EnemyCreated,
52 EventTopic_EVENT_ENEMY_DAMAGED => EventTopic::EnemyDamaged,
53 EventTopic_EVENT_ENEMY_DESTROYED => EventTopic::EnemyDestroyed,
54 EventTopic_EVENT_ENEMY_ENTER_LOS => EventTopic::EnemyEnterLOS,
55 EventTopic_EVENT_ENEMY_ENTER_RADAR => EventTopic::EnemyEnterRadar,
56 EventTopic_EVENT_ENEMY_FINISHED => EventTopic::EnemyFinished,
57 EventTopic_EVENT_ENEMY_LEAVE_LOS => EventTopic::EnemyLeaveLOS,
58 EventTopic_EVENT_ENEMY_LEAVE_RADAR => EventTopic::EnemyLeaveRadar,
59 EventTopic_EVENT_INIT => EventTopic::Init,
60 EventTopic_EVENT_LOAD => EventTopic::Load,
61 EventTopic_EVENT_LUA_MESSAGE => EventTopic::LuaMessage,
62 EventTopic_EVENT_MESSAGE => EventTopic::Message,
63 EventTopic_EVENT_NULL => EventTopic::Null,
64 EventTopic_EVENT_PLAYER_COMMAND => EventTopic::PlayerCommand,
65 EventTopic_EVENT_RELEASE => EventTopic::Release,
66 EventTopic_EVENT_SAVE => EventTopic::Save,
67 EventTopic_EVENT_SEISMIC_PING => EventTopic::SeismicPing,
68 EventTopic_EVENT_UNIT_CAPTURED => EventTopic::UnitCaptured,
69 EventTopic_EVENT_UNIT_CREATED => EventTopic::UnitCreated,
70 EventTopic_EVENT_UNIT_DAMAGED => EventTopic::UnitDamaged,
71 EventTopic_EVENT_UNIT_DESTROYED => EventTopic::UnitDestroyed,
72 EventTopic_EVENT_UNIT_FINISHED => EventTopic::UnitFinished,
73 EventTopic_EVENT_UNIT_GIVEN => EventTopic::UnitGiven,
74 EventTopic_EVENT_UNIT_IDLE => EventTopic::UnitIdle,
75 EventTopic_EVENT_UNIT_MOVE_FAILED => EventTopic::UnitMoveFailed,
76 EventTopic_EVENT_UPDATE => EventTopic::Update,
77 EventTopic_EVENT_WEAPON_FIRED => EventTopic::WeaponFired,
78 _ => EventTopic::Null,
79 }
80 }
81}