14209
|
1 |
#[derive(Debug, PartialEq)]
|
|
2 |
pub enum KeystrokeAction {
|
|
3 |
Press,
|
|
4 |
Release,
|
|
5 |
}
|
|
6 |
|
|
7 |
#[derive(Debug, PartialEq)]
|
|
8 |
pub enum SyncedEngineMessage {
|
|
9 |
Left(KeystrokeAction),
|
|
10 |
Right(KeystrokeAction),
|
|
11 |
Up(KeystrokeAction),
|
|
12 |
Down(KeystrokeAction),
|
|
13 |
Precise(KeystrokeAction),
|
|
14 |
Attack(KeystrokeAction),
|
|
15 |
NextTurn,
|
|
16 |
Switch,
|
|
17 |
Timer(u8),
|
|
18 |
Slot(u8),
|
|
19 |
SetWeapon(u8),
|
|
20 |
Put(i32, i32),
|
14211
|
21 |
CursorMove(i32, i32),
|
14209
|
22 |
HighJump,
|
14211
|
23 |
LongJump,
|
14209
|
24 |
Skip,
|
|
25 |
TeamControlGained(String),
|
|
26 |
TeamControlLost(String),
|
14210
|
27 |
TimeWrap,
|
14209
|
28 |
}
|
|
29 |
|
|
30 |
#[derive(Debug, PartialEq)]
|
|
31 |
pub enum UnsyncedEngineMessage {
|
|
32 |
Ping,
|
|
33 |
Pong,
|
|
34 |
Say(String),
|
|
35 |
Taunt(u8),
|
|
36 |
GameType(u8),
|
|
37 |
Warning(String),
|
|
38 |
StopSyncing,
|
|
39 |
GameOver,
|
|
40 |
GameInterrupted,
|
|
41 |
GameSetupChecksum(String),
|
14211
|
42 |
TeamControlGained(String),
|
|
43 |
TeamControlLost(String),
|
14209
|
44 |
}
|
|
45 |
|
|
46 |
#[derive(Debug, PartialEq)]
|
|
47 |
pub enum ConfigEngineMessage {
|
|
48 |
ConfigRequest,
|
|
49 |
SetAmmo(String),
|
|
50 |
SetScript(String),
|
|
51 |
SetScriptParam(String),
|
|
52 |
Spectate,
|
|
53 |
TeamLocality(bool),
|
|
54 |
SetMap(String),
|
|
55 |
SetTheme(String),
|
|
56 |
SetSeed(String),
|
|
57 |
SetTemplateFilter(String),
|
|
58 |
SetMapGenerator(String),
|
|
59 |
SetFeatureSize(u8),
|
|
60 |
SetDelay(u32),
|
|
61 |
SetReadyDelay(u32),
|
|
62 |
SetCratesFrequency(u8),
|
|
63 |
SetHealthCrateProbability(u8),
|
|
64 |
SetHealthCratesNumber(u8),
|
|
65 |
SetRoundsTilSuddenDeath(u8),
|
|
66 |
SetSuddenDeathWaterRiseSpeed(u8),
|
|
67 |
SetSuddenDeathHealthDecreaseRate(u8),
|
|
68 |
SetDamageMultiplier(u32),
|
|
69 |
SetRopeLength(u32),
|
|
70 |
SetGetawayTime(u32),
|
|
71 |
SetDudMinesPercent(u8),
|
|
72 |
SetMinesNumber(u32),
|
|
73 |
SetAirMinesNumber(u32),
|
|
74 |
SetBarrelsNumber(u32),
|
|
75 |
SetTurnTime(u32),
|
|
76 |
SetMinesTime(u32),
|
|
77 |
SetWorldEdge(u8),
|
|
78 |
Draw,
|
|
79 |
// TODO
|
|
80 |
SetVoicePack(String),
|
|
81 |
AddHedgehog(String, u8, u32),
|
|
82 |
AddTeam(String, u8),
|
|
83 |
SetHedgehogCoordinates(i32, i32),
|
|
84 |
SetFort(String),
|
|
85 |
SetGrave(String),
|
|
86 |
SetHat(String),
|
|
87 |
SetFlag(String),
|
|
88 |
SetOwner(String),
|
|
89 |
SetOneClanMode(bool),
|
|
90 |
SetMultishootMode(bool),
|
|
91 |
SetSolidLand(bool),
|
|
92 |
SetBorders(bool),
|
|
93 |
SetDivideTeams(bool),
|
|
94 |
SetLowGravity(bool),
|
|
95 |
SetLaserSight(bool),
|
|
96 |
SetInvulnerability(bool),
|
|
97 |
SetHealthReset(bool),
|
|
98 |
SetVampiric(bool),
|
|
99 |
SetKarma(bool),
|
|
100 |
SetArtilleryMode(bool),
|
|
101 |
SetHedgehogSwitch(bool),
|
|
102 |
SetRandomOrder(bool),
|
|
103 |
SetKingMode(bool),
|
|
104 |
SetPlaceHedgehog(bool),
|
|
105 |
SetSharedAmmo(bool),
|
|
106 |
SetGirdersEnabled(bool),
|
|
107 |
SetLandObjectsEnabled(bool),
|
|
108 |
SetAISurvivalMode(bool),
|
|
109 |
SetInfiniteAttack(bool),
|
|
110 |
SetResetWeapons(bool),
|
|
111 |
SetAmmoPerHedgehog(bool),
|
|
112 |
SetWindMode(u8),
|
|
113 |
SetTagTeam(bool),
|
|
114 |
SetBottomBorder(bool),
|
|
115 |
SetShoppaBorder(bool),
|
|
116 |
}
|
|
117 |
|
|
118 |
#[derive(Debug, PartialEq)]
|
|
119 |
pub enum EngineMessage {
|
|
120 |
Synced(SyncedEngineMessage, u32),
|
|
121 |
Unsynced(UnsyncedEngineMessage),
|
|
122 |
Config(ConfigEngineMessage),
|
|
123 |
Unknown,
|
|
124 |
Empty,
|
|
125 |
}
|
|
126 |
|
|
127 |
impl EngineMessage {
|
|
128 |
fn from_bytes(buf: &[u8]) -> Self {
|
|
129 |
unimplemented!()
|
|
130 |
}
|
|
131 |
|
|
132 |
fn to_bytes(&self) -> Vec<u8> {
|
|
133 |
unimplemented!()
|
|
134 |
}
|
|
135 |
}
|