author | koda |
Sun, 05 Dec 2010 23:48:58 +0100 | |
changeset 4463 | 1fe77f2bc1d1 |
parent 4437 | 05192cdbce9b |
child 4522 | 0f590eefd531 |
permissions | -rw-r--r-- |
4413 | 1 |
{$INCLUDE "options.inc"} |
2 |
unit uCommandHandlers; |
|
3 |
||
4 |
interface |
|
5 |
||
6 |
procedure initModule; |
|
7 |
procedure freeModule; |
|
8 |
||
9 |
implementation |
|
4437
05192cdbce9b
un-break build (wrong merge in uConsole) and update project file with the new sources
koda
parents:
4413
diff
changeset
|
10 |
uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom; |
4413 | 11 |
|
12 |
procedure chQuit(var s: shortstring); |
|
13 |
const prevGState: TGameState = gsConfirm; |
|
14 |
begin |
|
15 |
s:= s; // avoid compiler hint |
|
16 |
if GameState <> gsConfirm then |
|
17 |
begin |
|
18 |
prevGState:= GameState; |
|
19 |
GameState:= gsConfirm |
|
20 |
end else |
|
21 |
GameState:= prevGState |
|
22 |
end; |
|
23 |
||
24 |
procedure chConfirm(var s: shortstring); |
|
25 |
begin |
|
26 |
s:= s; // avoid compiler hint |
|
27 |
if GameState = gsConfirm then |
|
28 |
begin |
|
29 |
SendIPC('Q'); |
|
30 |
GameState:= gsExit |
|
31 |
end |
|
32 |
else |
|
33 |
ParseCommand('chat team', true); |
|
34 |
end; |
|
35 |
||
36 |
procedure chCheckProto(var s: shortstring); |
|
37 |
var i, c: LongInt; |
|
38 |
begin |
|
39 |
if isDeveloperMode then |
|
40 |
begin |
|
41 |
val(s, i, c); |
|
42 |
if (c <> 0) or (i = 0) then exit; |
|
43 |
TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true); |
|
44 |
TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true) |
|
45 |
end |
|
46 |
end; |
|
47 |
||
48 |
procedure chTeamLocal(var s: shortstring); |
|
49 |
begin |
|
50 |
s:= s; // avoid compiler hint |
|
51 |
if not isDeveloperMode then exit; |
|
52 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true); |
|
53 |
CurrentTeam^.ExtDriven:= true |
|
54 |
end; |
|
55 |
||
56 |
procedure chGrave(var s: shortstring); |
|
57 |
begin |
|
58 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/grave"', true); |
|
59 |
if s[1]='"' then Delete(s, 1, 1); |
|
60 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
61 |
CurrentTeam^.GraveName:= s |
|
62 |
end; |
|
63 |
||
64 |
procedure chFort(var s: shortstring); |
|
65 |
begin |
|
66 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/fort"', true); |
|
67 |
if s[1]='"' then Delete(s, 1, 1); |
|
68 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
69 |
CurrentTeam^.FortName:= s |
|
70 |
end; |
|
71 |
||
72 |
procedure chFlag(var s: shortstring); |
|
73 |
begin |
|
74 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/flag"', true); |
|
75 |
if s[1]='"' then Delete(s, 1, 1); |
|
76 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
77 |
CurrentTeam^.flag:= s |
|
78 |
end; |
|
79 |
||
80 |
procedure chScript(var s: shortstring); |
|
81 |
begin |
|
82 |
if s[1]='"' then Delete(s, 1, 1); |
|
83 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
84 |
ScriptLoad(s) |
|
85 |
end; |
|
86 |
||
87 |
procedure chSetHat(var s: shortstring); |
|
88 |
begin |
|
89 |
if (not isDeveloperMode) or (CurrentTeam = nil) then exit; |
|
90 |
with CurrentTeam^ do |
|
91 |
begin |
|
92 |
if not CurrentHedgehog^.King then |
|
93 |
if (s = '') or |
|
94 |
(((GameFlags and gfKing) <> 0) and (s = 'crown')) or |
|
95 |
((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then |
|
96 |
CurrentHedgehog^.Hat:= 'NoHat' |
|
97 |
else |
|
98 |
CurrentHedgehog^.Hat:= s |
|
99 |
end; |
|
100 |
end; |
|
101 |
||
102 |
procedure chCurU_p(var s: shortstring); |
|
103 |
begin |
|
104 |
s:= s; // avoid compiler hint |
|
105 |
CursorMovementY:= -1; |
|
106 |
end; |
|
107 |
||
108 |
procedure chCurU_m(var s: shortstring); |
|
109 |
begin |
|
110 |
s:= s; // avoid compiler hint |
|
111 |
CursorMovementY:= 0; |
|
112 |
end; |
|
113 |
||
114 |
procedure chCurD_p(var s: shortstring); |
|
115 |
begin |
|
116 |
s:= s; // avoid compiler hint |
|
117 |
CursorMovementY:= 1; |
|
118 |
end; |
|
119 |
||
120 |
procedure chCurD_m(var s: shortstring); |
|
121 |
begin |
|
122 |
s:= s; // avoid compiler hint |
|
123 |
CursorMovementY:= 0; |
|
124 |
end; |
|
125 |
||
126 |
procedure chCurL_p(var s: shortstring); |
|
127 |
begin |
|
128 |
s:= s; // avoid compiler hint |
|
129 |
CursorMovementX:= -1; |
|
130 |
end; |
|
131 |
||
132 |
procedure chCurL_m(var s: shortstring); |
|
133 |
begin |
|
134 |
s:= s; // avoid compiler hint |
|
135 |
CursorMovementX:= 0; |
|
136 |
end; |
|
137 |
||
138 |
procedure chCurR_p(var s: shortstring); |
|
139 |
begin |
|
140 |
s:= s; // avoid compiler hint |
|
141 |
CursorMovementX:= 1; |
|
142 |
end; |
|
143 |
||
144 |
procedure chCurR_m(var s: shortstring); |
|
145 |
begin |
|
146 |
s:= s; // avoid compiler hint |
|
147 |
CursorMovementX:= 0; |
|
148 |
end; |
|
149 |
||
150 |
procedure chLeft_p(var s: shortstring); |
|
151 |
begin |
|
152 |
s:= s; // avoid compiler hint |
|
153 |
if CheckNoTeamOrHH or isPaused then exit; |
|
154 |
if not CurrentTeam^.ExtDriven then SendIPC('L'); |
|
155 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
156 |
bShowFinger:= false; |
|
157 |
with CurrentHedgehog^.Gear^ do |
|
158 |
Message:= Message or gmLeft |
|
159 |
end; |
|
160 |
||
161 |
procedure chLeft_m(var s: shortstring); |
|
162 |
begin |
|
163 |
s:= s; // avoid compiler hint |
|
164 |
if CheckNoTeamOrHH then exit; |
|
165 |
if not CurrentTeam^.ExtDriven then SendIPC('l'); |
|
166 |
with CurrentHedgehog^.Gear^ do |
|
167 |
Message:= Message and not gmLeft |
|
168 |
end; |
|
169 |
||
170 |
procedure chRight_p(var s: shortstring); |
|
171 |
begin |
|
172 |
s:= s; // avoid compiler hint |
|
173 |
if CheckNoTeamOrHH or isPaused then exit; |
|
174 |
if not CurrentTeam^.ExtDriven then SendIPC('R'); |
|
175 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
176 |
bShowFinger:= false; |
|
177 |
with CurrentHedgehog^.Gear^ do |
|
178 |
Message:= Message or gmRight |
|
179 |
end; |
|
180 |
||
181 |
procedure chRight_m(var s: shortstring); |
|
182 |
begin |
|
183 |
s:= s; // avoid compiler hint |
|
184 |
if CheckNoTeamOrHH then exit; |
|
185 |
if not CurrentTeam^.ExtDriven then SendIPC('r'); |
|
186 |
with CurrentHedgehog^.Gear^ do |
|
187 |
Message:= Message and not gmRight |
|
188 |
end; |
|
189 |
||
190 |
procedure chUp_p(var s: shortstring); |
|
191 |
begin |
|
192 |
s:= s; // avoid compiler hint |
|
193 |
if CheckNoTeamOrHH or isPaused then exit; |
|
194 |
if not CurrentTeam^.ExtDriven then SendIPC('U'); |
|
195 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
196 |
bShowFinger:= false; |
|
197 |
with CurrentHedgehog^.Gear^ do |
|
198 |
Message:= Message or gmUp |
|
199 |
end; |
|
200 |
||
201 |
procedure chUp_m(var s: shortstring); |
|
202 |
begin |
|
203 |
s:= s; // avoid compiler hint |
|
204 |
if CheckNoTeamOrHH then exit; |
|
205 |
if not CurrentTeam^.ExtDriven then SendIPC('u'); |
|
206 |
with CurrentHedgehog^.Gear^ do |
|
207 |
Message:= Message and not gmUp |
|
208 |
end; |
|
209 |
||
210 |
procedure chDown_p(var s: shortstring); |
|
211 |
begin |
|
212 |
s:= s; // avoid compiler hint |
|
213 |
if CheckNoTeamOrHH or isPaused then exit; |
|
214 |
if not CurrentTeam^.ExtDriven then SendIPC('D'); |
|
215 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
216 |
bShowFinger:= false; |
|
217 |
with CurrentHedgehog^.Gear^ do |
|
218 |
Message:= Message or gmDown |
|
219 |
end; |
|
220 |
||
221 |
procedure chDown_m(var s: shortstring); |
|
222 |
begin |
|
223 |
s:= s; // avoid compiler hint |
|
224 |
if CheckNoTeamOrHH then exit; |
|
225 |
if not CurrentTeam^.ExtDriven then SendIPC('d'); |
|
226 |
with CurrentHedgehog^.Gear^ do |
|
227 |
Message:= Message and not gmDown |
|
228 |
end; |
|
229 |
||
230 |
procedure chPrecise_p(var s: shortstring); |
|
231 |
begin |
|
232 |
s:= s; // avoid compiler hint |
|
233 |
if CheckNoTeamOrHH or isPaused then exit; |
|
234 |
if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
|
235 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
236 |
bShowFinger:= false; |
|
237 |
with CurrentHedgehog^.Gear^ do |
|
238 |
Message:= Message or gmPrecise |
|
239 |
end; |
|
240 |
||
241 |
procedure chPrecise_m(var s: shortstring); |
|
242 |
begin |
|
243 |
s:= s; // avoid compiler hint |
|
244 |
if CheckNoTeamOrHH then exit; |
|
245 |
if not CurrentTeam^.ExtDriven then SendIPC('z'); |
|
246 |
with CurrentHedgehog^.Gear^ do |
|
247 |
Message:= Message and not gmPrecise |
|
248 |
end; |
|
249 |
||
250 |
procedure chLJump(var s: shortstring); |
|
251 |
begin |
|
252 |
s:= s; // avoid compiler hint |
|
253 |
if CheckNoTeamOrHH or isPaused then exit; |
|
254 |
if not CurrentTeam^.ExtDriven then SendIPC('j'); |
|
255 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
256 |
bShowFinger:= false; |
|
257 |
with CurrentHedgehog^.Gear^ do |
|
258 |
Message:= Message or gmLJump |
|
259 |
end; |
|
260 |
||
261 |
procedure chHJump(var s: shortstring); |
|
262 |
begin |
|
263 |
s:= s; // avoid compiler hint |
|
264 |
if CheckNoTeamOrHH or isPaused then exit; |
|
265 |
if not CurrentTeam^.ExtDriven then SendIPC('J'); |
|
266 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
267 |
bShowFinger:= false; |
|
268 |
with CurrentHedgehog^.Gear^ do |
|
269 |
Message:= Message or gmHJump |
|
270 |
end; |
|
271 |
||
272 |
procedure chAttack_p(var s: shortstring); |
|
273 |
begin |
|
274 |
s:= s; // avoid compiler hint |
|
275 |
if CheckNoTeamOrHH or isPaused then exit; |
|
276 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
277 |
bShowFinger:= false; |
|
278 |
with CurrentHedgehog^.Gear^ do |
|
279 |
begin |
|
280 |
{$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF} |
|
281 |
if ((State and gstHHDriven) <> 0) then |
|
282 |
begin |
|
283 |
FollowGear:= CurrentHedgehog^.Gear; |
|
284 |
if not CurrentTeam^.ExtDriven then SendIPC('A'); |
|
285 |
Message:= Message or gmAttack |
|
286 |
end |
|
287 |
end |
|
288 |
end; |
|
289 |
||
290 |
procedure chAttack_m(var s: shortstring); |
|
291 |
begin |
|
292 |
s:= s; // avoid compiler hint |
|
293 |
if CheckNoTeamOrHH then exit; |
|
294 |
with CurrentHedgehog^.Gear^ do |
|
295 |
begin |
|
296 |
if not CurrentTeam^.ExtDriven and |
|
297 |
((Message and gmAttack) <> 0) then SendIPC('a'); |
|
298 |
Message:= Message and not gmAttack |
|
299 |
end |
|
300 |
end; |
|
301 |
||
302 |
procedure chSwitch(var s: shortstring); |
|
303 |
begin |
|
304 |
s:= s; // avoid compiler hint |
|
305 |
if CheckNoTeamOrHH or isPaused then exit; |
|
306 |
if not CurrentTeam^.ExtDriven then SendIPC('S'); |
|
307 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
308 |
bShowFinger:= false; |
|
309 |
with CurrentHedgehog^.Gear^ do |
|
310 |
Message:= Message or gmSwitch |
|
311 |
end; |
|
312 |
||
313 |
procedure chNextTurn(var s: shortstring); |
|
314 |
begin |
|
315 |
s:= s; // avoid compiler hint |
|
316 |
TryDo(AllInactive, '/nextturn called when not all gears are inactive', true); |
|
317 |
||
318 |
if not CurrentTeam^.ExtDriven then SendIPC('N'); |
|
319 |
{$IFDEF DEBUGFILE} |
|
320 |
AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks)); |
|
321 |
{$ENDIF} |
|
322 |
end; |
|
323 |
||
324 |
procedure chTimer(var s: shortstring); |
|
325 |
begin |
|
326 |
if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit; |
|
327 |
||
328 |
if not CurrentTeam^.ExtDriven then SendIPC(s); |
|
329 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
330 |
bShowFinger:= false; |
|
331 |
with CurrentHedgehog^.Gear^ do |
|
332 |
begin |
|
333 |
Message:= Message or gmTimer; |
|
334 |
MsgParam:= byte(s[1]) - ord('0') |
|
335 |
end |
|
336 |
end; |
|
337 |
||
338 |
procedure chSlot(var s: shortstring); |
|
339 |
var slot: LongWord; |
|
340 |
begin |
|
341 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
342 |
slot:= byte(s[1]) - 49; |
|
343 |
if slot > cMaxSlotIndex then exit; |
|
344 |
if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
|
345 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
346 |
bShowFinger:= false; |
|
347 |
with CurrentHedgehog^.Gear^ do |
|
348 |
begin |
|
349 |
Message:= Message or gmSlot; |
|
350 |
MsgParam:= slot |
|
351 |
end |
|
352 |
end; |
|
353 |
||
354 |
procedure chSetWeapon(var s: shortstring); |
|
355 |
begin |
|
356 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
357 |
||
358 |
if TAmmoType(s[1]) > High(TAmmoType) then exit; |
|
359 |
||
360 |
if not CurrentTeam^.ExtDriven then SendIPC('w' + s); |
|
361 |
||
362 |
with CurrentHedgehog^.Gear^ do |
|
363 |
begin |
|
364 |
Message:= Message or gmWeapon; |
|
365 |
MsgParam:= byte(s[1]); |
|
366 |
end; |
|
367 |
end; |
|
368 |
||
369 |
procedure chTaunt(var s: shortstring); |
|
370 |
begin |
|
371 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
372 |
||
373 |
if TWave(s[1]) > High(TWave) then exit; |
|
374 |
||
375 |
if not CurrentTeam^.ExtDriven then SendIPC('t' + s); |
|
376 |
||
377 |
with CurrentHedgehog^.Gear^ do |
|
378 |
begin |
|
379 |
Message:= Message or gmAnimate; |
|
380 |
MsgParam:= byte(s[1]) |
|
381 |
end |
|
382 |
end; |
|
383 |
||
384 |
procedure chPut(var s: shortstring); |
|
385 |
begin |
|
386 |
s:= s; // avoid compiler hint |
|
387 |
doPut(0, 0, false); |
|
388 |
end; |
|
389 |
||
390 |
procedure chCapture(var s: shortstring); |
|
391 |
begin |
|
392 |
s:= s; // avoid compiler hint |
|
393 |
flagMakeCapture:= true |
|
394 |
end; |
|
395 |
||
396 |
procedure chSetMap(var s: shortstring); |
|
397 |
begin |
|
398 |
if isDeveloperMode then |
|
399 |
begin |
|
400 |
Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s; |
|
401 |
InitStepsFlags:= InitStepsFlags or cifMap |
|
402 |
end |
|
403 |
end; |
|
404 |
||
405 |
procedure chSetTheme(var s: shortstring); |
|
406 |
begin |
|
407 |
if isDeveloperMode then |
|
408 |
begin |
|
409 |
Pathz[ptCurrTheme]:= Pathz[ptThemes] + '/' + s; |
|
410 |
InitStepsFlags:= InitStepsFlags or cifTheme |
|
411 |
end |
|
412 |
end; |
|
413 |
||
414 |
procedure chSetSeed(var s: shortstring); |
|
415 |
begin |
|
416 |
if isDeveloperMode then |
|
417 |
begin |
|
418 |
SetRandomSeed(s); |
|
419 |
cSeed:= s; |
|
420 |
InitStepsFlags:= InitStepsFlags or cifRandomize |
|
421 |
end |
|
422 |
end; |
|
423 |
||
424 |
procedure chAmmoMenu(var s: shortstring); |
|
425 |
begin |
|
426 |
s:= s; // avoid compiler hint |
|
427 |
if CheckNoTeamOrHH then |
|
428 |
bShowAmmoMenu:= true |
|
429 |
else |
|
430 |
begin |
|
431 |
with CurrentTeam^ do |
|
432 |
with Hedgehogs[CurrHedgehog] do |
|
433 |
begin |
|
434 |
bSelected:= false; |
|
435 |
||
436 |
if bShowAmmoMenu then bShowAmmoMenu:= false |
|
437 |
else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or |
|
438 |
((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0)) or |
|
439 |
((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true |
|
440 |
end; |
|
441 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1 |
|
442 |
end |
|
443 |
end; |
|
444 |
||
445 |
procedure chVol_p(var s: shortstring); |
|
446 |
begin |
|
447 |
s:= s; // avoid compiler hint |
|
448 |
inc(cVolumeDelta, 3) |
|
449 |
end; |
|
450 |
||
451 |
procedure chVol_m(var s: shortstring); |
|
452 |
begin |
|
453 |
s:= s; // avoid compiler hint |
|
454 |
dec(cVolumeDelta, 3) |
|
455 |
end; |
|
456 |
||
457 |
procedure chFindhh(var s: shortstring); |
|
458 |
begin |
|
459 |
s:= s; // avoid compiler hint |
|
460 |
if CheckNoTeamOrHH or isPaused then exit; |
|
461 |
bShowFinger:= true; |
|
462 |
FollowGear:= CurrentHedgehog^.Gear |
|
463 |
end; |
|
464 |
||
465 |
procedure chPause(var s: shortstring); |
|
466 |
begin |
|
467 |
s:= s; // avoid compiler hint |
|
468 |
if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; |
|
469 |
if gameType <> gmtNet then |
|
470 |
isPaused:= not isPaused; |
|
471 |
SDL_ShowCursor(ord(isPaused)) |
|
472 |
end; |
|
473 |
||
474 |
procedure chRotateMask(var s: shortstring); |
|
475 |
begin |
|
476 |
s:= s; // avoid compiler hint |
|
477 |
if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask]; |
|
478 |
end; |
|
479 |
||
480 |
procedure chSpeedup_p(var s: shortstring); |
|
481 |
begin |
|
482 |
s:= s; // avoid compiler hint |
|
483 |
isSpeed:= true |
|
484 |
end; |
|
485 |
||
486 |
procedure chSpeedup_m(var s: shortstring); |
|
487 |
begin |
|
488 |
s:= s; // avoid compiler hint |
|
489 |
isSpeed:= false |
|
490 |
end; |
|
491 |
||
492 |
procedure chZoomIn(var s: shortstring); |
|
493 |
begin |
|
494 |
s:= s; // avoid compiler hint |
|
495 |
if ZoomValue < cMinZoomLevel then |
|
496 |
ZoomValue:= ZoomValue + cZoomDelta; |
|
497 |
end; |
|
498 |
||
499 |
procedure chZoomOut(var s: shortstring); |
|
500 |
begin |
|
501 |
s:= s; // avoid compiler hint |
|
502 |
if ZoomValue > cMaxZoomLevel then |
|
503 |
ZoomValue:= ZoomValue - cZoomDelta; |
|
504 |
end; |
|
505 |
||
506 |
procedure chZoomReset(var s: shortstring); |
|
507 |
begin |
|
508 |
s:= s; // avoid compiler hint |
|
509 |
ZoomValue:= cDefaultZoomLevel; |
|
510 |
end; |
|
511 |
||
512 |
||
513 |
procedure initModule; |
|
514 |
begin |
|
515 |
RegisterVariable('flag' , vtCommand, @chFlag , false); |
|
516 |
RegisterVariable('script' , vtCommand, @chScript , false); |
|
517 |
RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
|
518 |
RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
|
519 |
RegisterVariable('capture' , vtCommand, @chCapture , true ); |
|
520 |
RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
|
521 |
RegisterVariable('rdriven' , vtCommand, @chTeamLocal , false); |
|
522 |
RegisterVariable('map' , vtCommand, @chSetMap , false); |
|
523 |
RegisterVariable('theme' , vtCommand, @chSetTheme , false); |
|
524 |
RegisterVariable('seed' , vtCommand, @chSetSeed , false); |
|
525 |
RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false); |
|
526 |
RegisterVariable('mapgen' , vtLongInt, @cMapGen , false); |
|
527 |
RegisterVariable('maze_size',vtLongInt, @cMazeSize , false); |
|
528 |
RegisterVariable('delay' , vtLongInt, @cInactDelay , false); |
|
529 |
RegisterVariable('ready' , vtLongInt, @cReadyDelay , false); |
|
530 |
RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); |
|
531 |
RegisterVariable('healthprob', vtLongInt, @cHealthCaseProb, false); |
|
532 |
RegisterVariable('hcaseamount', vtLongInt, @cHealthCaseAmount, false); |
|
533 |
RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); |
|
534 |
RegisterVariable('waterrise', vtLongInt, @cWaterRise , false); |
|
535 |
RegisterVariable('healthdec', vtLongInt, @cHealthDecrease, false); |
|
536 |
RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); |
|
537 |
RegisterVariable('ropepct' , vtLongInt, @cRopePercent , false); |
|
538 |
RegisterVariable('minedudpct',vtLongInt,@cMineDudPercent, false); |
|
539 |
RegisterVariable('minesnum', vtLongInt, @cLandMines , false); |
|
540 |
RegisterVariable('explosives',vtLongInt,@cExplosives , false); |
|
541 |
RegisterVariable('gmflags' , vtLongInt, @GameFlags , false); |
|
542 |
RegisterVariable('trflags' , vtLongInt, @TrainingFlags , false); |
|
543 |
RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
|
544 |
RegisterVariable('minestime',vtLongInt, @cMinesTime , false); |
|
545 |
RegisterVariable('fort' , vtCommand, @chFort , false); |
|
546 |
RegisterVariable('grave' , vtCommand, @chGrave , false); |
|
547 |
RegisterVariable('hat' , vtCommand, @chSetHat , false); |
|
548 |
RegisterVariable('quit' , vtCommand, @chQuit , true ); |
|
549 |
RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
|
550 |
RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |
|
551 |
RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true ); |
|
552 |
RegisterVariable('zoomin' , vtCommand, @chZoomIn , true ); |
|
553 |
RegisterVariable('zoomout' , vtCommand, @chZoomOut , true ); |
|
554 |
RegisterVariable('zoomreset',vtCommand, @chZoomReset , true ); |
|
555 |
RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , true); |
|
556 |
RegisterVariable('+precise', vtCommand, @chPrecise_p , false); |
|
557 |
RegisterVariable('-precise', vtCommand, @chPrecise_m , false); |
|
558 |
RegisterVariable('+left' , vtCommand, @chLeft_p , false); |
|
559 |
RegisterVariable('-left' , vtCommand, @chLeft_m , false); |
|
560 |
RegisterVariable('+right' , vtCommand, @chRight_p , false); |
|
561 |
RegisterVariable('-right' , vtCommand, @chRight_m , false); |
|
562 |
RegisterVariable('+up' , vtCommand, @chUp_p , false); |
|
563 |
RegisterVariable('-up' , vtCommand, @chUp_m , false); |
|
564 |
RegisterVariable('+down' , vtCommand, @chDown_p , false); |
|
565 |
RegisterVariable('-down' , vtCommand, @chDown_m , false); |
|
566 |
RegisterVariable('+attack' , vtCommand, @chAttack_p , false); |
|
567 |
RegisterVariable('-attack' , vtCommand, @chAttack_m , false); |
|
568 |
RegisterVariable('switch' , vtCommand, @chSwitch , false); |
|
569 |
RegisterVariable('nextturn', vtCommand, @chNextTurn , false); |
|
570 |
RegisterVariable('timer' , vtCommand, @chTimer , false); |
|
571 |
RegisterVariable('taunt' , vtCommand, @chTaunt , false); |
|
572 |
RegisterVariable('setweap' , vtCommand, @chSetWeapon , false); |
|
573 |
RegisterVariable('slot' , vtCommand, @chSlot , false); |
|
574 |
RegisterVariable('put' , vtCommand, @chPut , false); |
|
575 |
RegisterVariable('ljump' , vtCommand, @chLJump , false); |
|
576 |
RegisterVariable('hjump' , vtCommand, @chHJump , false); |
|
577 |
RegisterVariable('+volup' , vtCommand, @chVol_p , true ); |
|
578 |
RegisterVariable('-volup' , vtCommand, @chVol_m , true ); |
|
579 |
RegisterVariable('+voldown', vtCommand, @chVol_m , true ); |
|
580 |
RegisterVariable('-voldown', vtCommand, @chVol_p , true ); |
|
581 |
RegisterVariable('findhh' , vtCommand, @chFindhh , true ); |
|
582 |
RegisterVariable('pause' , vtCommand, @chPause , true ); |
|
583 |
RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); |
|
584 |
RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); |
|
585 |
RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); |
|
586 |
RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); |
|
587 |
RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); |
|
588 |
RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); |
|
589 |
RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); |
|
590 |
RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); |
|
591 |
end; |
|
592 |
||
593 |
procedure freeModule; |
|
594 |
begin |
|
595 |
end; |
|
596 |
||
597 |
end. |