-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.txt
539 lines (495 loc) · 17.8 KB
/
constants.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
extern void object::Constants() {}
public class Const {
static bool staticInit = true;
static float FLYING_RANGE = 1500;
static float DRIVING_RANGE = 100;
static int[] ALL_BOTS;
static int[] ALL_ALIENS;
static int[] ALL_BUILDINGS;
static int[] ALL_RESOURCES;
static float[] RADII;
static string[] CATEGORY_NAMES;
public void Const() {
if (staticInit) {
int[] a1 = {
WheeledGrabber,
TrackedGrabber,
WingedGrabber,
LeggedGrabber,
WheeledShooter,
TrackedShooter,
WingedShooter,
LeggedShooter,
WheeledOrgaShooter,
TrackedOrgaShooter,
WingedOrgaShooter,
LeggedOrgaShooter,
WheeledSniffer,
TrackedSniffer,
WingedSniffer,
LeggedSniffer,
Thumper,
PhazerShooter,
Recycler,
Shielder,
Subber
};
ALL_BOTS = a1;
int[] a2 = {
AlienQueen,
AlienAnt,
AlienSpider,
AlienWasp,
AlienWorm
};
ALL_ALIENS = a2;
int[] a3 = {
Houston,
SpaceShip,
BotFactory,
ResearchCenter,
RadarStation,
ExchangePost,
RepairCenter,
DefenseTower,
AutoLab,
PowerStation,
PowerPlant,
NuclearPlant,
Converter,
Derrick,
PowerCaptor,
Vault
};
ALL_BUILDINGS = a3;
int[] a4 = {
TitaniumOre,
UraniumOre,
Titanium,
PowerCell,
NuclearCell
};
ALL_RESOURCES = a4;
RADII[2] = 32.25; //Gantry Crane
RADII[3] = 02.00; //Space Ship; Bottom Width of 20.00, Top Width of 8.25
RADII[4] = 03.00; //Derrick
RADII[5] = 06.00; //Bot Factory
RADII[6] = 06.00; //Power Station
RADII[7] = 05.00; //Ore Converter
RADII[8] = 05.25; //Repair Center
RADII[9] = 02.75; //Defense Tower
RADII[10] = 00.00; //Alien Nest; Organic Material/hatchery?, however it is probably holding Orga mater
RADII[11] = 03.75; //Research Center
RADII[12] = 02.75; //Radar Station
RADII[13] = 04.00; //Power Plant; Power Cell Factory
RADII[14] = 05.25; //Auto Lab
RADII[15] = 07.00; //Nuclear Power Station
RADII[16] = 00.00; //Start Area; platform
RADII[17] = 00.00; //Goal Area; platform
RADII[18] = 02.75; //Information exchange post
RADII[19] = 06.50; //Power Captor
RADII[20] = 07.75; //Target "the target stand" (+)==< looking thing; 03.25 at bace
RADII[21] = 00.00; //Target2 "the actual Brass + Target"
RADII[22] = 04.50; //Vault
RADII[23] = 18.75; //Huston Mission Control
RADII[31] = 01.50; //Titanium Ore
RADII[32] = 01.50; //Uranium Ore
RADII[33] = 01.50; //Titanium
RADII[34] = 01.75; //Power Cell
RADII[35] = 01.50; //Nuclear Power Cell
RADII[36] = 01.50; //Orga Mater
RADII[37] = 01.50; //Black Box
RADII[38] = 01.50; //TNT Brick
RADII[50] = 00.00; //green cross -> energy deposit.
RADII[51] = 00.00; //red cross -> titanium ore.
RADII[52] = 00.00; //yellow circle -> uranium ore.
RADII[60] = 02.00; //Mine
RADII[61] = 01.75; //Firework
RADII[63] = 02.00; //Rocket Back Pack
RADII[70] = 02.00; //Plant; Earth, Tropica, Centaury
RADII[71] = 02.00; //Plant; Earth, Tropica, Centaury
RADII[72] = 02.00; //Plant; Earth, Tropica, Centaury
RADII[73] = 02.00; //Plant; Earth, Tropica, Centaury
RADII[74] = 02.00; //Plant; Earth, Tropica, Centaury
RADII[75] = 00.00; //Small Plant; Tropica
RADII[76] = 00.00; //Small Plant; Tropica
RADII[77] = 00.00; //Small Plant; Tropica
// RADII[80] = 02.75; //Large Plant; Tropica
// RADII[81] = 02.50; //Large Plant; Tropica
// RADII[82] = 02.50; //Large Plant; Tropica
// RADII[83] = 03.00; //Large Plant; Tropica
// RADII[84] = 02.50; //Large Plant; Tropica
RADII[80] = 0; //Large Plant; Tropica
RADII[81] = 0; //Large Plant; Tropica
RADII[82] = 0; //Large Plant; Tropica
RADII[83] = 0; //Large Plant; Tropica
RADII[84] = 0; //Large Plant; Tropica
RADII[85] = 01.75; //Plant; Volcano
RADII[86] = 01.75; //Plant; Volcano
RADII[87] = 01.75; //Plant, Tall; Volcano
RADII[88] = 01.75; //Plant; Volcano
RADII[89] = 01.75; //Plant; Volcano
RADII[90] = 01.75; //Tree; Earth
RADII[91] = 02.50; //Tree; Earth
RADII[92] = 02.75; //Tree; Earth
RADII[93] = 03.75; //Tree; Earth
RADII[100] = 02.50; //Practice Bot
RADII[110] = 02.50; //Wheeled Grabber
RADII[111] = 02.50; //Tracked Grabber
RADII[112] = 02.50; //Winged Grabber
RADII[113] = 02.50; //Legged Grabber
RADII[120] = 02.50; //Wheeled Shooter
RADII[121] = 02.50; //Tracked Shooter
RADII[122] = 02.50; //Winged Shooter
RADII[123] = 02.50; //Legged Shooter
RADII[130] = 02.50; //Wheeled Orga Shooter
RADII[131] = 02.50; //Tracked Orga Shooter
RADII[132] = 02.50; //Winged Orga Shooter
RADII[133] = 02.50; //Legged Orga Shooter
RADII[140] = 02.50; //Wheeled Sniffer
RADII[141] = 02.50; //Tracked Sniffer
RADII[142] = 02.50; //Winged Sniffer
RADII[143] = 02.50; //Legged Sniffer
RADII[200] = 03.00; //Thumper
RADII[201] = 03.00; //Phazer Shooter35
RADII[202] = 03.00; //Recycler
RADII[203] = 03.00; //Shielder; Height 3.00 when not active
RADII[210] = 02.50; //Subber
RADII[211] = 02.50; //Target Bot
RADII[250] = 00.00; //Way Point
RADII[260] = 00.00; //Blue Flag
RADII[261] = 00.00; //Red Flag
RADII[262] = 00.00; //Green Flag
RADII[263] = 00.00; //Yellow Flag
RADII[264] = 00.00; //Purple Flag
RADII[270] = 01.50; //KeyA - Blue
RADII[271] = 01.50; //KeyB - Red
RADII[272] = 01.50; //KeyC - Green
RADII[273] = 01.50; //KeyD - Yellow
RADII[300] = 01.75; //Me
RADII[302] = 01.75; //Tech (looks a lot like "Me" in some levels)
RADII[400] = 02.25; //Barrier-Short; 1.5 width (about radi-of bot)
RADII[401] = 03.50; //Barrier-Long; 1.5 width (about radi-of bot)
RADII[500] = 06.25; //Alien Queen
RADII[501] = 02.25; //Alien Egg
RADII[502] = 02.25; //Alien Ant
RADII[503] = 02.00; //Alien Spider
RADII[504] = 02.25; //Alien Wasp
RADII[505] = 00.00; //Alien Worm
RADII[600] = 03.00; //A Wreckage wild card! for Recyclables
RADII[600] = 02.00; //Wreckage; Whelled Grabber, Recyclable
RADII[601] = 02.00; //Wreckage; Sunken Whelled Grabber, Recyclable
RADII[602] = 03.00; //Wreckage; Tracked Shooter, Recyclable
RADII[603] = 03.00; //Wreckage; Sunken Tracked Shooter, Recyclable
RADII[603] = 02.50; //Wreckage; Sunken Recyceler, Recyclable
RADII[605] = 02.50; //Wreckage; Recyceler, Recyclable
RADII[606] = 06.00; //Ruin; Bot Factory
RADII[607] = 02.25; //Ruin; Ore Converter Door
RADII[608] = 02.00; //Ruin; Support, C shaped hunk of mettel
RADII[609] = 02.25; //Ruin; Brick like, Radar Station Base
RADII[610] = 05.00; //Ruin; Ore Converter
RADII[611] = 13.25; //Ruin; Space Ship Bace
RADII[612] = 08.50; //Ruin; Space Ship Top
RADII[700] = 02.00; //Crystal; Crystalium
RADII[701] = 02.50; //Crystal; Crystalium
RADII[702] = 02.75; //Crystal; Crystalium
RADII[703] = 04.50; //Crystal; Crystalium
RADII[710] = 04.25; //Green Mega Stalk; Stranve Plant, Small
RADII[711] = 03.50; //Green Mega Stalk; Stranve Plant, Small
RADII[712] = 03.25; //Green Mega Stalk; Stranve Plant, Small
RADII[713] = 05.25; //Green Mega Stalk; Stranve Plant, Med
RADII[714] = 07.25; //Green Mega Stalk; Stranve Plant, Large
RADII[715] = 07.25; //Green Mega Stalk; Stranve Plant, Large with Green Shield like apperatice
RADII[715] = 22.00; //#715's Green Shield (affects flyers ability to fly); you cannot fly over it
RADII[731] = 02.00; //Mushroom; non corrosive
RADII[732] = 02.00; //Mushroom; corrosive
RADII[900] = 05.02; //Lunar Lander; Derelict of Apollo Mission
RADII[901] = 03.25; //Lunar Roving Vehicle
RADII[902] = 00.00; //American flag; Derelict of Apollo Mission
RADII[903] = 01.75; //Inverted Satelite Dish; Derelict of Apollo Mission
RADII[904] = 02.00; //Satelite Dish; Derelict of Apollo Mission
RADII[910] = 03.75; //Home
CATEGORY_NAMES[2] = "Portico";
CATEGORY_NAMES[3] = "SpaceShip";
CATEGORY_NAMES[4] = "Derrick";
CATEGORY_NAMES[5] = "BotFactory";
CATEGORY_NAMES[6] = "PowerStation";
CATEGORY_NAMES[7] = "Converter";
CATEGORY_NAMES[8] = "RepairStation";
CATEGORY_NAMES[9] = "DefenseTower";
CATEGORY_NAMES[10] = "AlienNest";
CATEGORY_NAMES[11] = "ResearchCenter";
CATEGORY_NAMES[12] = "RadarStation";
CATEGORY_NAMES[13] = "PowerPlant";
CATEGORY_NAMES[14] = "AutoLab";
CATEGORY_NAMES[15] = "NuclearPlant";
CATEGORY_NAMES[16] = "StartArea";
CATEGORY_NAMES[17] = "EndArea";
CATEGORY_NAMES[18] = "ExchangePost";
CATEGORY_NAMES[19] = "PowerCaptor";
CATEGORY_NAMES[20] = "Target1 (gate)";
CATEGORY_NAMES[21] = "Target2 (center)";
CATEGORY_NAMES[22] = "Vault";
CATEGORY_NAMES[23] = "Houston";
CATEGORY_NAMES[24] = "Destroyer";
CATEGORY_NAMES[31] = "TitaniumOre";
CATEGORY_NAMES[32] = "UraniumOre";
CATEGORY_NAMES[33] = "Titanium";
CATEGORY_NAMES[34] = "PowerCell";
CATEGORY_NAMES[35] = "NuclearCell";
CATEGORY_NAMES[36] = "OrgaMatter";
CATEGORY_NAMES[37] = "BlackBox";
CATEGORY_NAMES[38] = "TNT";
CATEGORY_NAMES[50] = "PowerSpot";
CATEGORY_NAMES[51] = "TitaniumSpot";
CATEGORY_NAMES[52] = "UraniumSpot";
CATEGORY_NAMES[53] = "KeyASpot";
CATEGORY_NAMES[54] = "KeyBSpot";
CATEGORY_NAMES[55] = "KeyCSpot";
CATEGORY_NAMES[56] = "KeyDSpot";
CATEGORY_NAMES[60] = "Mine";
CATEGORY_NAMES[61] = "Firework";
CATEGORY_NAMES[62] = "arrow above object (Visit)";
CATEGORY_NAMES[63] = "Bag";
CATEGORY_NAMES[70] = "Greenery0";
CATEGORY_NAMES[71] = "Greenery1";
CATEGORY_NAMES[72] = "Greenery2";
CATEGORY_NAMES[73] = "Greenery3";
CATEGORY_NAMES[74] = "Greenery4";
CATEGORY_NAMES[75] = "Greenery5";
CATEGORY_NAMES[76] = "Greenery6";
CATEGORY_NAMES[77] = "Greenery7";
CATEGORY_NAMES[78] = "Greenery8";
CATEGORY_NAMES[79] = "Greenery9";
CATEGORY_NAMES[80] = "Greenery10";
CATEGORY_NAMES[81] = "Greenery11";
CATEGORY_NAMES[82] = "Greenery12";
CATEGORY_NAMES[83] = "Greenery13";
CATEGORY_NAMES[84] = "Greenery14";
CATEGORY_NAMES[85] = "Greenery15";
CATEGORY_NAMES[86] = "Greenery16";
CATEGORY_NAMES[87] = "Greenery17";
CATEGORY_NAMES[88] = "Greenery18";
CATEGORY_NAMES[89] = "Greenery19";
CATEGORY_NAMES[90] = "Tree0";
CATEGORY_NAMES[91] = "Tree1";
CATEGORY_NAMES[92] = "Tree2";
CATEGORY_NAMES[93] = "Tree3";
CATEGORY_NAMES[94] = "Tree4";
CATEGORY_NAMES[95] = "Tree5";
CATEGORY_NAMES[100] = "PracticeBot";
CATEGORY_NAMES[101] = "track-trainer (unused)";
CATEGORY_NAMES[102] = "fly-trainer (unused)";
CATEGORY_NAMES[103] = "insect-trainer (unused)";
CATEGORY_NAMES[110] = "WheeledGrabber";
CATEGORY_NAMES[111] = "TrackedGrabber";
CATEGORY_NAMES[112] = "WingedGrabber";
CATEGORY_NAMES[113] = "LeggedGrabber";
CATEGORY_NAMES[120] = "WheeledShooter";
CATEGORY_NAMES[121] = "TrackedShooter";
CATEGORY_NAMES[122] = "WingedShooter";
CATEGORY_NAMES[123] = "LeggedShooter";
CATEGORY_NAMES[130] = "WheeledOrgaShooter";
CATEGORY_NAMES[131] = "TrackedOrgaShooter";
CATEGORY_NAMES[132] = "WingedOrgaShooter";
CATEGORY_NAMES[133] = "LeggedOrgaShooter";
CATEGORY_NAMES[140] = "WheeledSniffer";
CATEGORY_NAMES[141] = "TrackedSniffer";
CATEGORY_NAMES[142] = "WingedSniffer";
CATEGORY_NAMES[143] = "LeggedSniffer";
CATEGORY_NAMES[200] = "Thumper";
CATEGORY_NAMES[201] = "PhazerShooter";
CATEGORY_NAMES[202] = "Recycler";
CATEGORY_NAMES[203] = "Shielder";
CATEGORY_NAMES[210] = "Subber";
CATEGORY_NAMES[211] = "TargetBot";
CATEGORY_NAMES[212] = "Scribbler";
CATEGORY_NAMES[213] = "MissionController";
CATEGORY_NAMES[250] = "WayPoint";
CATEGORY_NAMES[260] = "BlueFlag";
CATEGORY_NAMES[261] = "RedFlag";
CATEGORY_NAMES[262] = "GreenFlag";
CATEGORY_NAMES[263] = "YellowFlag";
CATEGORY_NAMES[264] = "VioletFlag";
CATEGORY_NAMES[270] = "KeyA";
CATEGORY_NAMES[271] = "KeyB";
CATEGORY_NAMES[272] = "KeyC";
CATEGORY_NAMES[273] = "KeyD";
CATEGORY_NAMES[300] = "Me";
CATEGORY_NAMES[301] = "Robby (toto)";
CATEGORY_NAMES[302] = "Tech";
CATEGORY_NAMES[400] = "Barrier0";
CATEGORY_NAMES[401] = "Barrier1";
CATEGORY_NAMES[402] = "Barrier2";
CATEGORY_NAMES[403] = "Barrier3";
CATEGORY_NAMES[500] = "AlienQueen";
CATEGORY_NAMES[501] = "AlienEgg";
CATEGORY_NAMES[502] = "AlienAnt";
CATEGORY_NAMES[503] = "AlienSpider";
CATEGORY_NAMES[504] = "AlienWasp";
CATEGORY_NAMES[505] = "AlienWorm";
CATEGORY_NAMES[600] = "WreckBotw1";
CATEGORY_NAMES[601] = "WreckBotw2";
CATEGORY_NAMES[602] = "WreckBott1";
CATEGORY_NAMES[603] = "WreckBott2";
CATEGORY_NAMES[604] = "WreckBotr1";
CATEGORY_NAMES[605] = "WreckBotr2";
CATEGORY_NAMES[606] = "RuinBotFactory";
CATEGORY_NAMES[607] = "RuinDoor";
CATEGORY_NAMES[608] = "RuinSupport";
CATEGORY_NAMES[609] = "RuinRadar";
CATEGORY_NAMES[610] = "RuinConvert";
CATEGORY_NAMES[611] = "RuinBaseCamp";
CATEGORY_NAMES[612] = "RuinHeadCamp";
CATEGORY_NAMES[620] = "Teen0";
CATEGORY_NAMES[621] = "Teen1";
CATEGORY_NAMES[622] = "Teen2";
CATEGORY_NAMES[623] = "Teen3";
CATEGORY_NAMES[624] = "Teen4";
CATEGORY_NAMES[625] = "Teen5";
CATEGORY_NAMES[626] = "Teen6";
CATEGORY_NAMES[627] = "Teen7";
CATEGORY_NAMES[628] = "Teen8";
CATEGORY_NAMES[629] = "Teen9";
CATEGORY_NAMES[630] = "Teen10";
CATEGORY_NAMES[631] = "Teen11";
CATEGORY_NAMES[632] = "Teen12";
CATEGORY_NAMES[633] = "Teen13";
CATEGORY_NAMES[634] = "Teen14";
CATEGORY_NAMES[635] = "Teen15";
CATEGORY_NAMES[636] = "Teen16";
CATEGORY_NAMES[637] = "Teen17";
CATEGORY_NAMES[638] = "Teen18";
CATEGORY_NAMES[639] = "Teen19";
CATEGORY_NAMES[640] = "Teen20";
CATEGORY_NAMES[641] = "Teen21";
CATEGORY_NAMES[642] = "Teen22";
CATEGORY_NAMES[643] = "Teen23";
CATEGORY_NAMES[644] = "Teen24";
CATEGORY_NAMES[645] = "Teen25";
CATEGORY_NAMES[646] = "Teen26";
CATEGORY_NAMES[647] = "Teen27";
CATEGORY_NAMES[648] = "Teen28";
CATEGORY_NAMES[649] = "Teen29";
CATEGORY_NAMES[650] = "Teen30";
CATEGORY_NAMES[651] = "Teen31";
CATEGORY_NAMES[652] = "Teen32";
CATEGORY_NAMES[653] = "Teen33";
CATEGORY_NAMES[654] = "Stone (Teen34)";
CATEGORY_NAMES[655] = "Teen35";
CATEGORY_NAMES[656] = "Teen36";
CATEGORY_NAMES[657] = "Teen37";
CATEGORY_NAMES[658] = "Teen38";
CATEGORY_NAMES[659] = "Teen39";
CATEGORY_NAMES[660] = "Teen40";
CATEGORY_NAMES[661] = "Teen41";
CATEGORY_NAMES[662] = "Teen42";
CATEGORY_NAMES[663] = "Teen43";
CATEGORY_NAMES[664] = "Teen44";
CATEGORY_NAMES[700] = "Quartz0";
CATEGORY_NAMES[701] = "Quartz1";
CATEGORY_NAMES[702] = "Quartz2";
CATEGORY_NAMES[703] = "Quartz3";
CATEGORY_NAMES[710] = "MegaStalk0";
CATEGORY_NAMES[711] = "MegaStalk1";
CATEGORY_NAMES[712] = "MegaStalk2";
CATEGORY_NAMES[713] = "MegaStalk3";
CATEGORY_NAMES[714] = "MegaStalk4";
CATEGORY_NAMES[715] = "MegaStalk5";
CATEGORY_NAMES[731] = "Mushroom1";
CATEGORY_NAMES[732] = "Mushroom2";
CATEGORY_NAMES[900] = "ApolloLEM";
CATEGORY_NAMES[901] = "ApolloJeep";
CATEGORY_NAMES[902] = "ApolloFlag";
CATEGORY_NAMES[903] = "ApolloModule";
CATEGORY_NAMES[904] = "ApolloAntenna";
CATEGORY_NAMES[910] = "Home";
staticInit = false;
}
}
}
public float radius(object o) {
Const const();
return const.RADII[o.category];
}
public string categoryString(int cat) {
Const const();
return const.CATEGORY_NAMES[cat];
}
public bool isBuilding(object o) {
Const const();
for (int i = 0; i < sizeof(const.ALL_BUILDINGS); i++) {
if (const.ALL_BUILDINGS[i] == o.category) return true;
}
return false;
}
public string researchString(int research) {
switch(research) {
case ResearchTracked: return "Tracked Bots";
case ResearchWinged: return "Winged Bots";
case ResearchShooter: return "Shooter Bots";
case ResearchDefenseTower: return "Defence Tower";
case ResearchNuclearPlant: return "Nuclear";
case ResearchThumper: return "Thumper";
case ResearchShielder: return "Shilder";
case ResearchPhazerShooter: return "Phazer";
case ResearchLegged: return "Legged Bots";
case ResearchOrgaShooter: return "Organic Shooter";
case ResearchRecycler: return "Recycler";
case ResearchSubber: return "Subber";
case ResearchSniffer: return "Sniffer";
default:
message("Unrecognized research type!", DisplayError);
return "Unrecognized research type!";
}
}
//returns the research needed for the bot's propultion
int botPropResearch(int botType){
switch (botType % 10) {
case 0: return 0; //Wheeled needs no research
case 1: return ResearchTracked;
case 2: return ResearchWinged;
case 3: return ResearchLegged;
}
}
public int[] botResearch(int botType) {
int[] research = { botPropResearch(botType) };
switch (botType/10) {
case 11: break;
case 12: research[1] = ResearchShooter; break;
case 13: research[1] = ResearchOrgaShooter; break;
case 14: research[1] = ResearchSniffer; break;
default:
message("Invalid bot type: " + botType, DisplayError);
}
return research;
}
// When converting to a string, a raw constant (ResearchTracked, etc) will
// become the string text. If we want it to be the number, we can pass if
// through this function first.
public int integer(int constant) {
return constant;
}
public string printFlags(int flags) {
string s = "|";
for (int i = 12; i >= 0; i--) {
if ((flags & (1<<i)) != 0) {
s += "1|";
} else {
s += "0|";
}
}
return s;
}
public string[] split(string in) {
string[] res;
int count = 0;
while(true) {
int loc = strfind(in, ",");
if (loc == -1) break;
res[count++] = strleft(in, loc);
in = strmid(in, loc + 1);
}
res[count] = in;
return res;
}