Module: Api::ActionResult

Defined in:
lib/sc2ai/protocol/_meta_documentation.rb,
lib/sc2ai/protocol/error_pb.rb

Overview

PROTOBUF VIRTUAL ENUM.

Constant Summary collapse

ENUM_ACTION_RESULT_UNSET =
0
SUCCESS =
1
NOT_SUPPORTED =
2
ERROR =
3
CANT_QUEUE_THAT_ORDER =
4
RETRY =
5
COOLDOWN =
6
QUEUE_IS_FULL =
7
RALLY_QUEUE_IS_FULL =
8
NOT_ENOUGH_MINERALS =
9
NOT_ENOUGH_VESPENE =
10
NOT_ENOUGH_TERRAZINE =
11
NOT_ENOUGH_CUSTOM =
12
NOT_ENOUGH_FOOD =
13
FOOD_USAGE_IMPOSSIBLE =
14
NOT_ENOUGH_LIFE =
15
NOT_ENOUGH_SHIELDS =
16
NOT_ENOUGH_ENERGY =
17
LIFE_SUPPRESSED =
18
SHIELDS_SUPPRESSED =
19
ENERGY_SUPPRESSED =
20
NOT_ENOUGH_CHARGES =
21
CANT_ADD_MORE_CHARGES =
22
TOO_MUCH_MINERALS =
23
TOO_MUCH_VESPENE =
24
TOO_MUCH_TERRAZINE =
25
TOO_MUCH_CUSTOM =
26
TOO_MUCH_FOOD =
27
TOO_MUCH_LIFE =
28
TOO_MUCH_SHIELDS =
29
TOO_MUCH_ENERGY =
30
MUST_TARGET_UNIT_WITH_LIFE =
31
MUST_TARGET_UNIT_WITH_SHIELDS =
32
MUST_TARGET_UNIT_WITH_ENERGY =
33
CANT_TRADE =
34
CANT_SPEND =
35
CANT_TARGET_THAT_UNIT =
36
COULDNT_ALLOCATE_UNIT =
37
UNIT_CANT_MOVE =
38
TRANSPORT_IS_HOLDING_POSITION =
39
BUILD_TECH_REQUIREMENTS_NOT_MET =
40
CANT_FIND_PLACEMENT_LOCATION =
41
CANT_BUILD_ON_THAT =
42
CANT_BUILD_TOO_CLOSE_TO_DROP_OFF =
43
CANT_BUILD_LOCATION_INVALID =
44
CANT_SEE_BUILD_LOCATION =
45
CANT_BUILD_TOO_CLOSE_TO_CREEP_SOURCE =
46
CANT_BUILD_TOO_CLOSE_TO_RESOURCES =
47
CANT_BUILD_TOO_FAR_FROM_WATER =
48
CANT_BUILD_TOO_FAR_FROM_CREEP_SOURCE =
49
CANT_BUILD_TOO_FAR_FROM_BUILD_POWER_SOURCE =
50
CANT_BUILD_ON_DENSE_TERRAIN =
51
CANT_TRAIN_TOO_FAR_FROM_TRAIN_POWER_SOURCE =
52
CANT_LAND_LOCATION_INVALID =
53
CANT_SEE_LAND_LOCATION =
54
CANT_LAND_TOO_CLOSE_TO_CREEP_SOURCE =
55
CANT_LAND_TOO_CLOSE_TO_RESOURCES =
56
CANT_LAND_TOO_FAR_FROM_WATER =
57
CANT_LAND_TOO_FAR_FROM_CREEP_SOURCE =
58
CANT_LAND_TOO_FAR_FROM_BUILD_POWER_SOURCE =
59
CANT_LAND_TOO_FAR_FROM_TRAIN_POWER_SOURCE =
60
CANT_LAND_ON_DENSE_TERRAIN =
61
ADD_ON_TOO_FAR_FROM_BUILDING =
62
MUST_BUILD_REFINERY_FIRST =
63
BUILDING_IS_UNDER_CONSTRUCTION =
64
CANT_FIND_DROP_OFF =
65
CANT_LOAD_OTHER_PLAYERS_UNITS =
66
NOT_ENOUGH_ROOM_TO_LOAD_UNIT =
67
CANT_UNLOAD_UNITS_THERE =
68
CANT_WARP_IN_UNITS_THERE =
69
CANT_LOAD_IMMOBILE_UNITS =
70
CANT_RECHARGE_IMMOBILE_UNITS =
71
CANT_RECHARGE_UNDER_CONSTRUCTION_UNITS =
72
CANT_LOAD_THAT_UNIT =
73
NO_CARGO_TO_UNLOAD =
74
LOAD_ALL_NO_TARGETS_FOUND =
75
NOT_WHILE_OCCUPIED =
76
CANT_ATTACK_WITHOUT_AMMO =
77
CANT_HOLD_ANY_MORE_AMMO =
78
TECH_REQUIREMENTS_NOT_MET =
79
MUST_LOCKDOWN_UNIT_FIRST =
80
MUST_TARGET_UNIT =
81
MUST_TARGET_INVENTORY =
82
MUST_TARGET_VISIBLE_UNIT =
83
MUST_TARGET_VISIBLE_LOCATION =
84
MUST_TARGET_WALKABLE_LOCATION =
85
MUST_TARGET_PAWNABLE_UNIT =
86
YOU_CANT_CONTROL_THAT_UNIT =
87
YOU_CANT_ISSUE_COMMANDS_TO_THAT_UNIT =
88
MUST_TARGET_RESOURCES =
89
REQUIRES_HEAL_TARGET =
90
REQUIRES_REPAIR_TARGET =
91
NO_ITEMS_TO_DROP =
92
CANT_HOLD_ANY_MORE_ITEMS =
93
CANT_HOLD_THAT =
94
TARGET_HAS_NO_INVENTORY =
95
CANT_DROP_THIS_ITEM =
96
CANT_MOVE_THIS_ITEM =
97
CANT_PAWN_THIS_UNIT =
98
MUST_TARGET_CASTER =
99
CANT_TARGET_CASTER =
100
MUST_TARGET_OUTER =
101
CANT_TARGET_OUTER =
102
MUST_TARGET_YOUR_OWN_UNITS =
103
CANT_TARGET_YOUR_OWN_UNITS =
104
MUST_TARGET_FRIENDLY_UNITS =
105
CANT_TARGET_FRIENDLY_UNITS =
106
MUST_TARGET_NEUTRAL_UNITS =
107
CANT_TARGET_NEUTRAL_UNITS =
108
MUST_TARGET_ENEMY_UNITS =
109
CANT_TARGET_ENEMY_UNITS =
110
MUST_TARGET_AIR_UNITS =
111
CANT_TARGET_AIR_UNITS =
112
MUST_TARGET_GROUND_UNITS =
113
CANT_TARGET_GROUND_UNITS =
114
MUST_TARGET_STRUCTURES =
115
CANT_TARGET_STRUCTURES =
116
MUST_TARGET_LIGHT_UNITS =
117
CANT_TARGET_LIGHT_UNITS =
118
MUST_TARGET_ARMORED_UNITS =
119
CANT_TARGET_ARMORED_UNITS =
120
MUST_TARGET_BIOLOGICAL_UNITS =
121
CANT_TARGET_BIOLOGICAL_UNITS =
122
MUST_TARGET_HEROIC_UNITS =
123
CANT_TARGET_HEROIC_UNITS =
124
MUST_TARGET_ROBOTIC_UNITS =
125
CANT_TARGET_ROBOTIC_UNITS =
126
MUST_TARGET_MECHANICAL_UNITS =
127
CANT_TARGET_MECHANICAL_UNITS =
128
MUST_TARGET_PSIONIC_UNITS =
129
CANT_TARGET_PSIONIC_UNITS =
130
MUST_TARGET_MASSIVE_UNITS =
131
CANT_TARGET_MASSIVE_UNITS =
132
MUST_TARGET_MISSILE =
133
CANT_TARGET_MISSILE =
134
MUST_TARGET_WORKER_UNITS =
135
CANT_TARGET_WORKER_UNITS =
136
MUST_TARGET_ENERGY_CAPABLE_UNITS =
137
CANT_TARGET_ENERGY_CAPABLE_UNITS =
138
MUST_TARGET_SHIELD_CAPABLE_UNITS =
139
CANT_TARGET_SHIELD_CAPABLE_UNITS =
140
MUST_TARGET_FLYERS =
141
CANT_TARGET_FLYERS =
142
MUST_TARGET_BURIED_UNITS =
143
CANT_TARGET_BURIED_UNITS =
144
MUST_TARGET_CLOAKED_UNITS =
145
CANT_TARGET_CLOAKED_UNITS =
146
MUST_TARGET_UNITS_IN_A_STASIS_FIELD =
147
CANT_TARGET_UNITS_IN_A_STASIS_FIELD =
148
MUST_TARGET_UNDER_CONSTRUCTION_UNITS =
149
CANT_TARGET_UNDER_CONSTRUCTION_UNITS =
150
MUST_TARGET_DEAD_UNITS =
151
CANT_TARGET_DEAD_UNITS =
152
MUST_TARGET_REVIVABLE_UNITS =
153
CANT_TARGET_REVIVABLE_UNITS =
154
MUST_TARGET_HIDDEN_UNITS =
155
CANT_TARGET_HIDDEN_UNITS =
156
CANT_RECHARGE_OTHER_PLAYERS_UNITS =
157
MUST_TARGET_HALLUCINATIONS =
158
CANT_TARGET_HALLUCINATIONS =
159
MUST_TARGET_INVULNERABLE_UNITS =
160
CANT_TARGET_INVULNERABLE_UNITS =
161
MUST_TARGET_DETECTED_UNITS =
162
CANT_TARGET_DETECTED_UNITS =
163
CANT_TARGET_UNIT_WITH_ENERGY =
164
CANT_TARGET_UNIT_WITH_SHIELDS =
165
MUST_TARGET_UNCOMMANDABLE_UNITS =
166
CANT_TARGET_UNCOMMANDABLE_UNITS =
167
MUST_TARGET_PREVENT_DEFEAT_UNITS =
168
CANT_TARGET_PREVENT_DEFEAT_UNITS =
169
MUST_TARGET_PREVENT_REVEAL_UNITS =
170
CANT_TARGET_PREVENT_REVEAL_UNITS =
171
MUST_TARGET_PASSIVE_UNITS =
172
CANT_TARGET_PASSIVE_UNITS =
173
MUST_TARGET_STUNNED_UNITS =
174
CANT_TARGET_STUNNED_UNITS =
175
MUST_TARGET_SUMMONED_UNITS =
176
CANT_TARGET_SUMMONED_UNITS =
177
MUST_TARGET_USER1 =
178
CANT_TARGET_USER1 =
179
MUST_TARGET_UNSTOPPABLE_UNITS =
180
CANT_TARGET_UNSTOPPABLE_UNITS =
181
MUST_TARGET_RESISTANT_UNITS =
182
CANT_TARGET_RESISTANT_UNITS =
183
MUST_TARGET_DAZED_UNITS =
184
CANT_TARGET_DAZED_UNITS =
185
CANT_LOCKDOWN =
186
CANT_MIND_CONTROL =
187
MUST_TARGET_DESTRUCTIBLES =
188
CANT_TARGET_DESTRUCTIBLES =
189
MUST_TARGET_ITEMS =
190
CANT_TARGET_ITEMS =
191
NO_CALLDOWN_AVAILABLE =
192
WAYPOINT_LIST_FULL =
193
MUST_TARGET_RACE =
194
CANT_TARGET_RACE =
195
MUST_TARGET_SIMILAR_UNITS =
196
CANT_TARGET_SIMILAR_UNITS =
197
CANT_FIND_ENOUGH_TARGETS =
198
ALREADY_SPAWNING_LARVA =
199
CANT_TARGET_EXHAUSTED_RESOURCES =
200
CANT_USE_MINIMAP =
201
CANT_USE_INFO_PANEL =
202
ORDER_QUEUE_IS_FULL =
203
CANT_HARVEST_THAT_RESOURCE =
204
HARVESTERS_NOT_REQUIRED =
205
ALREADY_TARGETED =
206
CANT_ATTACK_WEAPONS_DISABLED =
207
COULDNT_REACH_TARGET =
208
TARGET_IS_OUT_OF_RANGE =
209
TARGET_IS_TOO_CLOSE =
210
TARGET_IS_OUT_OF_ARC =
211
CANT_FIND_TELEPORT_LOCATION =
212
INVALID_ITEM_CLASS =
213
CANT_FIND_CANCEL_ORDER =
214

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



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
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/sc2ai/protocol/error_pb.rb', line 223

def self.lookup(val)
  if val == 0
    :ENUM_ACTION_RESULT_UNSET
  elsif val == 1
    :SUCCESS
  elsif val == 2
    :NOT_SUPPORTED
  elsif val == 3
    :ERROR
  elsif val == 4
    :CANT_QUEUE_THAT_ORDER
  elsif val == 5
    :RETRY
  elsif val == 6
    :COOLDOWN
  elsif val == 7
    :QUEUE_IS_FULL
  elsif val == 8
    :RALLY_QUEUE_IS_FULL
  elsif val == 9
    :NOT_ENOUGH_MINERALS
  elsif val == 10
    :NOT_ENOUGH_VESPENE
  elsif val == 11
    :NOT_ENOUGH_TERRAZINE
  elsif val == 12
    :NOT_ENOUGH_CUSTOM
  elsif val == 13
    :NOT_ENOUGH_FOOD
  elsif val == 14
    :FOOD_USAGE_IMPOSSIBLE
  elsif val == 15
    :NOT_ENOUGH_LIFE
  elsif val == 16
    :NOT_ENOUGH_SHIELDS
  elsif val == 17
    :NOT_ENOUGH_ENERGY
  elsif val == 18
    :LIFE_SUPPRESSED
  elsif val == 19
    :SHIELDS_SUPPRESSED
  elsif val == 20
    :ENERGY_SUPPRESSED
  elsif val == 21
    :NOT_ENOUGH_CHARGES
  elsif val == 22
    :CANT_ADD_MORE_CHARGES
  elsif val == 23
    :TOO_MUCH_MINERALS
  elsif val == 24
    :TOO_MUCH_VESPENE
  elsif val == 25
    :TOO_MUCH_TERRAZINE
  elsif val == 26
    :TOO_MUCH_CUSTOM
  elsif val == 27
    :TOO_MUCH_FOOD
  elsif val == 28
    :TOO_MUCH_LIFE
  elsif val == 29
    :TOO_MUCH_SHIELDS
  elsif val == 30
    :TOO_MUCH_ENERGY
  elsif val == 31
    :MUST_TARGET_UNIT_WITH_LIFE
  elsif val == 32
    :MUST_TARGET_UNIT_WITH_SHIELDS
  elsif val == 33
    :MUST_TARGET_UNIT_WITH_ENERGY
  elsif val == 34
    :CANT_TRADE
  elsif val == 35
    :CANT_SPEND
  elsif val == 36
    :CANT_TARGET_THAT_UNIT
  elsif val == 37
    :COULDNT_ALLOCATE_UNIT
  elsif val == 38
    :UNIT_CANT_MOVE
  elsif val == 39
    :TRANSPORT_IS_HOLDING_POSITION
  elsif val == 40
    :BUILD_TECH_REQUIREMENTS_NOT_MET
  elsif val == 41
    :CANT_FIND_PLACEMENT_LOCATION
  elsif val == 42
    :CANT_BUILD_ON_THAT
  elsif val == 43
    :CANT_BUILD_TOO_CLOSE_TO_DROP_OFF
  elsif val == 44
    :CANT_BUILD_LOCATION_INVALID
  elsif val == 45
    :CANT_SEE_BUILD_LOCATION
  elsif val == 46
    :CANT_BUILD_TOO_CLOSE_TO_CREEP_SOURCE
  elsif val == 47
    :CANT_BUILD_TOO_CLOSE_TO_RESOURCES
  elsif val == 48
    :CANT_BUILD_TOO_FAR_FROM_WATER
  elsif val == 49
    :CANT_BUILD_TOO_FAR_FROM_CREEP_SOURCE
  elsif val == 50
    :CANT_BUILD_TOO_FAR_FROM_BUILD_POWER_SOURCE
  elsif val == 51
    :CANT_BUILD_ON_DENSE_TERRAIN
  elsif val == 52
    :CANT_TRAIN_TOO_FAR_FROM_TRAIN_POWER_SOURCE
  elsif val == 53
    :CANT_LAND_LOCATION_INVALID
  elsif val == 54
    :CANT_SEE_LAND_LOCATION
  elsif val == 55
    :CANT_LAND_TOO_CLOSE_TO_CREEP_SOURCE
  elsif val == 56
    :CANT_LAND_TOO_CLOSE_TO_RESOURCES
  elsif val == 57
    :CANT_LAND_TOO_FAR_FROM_WATER
  elsif val == 58
    :CANT_LAND_TOO_FAR_FROM_CREEP_SOURCE
  elsif val == 59
    :CANT_LAND_TOO_FAR_FROM_BUILD_POWER_SOURCE
  elsif val == 60
    :CANT_LAND_TOO_FAR_FROM_TRAIN_POWER_SOURCE
  elsif val == 61
    :CANT_LAND_ON_DENSE_TERRAIN
  elsif val == 62
    :ADD_ON_TOO_FAR_FROM_BUILDING
  elsif val == 63
    :MUST_BUILD_REFINERY_FIRST
  elsif val == 64
    :BUILDING_IS_UNDER_CONSTRUCTION
  elsif val == 65
    :CANT_FIND_DROP_OFF
  elsif val == 66
    :CANT_LOAD_OTHER_PLAYERS_UNITS
  elsif val == 67
    :NOT_ENOUGH_ROOM_TO_LOAD_UNIT
  elsif val == 68
    :CANT_UNLOAD_UNITS_THERE
  elsif val == 69
    :CANT_WARP_IN_UNITS_THERE
  elsif val == 70
    :CANT_LOAD_IMMOBILE_UNITS
  elsif val == 71
    :CANT_RECHARGE_IMMOBILE_UNITS
  elsif val == 72
    :CANT_RECHARGE_UNDER_CONSTRUCTION_UNITS
  elsif val == 73
    :CANT_LOAD_THAT_UNIT
  elsif val == 74
    :NO_CARGO_TO_UNLOAD
  elsif val == 75
    :LOAD_ALL_NO_TARGETS_FOUND
  elsif val == 76
    :NOT_WHILE_OCCUPIED
  elsif val == 77
    :CANT_ATTACK_WITHOUT_AMMO
  elsif val == 78
    :CANT_HOLD_ANY_MORE_AMMO
  elsif val == 79
    :TECH_REQUIREMENTS_NOT_MET
  elsif val == 80
    :MUST_LOCKDOWN_UNIT_FIRST
  elsif val == 81
    :MUST_TARGET_UNIT
  elsif val == 82
    :MUST_TARGET_INVENTORY
  elsif val == 83
    :MUST_TARGET_VISIBLE_UNIT
  elsif val == 84
    :MUST_TARGET_VISIBLE_LOCATION
  elsif val == 85
    :MUST_TARGET_WALKABLE_LOCATION
  elsif val == 86
    :MUST_TARGET_PAWNABLE_UNIT
  elsif val == 87
    :YOU_CANT_CONTROL_THAT_UNIT
  elsif val == 88
    :YOU_CANT_ISSUE_COMMANDS_TO_THAT_UNIT
  elsif val == 89
    :MUST_TARGET_RESOURCES
  elsif val == 90
    :REQUIRES_HEAL_TARGET
  elsif val == 91
    :REQUIRES_REPAIR_TARGET
  elsif val == 92
    :NO_ITEMS_TO_DROP
  elsif val == 93
    :CANT_HOLD_ANY_MORE_ITEMS
  elsif val == 94
    :CANT_HOLD_THAT
  elsif val == 95
    :TARGET_HAS_NO_INVENTORY
  elsif val == 96
    :CANT_DROP_THIS_ITEM
  elsif val == 97
    :CANT_MOVE_THIS_ITEM
  elsif val == 98
    :CANT_PAWN_THIS_UNIT
  elsif val == 99
    :MUST_TARGET_CASTER
  elsif val == 100
    :CANT_TARGET_CASTER
  elsif val == 101
    :MUST_TARGET_OUTER
  elsif val == 102
    :CANT_TARGET_OUTER
  elsif val == 103
    :MUST_TARGET_YOUR_OWN_UNITS
  elsif val == 104
    :CANT_TARGET_YOUR_OWN_UNITS
  elsif val == 105
    :MUST_TARGET_FRIENDLY_UNITS
  elsif val == 106
    :CANT_TARGET_FRIENDLY_UNITS
  elsif val == 107
    :MUST_TARGET_NEUTRAL_UNITS
  elsif val == 108
    :CANT_TARGET_NEUTRAL_UNITS
  elsif val == 109
    :MUST_TARGET_ENEMY_UNITS
  elsif val == 110
    :CANT_TARGET_ENEMY_UNITS
  elsif val == 111
    :MUST_TARGET_AIR_UNITS
  elsif val == 112
    :CANT_TARGET_AIR_UNITS
  elsif val == 113
    :MUST_TARGET_GROUND_UNITS
  elsif val == 114
    :CANT_TARGET_GROUND_UNITS
  elsif val == 115
    :MUST_TARGET_STRUCTURES
  elsif val == 116
    :CANT_TARGET_STRUCTURES
  elsif val == 117
    :MUST_TARGET_LIGHT_UNITS
  elsif val == 118
    :CANT_TARGET_LIGHT_UNITS
  elsif val == 119
    :MUST_TARGET_ARMORED_UNITS
  elsif val == 120
    :CANT_TARGET_ARMORED_UNITS
  elsif val == 121
    :MUST_TARGET_BIOLOGICAL_UNITS
  elsif val == 122
    :CANT_TARGET_BIOLOGICAL_UNITS
  elsif val == 123
    :MUST_TARGET_HEROIC_UNITS
  elsif val == 124
    :CANT_TARGET_HEROIC_UNITS
  elsif val == 125
    :MUST_TARGET_ROBOTIC_UNITS
  elsif val == 126
    :CANT_TARGET_ROBOTIC_UNITS
  elsif val == 127
    :MUST_TARGET_MECHANICAL_UNITS
  elsif val == 128
    :CANT_TARGET_MECHANICAL_UNITS
  elsif val == 129
    :MUST_TARGET_PSIONIC_UNITS
  elsif val == 130
    :CANT_TARGET_PSIONIC_UNITS
  elsif val == 131
    :MUST_TARGET_MASSIVE_UNITS
  elsif val == 132
    :CANT_TARGET_MASSIVE_UNITS
  elsif val == 133
    :MUST_TARGET_MISSILE
  elsif val == 134
    :CANT_TARGET_MISSILE
  elsif val == 135
    :MUST_TARGET_WORKER_UNITS
  elsif val == 136
    :CANT_TARGET_WORKER_UNITS
  elsif val == 137
    :MUST_TARGET_ENERGY_CAPABLE_UNITS
  elsif val == 138
    :CANT_TARGET_ENERGY_CAPABLE_UNITS
  elsif val == 139
    :MUST_TARGET_SHIELD_CAPABLE_UNITS
  elsif val == 140
    :CANT_TARGET_SHIELD_CAPABLE_UNITS
  elsif val == 141
    :MUST_TARGET_FLYERS
  elsif val == 142
    :CANT_TARGET_FLYERS
  elsif val == 143
    :MUST_TARGET_BURIED_UNITS
  elsif val == 144
    :CANT_TARGET_BURIED_UNITS
  elsif val == 145
    :MUST_TARGET_CLOAKED_UNITS
  elsif val == 146
    :CANT_TARGET_CLOAKED_UNITS
  elsif val == 147
    :MUST_TARGET_UNITS_IN_A_STASIS_FIELD
  elsif val == 148
    :CANT_TARGET_UNITS_IN_A_STASIS_FIELD
  elsif val == 149
    :MUST_TARGET_UNDER_CONSTRUCTION_UNITS
  elsif val == 150
    :CANT_TARGET_UNDER_CONSTRUCTION_UNITS
  elsif val == 151
    :MUST_TARGET_DEAD_UNITS
  elsif val == 152
    :CANT_TARGET_DEAD_UNITS
  elsif val == 153
    :MUST_TARGET_REVIVABLE_UNITS
  elsif val == 154
    :CANT_TARGET_REVIVABLE_UNITS
  elsif val == 155
    :MUST_TARGET_HIDDEN_UNITS
  elsif val == 156
    :CANT_TARGET_HIDDEN_UNITS
  elsif val == 157
    :CANT_RECHARGE_OTHER_PLAYERS_UNITS
  elsif val == 158
    :MUST_TARGET_HALLUCINATIONS
  elsif val == 159
    :CANT_TARGET_HALLUCINATIONS
  elsif val == 160
    :MUST_TARGET_INVULNERABLE_UNITS
  elsif val == 161
    :CANT_TARGET_INVULNERABLE_UNITS
  elsif val == 162
    :MUST_TARGET_DETECTED_UNITS
  elsif val == 163
    :CANT_TARGET_DETECTED_UNITS
  elsif val == 164
    :CANT_TARGET_UNIT_WITH_ENERGY
  elsif val == 165
    :CANT_TARGET_UNIT_WITH_SHIELDS
  elsif val == 166
    :MUST_TARGET_UNCOMMANDABLE_UNITS
  elsif val == 167
    :CANT_TARGET_UNCOMMANDABLE_UNITS
  elsif val == 168
    :MUST_TARGET_PREVENT_DEFEAT_UNITS
  elsif val == 169
    :CANT_TARGET_PREVENT_DEFEAT_UNITS
  elsif val == 170
    :MUST_TARGET_PREVENT_REVEAL_UNITS
  elsif val == 171
    :CANT_TARGET_PREVENT_REVEAL_UNITS
  elsif val == 172
    :MUST_TARGET_PASSIVE_UNITS
  elsif val == 173
    :CANT_TARGET_PASSIVE_UNITS
  elsif val == 174
    :MUST_TARGET_STUNNED_UNITS
  elsif val == 175
    :CANT_TARGET_STUNNED_UNITS
  elsif val == 176
    :MUST_TARGET_SUMMONED_UNITS
  elsif val == 177
    :CANT_TARGET_SUMMONED_UNITS
  elsif val == 178
    :MUST_TARGET_USER1
  elsif val == 179
    :CANT_TARGET_USER1
  elsif val == 180
    :MUST_TARGET_UNSTOPPABLE_UNITS
  elsif val == 181
    :CANT_TARGET_UNSTOPPABLE_UNITS
  elsif val == 182
    :MUST_TARGET_RESISTANT_UNITS
  elsif val == 183
    :CANT_TARGET_RESISTANT_UNITS
  elsif val == 184
    :MUST_TARGET_DAZED_UNITS
  elsif val == 185
    :CANT_TARGET_DAZED_UNITS
  elsif val == 186
    :CANT_LOCKDOWN
  elsif val == 187
    :CANT_MIND_CONTROL
  elsif val == 188
    :MUST_TARGET_DESTRUCTIBLES
  elsif val == 189
    :CANT_TARGET_DESTRUCTIBLES
  elsif val == 190
    :MUST_TARGET_ITEMS
  elsif val == 191
    :CANT_TARGET_ITEMS
  elsif val == 192
    :NO_CALLDOWN_AVAILABLE
  elsif val == 193
    :WAYPOINT_LIST_FULL
  elsif val == 194
    :MUST_TARGET_RACE
  elsif val == 195
    :CANT_TARGET_RACE
  elsif val == 196
    :MUST_TARGET_SIMILAR_UNITS
  elsif val == 197
    :CANT_TARGET_SIMILAR_UNITS
  elsif val == 198
    :CANT_FIND_ENOUGH_TARGETS
  elsif val == 199
    :ALREADY_SPAWNING_LARVA
  elsif val == 200
    :CANT_TARGET_EXHAUSTED_RESOURCES
  elsif val == 201
    :CANT_USE_MINIMAP
  elsif val == 202
    :CANT_USE_INFO_PANEL
  elsif val == 203
    :ORDER_QUEUE_IS_FULL
  elsif val == 204
    :CANT_HARVEST_THAT_RESOURCE
  elsif val == 205
    :HARVESTERS_NOT_REQUIRED
  elsif val == 206
    :ALREADY_TARGETED
  elsif val == 207
    :CANT_ATTACK_WEAPONS_DISABLED
  elsif val == 208
    :COULDNT_REACH_TARGET
  elsif val == 209
    :TARGET_IS_OUT_OF_RANGE
  elsif val == 210
    :TARGET_IS_TOO_CLOSE
  elsif val == 211
    :TARGET_IS_OUT_OF_ARC
  elsif val == 212
    :CANT_FIND_TELEPORT_LOCATION
  elsif val == 213
    :INVALID_ITEM_CLASS
  elsif val == 214
    :CANT_FIND_CANCEL_ORDER
  end
end

.resolve(val) ⇒ Object



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/sc2ai/protocol/error_pb.rb', line 657

def self.resolve(val)
  if val == :ENUM_ACTION_RESULT_UNSET
    0
  elsif val == :SUCCESS
    1
  elsif val == :NOT_SUPPORTED
    2
  elsif val == :ERROR
    3
  elsif val == :CANT_QUEUE_THAT_ORDER
    4
  elsif val == :RETRY
    5
  elsif val == :COOLDOWN
    6
  elsif val == :QUEUE_IS_FULL
    7
  elsif val == :RALLY_QUEUE_IS_FULL
    8
  elsif val == :NOT_ENOUGH_MINERALS
    9
  elsif val == :NOT_ENOUGH_VESPENE
    10
  elsif val == :NOT_ENOUGH_TERRAZINE
    11
  elsif val == :NOT_ENOUGH_CUSTOM
    12
  elsif val == :NOT_ENOUGH_FOOD
    13
  elsif val == :FOOD_USAGE_IMPOSSIBLE
    14
  elsif val == :NOT_ENOUGH_LIFE
    15
  elsif val == :NOT_ENOUGH_SHIELDS
    16
  elsif val == :NOT_ENOUGH_ENERGY
    17
  elsif val == :LIFE_SUPPRESSED
    18
  elsif val == :SHIELDS_SUPPRESSED
    19
  elsif val == :ENERGY_SUPPRESSED
    20
  elsif val == :NOT_ENOUGH_CHARGES
    21
  elsif val == :CANT_ADD_MORE_CHARGES
    22
  elsif val == :TOO_MUCH_MINERALS
    23
  elsif val == :TOO_MUCH_VESPENE
    24
  elsif val == :TOO_MUCH_TERRAZINE
    25
  elsif val == :TOO_MUCH_CUSTOM
    26
  elsif val == :TOO_MUCH_FOOD
    27
  elsif val == :TOO_MUCH_LIFE
    28
  elsif val == :TOO_MUCH_SHIELDS
    29
  elsif val == :TOO_MUCH_ENERGY
    30
  elsif val == :MUST_TARGET_UNIT_WITH_LIFE
    31
  elsif val == :MUST_TARGET_UNIT_WITH_SHIELDS
    32
  elsif val == :MUST_TARGET_UNIT_WITH_ENERGY
    33
  elsif val == :CANT_TRADE
    34
  elsif val == :CANT_SPEND
    35
  elsif val == :CANT_TARGET_THAT_UNIT
    36
  elsif val == :COULDNT_ALLOCATE_UNIT
    37
  elsif val == :UNIT_CANT_MOVE
    38
  elsif val == :TRANSPORT_IS_HOLDING_POSITION
    39
  elsif val == :BUILD_TECH_REQUIREMENTS_NOT_MET
    40
  elsif val == :CANT_FIND_PLACEMENT_LOCATION
    41
  elsif val == :CANT_BUILD_ON_THAT
    42
  elsif val == :CANT_BUILD_TOO_CLOSE_TO_DROP_OFF
    43
  elsif val == :CANT_BUILD_LOCATION_INVALID
    44
  elsif val == :CANT_SEE_BUILD_LOCATION
    45
  elsif val == :CANT_BUILD_TOO_CLOSE_TO_CREEP_SOURCE
    46
  elsif val == :CANT_BUILD_TOO_CLOSE_TO_RESOURCES
    47
  elsif val == :CANT_BUILD_TOO_FAR_FROM_WATER
    48
  elsif val == :CANT_BUILD_TOO_FAR_FROM_CREEP_SOURCE
    49
  elsif val == :CANT_BUILD_TOO_FAR_FROM_BUILD_POWER_SOURCE
    50
  elsif val == :CANT_BUILD_ON_DENSE_TERRAIN
    51
  elsif val == :CANT_TRAIN_TOO_FAR_FROM_TRAIN_POWER_SOURCE
    52
  elsif val == :CANT_LAND_LOCATION_INVALID
    53
  elsif val == :CANT_SEE_LAND_LOCATION
    54
  elsif val == :CANT_LAND_TOO_CLOSE_TO_CREEP_SOURCE
    55
  elsif val == :CANT_LAND_TOO_CLOSE_TO_RESOURCES
    56
  elsif val == :CANT_LAND_TOO_FAR_FROM_WATER
    57
  elsif val == :CANT_LAND_TOO_FAR_FROM_CREEP_SOURCE
    58
  elsif val == :CANT_LAND_TOO_FAR_FROM_BUILD_POWER_SOURCE
    59
  elsif val == :CANT_LAND_TOO_FAR_FROM_TRAIN_POWER_SOURCE
    60
  elsif val == :CANT_LAND_ON_DENSE_TERRAIN
    61
  elsif val == :ADD_ON_TOO_FAR_FROM_BUILDING
    62
  elsif val == :MUST_BUILD_REFINERY_FIRST
    63
  elsif val == :BUILDING_IS_UNDER_CONSTRUCTION
    64
  elsif val == :CANT_FIND_DROP_OFF
    65
  elsif val == :CANT_LOAD_OTHER_PLAYERS_UNITS
    66
  elsif val == :NOT_ENOUGH_ROOM_TO_LOAD_UNIT
    67
  elsif val == :CANT_UNLOAD_UNITS_THERE
    68
  elsif val == :CANT_WARP_IN_UNITS_THERE
    69
  elsif val == :CANT_LOAD_IMMOBILE_UNITS
    70
  elsif val == :CANT_RECHARGE_IMMOBILE_UNITS
    71
  elsif val == :CANT_RECHARGE_UNDER_CONSTRUCTION_UNITS
    72
  elsif val == :CANT_LOAD_THAT_UNIT
    73
  elsif val == :NO_CARGO_TO_UNLOAD
    74
  elsif val == :LOAD_ALL_NO_TARGETS_FOUND
    75
  elsif val == :NOT_WHILE_OCCUPIED
    76
  elsif val == :CANT_ATTACK_WITHOUT_AMMO
    77
  elsif val == :CANT_HOLD_ANY_MORE_AMMO
    78
  elsif val == :TECH_REQUIREMENTS_NOT_MET
    79
  elsif val == :MUST_LOCKDOWN_UNIT_FIRST
    80
  elsif val == :MUST_TARGET_UNIT
    81
  elsif val == :MUST_TARGET_INVENTORY
    82
  elsif val == :MUST_TARGET_VISIBLE_UNIT
    83
  elsif val == :MUST_TARGET_VISIBLE_LOCATION
    84
  elsif val == :MUST_TARGET_WALKABLE_LOCATION
    85
  elsif val == :MUST_TARGET_PAWNABLE_UNIT
    86
  elsif val == :YOU_CANT_CONTROL_THAT_UNIT
    87
  elsif val == :YOU_CANT_ISSUE_COMMANDS_TO_THAT_UNIT
    88
  elsif val == :MUST_TARGET_RESOURCES
    89
  elsif val == :REQUIRES_HEAL_TARGET
    90
  elsif val == :REQUIRES_REPAIR_TARGET
    91
  elsif val == :NO_ITEMS_TO_DROP
    92
  elsif val == :CANT_HOLD_ANY_MORE_ITEMS
    93
  elsif val == :CANT_HOLD_THAT
    94
  elsif val == :TARGET_HAS_NO_INVENTORY
    95
  elsif val == :CANT_DROP_THIS_ITEM
    96
  elsif val == :CANT_MOVE_THIS_ITEM
    97
  elsif val == :CANT_PAWN_THIS_UNIT
    98
  elsif val == :MUST_TARGET_CASTER
    99
  elsif val == :CANT_TARGET_CASTER
    100
  elsif val == :MUST_TARGET_OUTER
    101
  elsif val == :CANT_TARGET_OUTER
    102
  elsif val == :MUST_TARGET_YOUR_OWN_UNITS
    103
  elsif val == :CANT_TARGET_YOUR_OWN_UNITS
    104
  elsif val == :MUST_TARGET_FRIENDLY_UNITS
    105
  elsif val == :CANT_TARGET_FRIENDLY_UNITS
    106
  elsif val == :MUST_TARGET_NEUTRAL_UNITS
    107
  elsif val == :CANT_TARGET_NEUTRAL_UNITS
    108
  elsif val == :MUST_TARGET_ENEMY_UNITS
    109
  elsif val == :CANT_TARGET_ENEMY_UNITS
    110
  elsif val == :MUST_TARGET_AIR_UNITS
    111
  elsif val == :CANT_TARGET_AIR_UNITS
    112
  elsif val == :MUST_TARGET_GROUND_UNITS
    113
  elsif val == :CANT_TARGET_GROUND_UNITS
    114
  elsif val == :MUST_TARGET_STRUCTURES
    115
  elsif val == :CANT_TARGET_STRUCTURES
    116
  elsif val == :MUST_TARGET_LIGHT_UNITS
    117
  elsif val == :CANT_TARGET_LIGHT_UNITS
    118
  elsif val == :MUST_TARGET_ARMORED_UNITS
    119
  elsif val == :CANT_TARGET_ARMORED_UNITS
    120
  elsif val == :MUST_TARGET_BIOLOGICAL_UNITS
    121
  elsif val == :CANT_TARGET_BIOLOGICAL_UNITS
    122
  elsif val == :MUST_TARGET_HEROIC_UNITS
    123
  elsif val == :CANT_TARGET_HEROIC_UNITS
    124
  elsif val == :MUST_TARGET_ROBOTIC_UNITS
    125
  elsif val == :CANT_TARGET_ROBOTIC_UNITS
    126
  elsif val == :MUST_TARGET_MECHANICAL_UNITS
    127
  elsif val == :CANT_TARGET_MECHANICAL_UNITS
    128
  elsif val == :MUST_TARGET_PSIONIC_UNITS
    129
  elsif val == :CANT_TARGET_PSIONIC_UNITS
    130
  elsif val == :MUST_TARGET_MASSIVE_UNITS
    131
  elsif val == :CANT_TARGET_MASSIVE_UNITS
    132
  elsif val == :MUST_TARGET_MISSILE
    133
  elsif val == :CANT_TARGET_MISSILE
    134
  elsif val == :MUST_TARGET_WORKER_UNITS
    135
  elsif val == :CANT_TARGET_WORKER_UNITS
    136
  elsif val == :MUST_TARGET_ENERGY_CAPABLE_UNITS
    137
  elsif val == :CANT_TARGET_ENERGY_CAPABLE_UNITS
    138
  elsif val == :MUST_TARGET_SHIELD_CAPABLE_UNITS
    139
  elsif val == :CANT_TARGET_SHIELD_CAPABLE_UNITS
    140
  elsif val == :MUST_TARGET_FLYERS
    141
  elsif val == :CANT_TARGET_FLYERS
    142
  elsif val == :MUST_TARGET_BURIED_UNITS
    143
  elsif val == :CANT_TARGET_BURIED_UNITS
    144
  elsif val == :MUST_TARGET_CLOAKED_UNITS
    145
  elsif val == :CANT_TARGET_CLOAKED_UNITS
    146
  elsif val == :MUST_TARGET_UNITS_IN_A_STASIS_FIELD
    147
  elsif val == :CANT_TARGET_UNITS_IN_A_STASIS_FIELD
    148
  elsif val == :MUST_TARGET_UNDER_CONSTRUCTION_UNITS
    149
  elsif val == :CANT_TARGET_UNDER_CONSTRUCTION_UNITS
    150
  elsif val == :MUST_TARGET_DEAD_UNITS
    151
  elsif val == :CANT_TARGET_DEAD_UNITS
    152
  elsif val == :MUST_TARGET_REVIVABLE_UNITS
    153
  elsif val == :CANT_TARGET_REVIVABLE_UNITS
    154
  elsif val == :MUST_TARGET_HIDDEN_UNITS
    155
  elsif val == :CANT_TARGET_HIDDEN_UNITS
    156
  elsif val == :CANT_RECHARGE_OTHER_PLAYERS_UNITS
    157
  elsif val == :MUST_TARGET_HALLUCINATIONS
    158
  elsif val == :CANT_TARGET_HALLUCINATIONS
    159
  elsif val == :MUST_TARGET_INVULNERABLE_UNITS
    160
  elsif val == :CANT_TARGET_INVULNERABLE_UNITS
    161
  elsif val == :MUST_TARGET_DETECTED_UNITS
    162
  elsif val == :CANT_TARGET_DETECTED_UNITS
    163
  elsif val == :CANT_TARGET_UNIT_WITH_ENERGY
    164
  elsif val == :CANT_TARGET_UNIT_WITH_SHIELDS
    165
  elsif val == :MUST_TARGET_UNCOMMANDABLE_UNITS
    166
  elsif val == :CANT_TARGET_UNCOMMANDABLE_UNITS
    167
  elsif val == :MUST_TARGET_PREVENT_DEFEAT_UNITS
    168
  elsif val == :CANT_TARGET_PREVENT_DEFEAT_UNITS
    169
  elsif val == :MUST_TARGET_PREVENT_REVEAL_UNITS
    170
  elsif val == :CANT_TARGET_PREVENT_REVEAL_UNITS
    171
  elsif val == :MUST_TARGET_PASSIVE_UNITS
    172
  elsif val == :CANT_TARGET_PASSIVE_UNITS
    173
  elsif val == :MUST_TARGET_STUNNED_UNITS
    174
  elsif val == :CANT_TARGET_STUNNED_UNITS
    175
  elsif val == :MUST_TARGET_SUMMONED_UNITS
    176
  elsif val == :CANT_TARGET_SUMMONED_UNITS
    177
  elsif val == :MUST_TARGET_USER1
    178
  elsif val == :CANT_TARGET_USER1
    179
  elsif val == :MUST_TARGET_UNSTOPPABLE_UNITS
    180
  elsif val == :CANT_TARGET_UNSTOPPABLE_UNITS
    181
  elsif val == :MUST_TARGET_RESISTANT_UNITS
    182
  elsif val == :CANT_TARGET_RESISTANT_UNITS
    183
  elsif val == :MUST_TARGET_DAZED_UNITS
    184
  elsif val == :CANT_TARGET_DAZED_UNITS
    185
  elsif val == :CANT_LOCKDOWN
    186
  elsif val == :CANT_MIND_CONTROL
    187
  elsif val == :MUST_TARGET_DESTRUCTIBLES
    188
  elsif val == :CANT_TARGET_DESTRUCTIBLES
    189
  elsif val == :MUST_TARGET_ITEMS
    190
  elsif val == :CANT_TARGET_ITEMS
    191
  elsif val == :NO_CALLDOWN_AVAILABLE
    192
  elsif val == :WAYPOINT_LIST_FULL
    193
  elsif val == :MUST_TARGET_RACE
    194
  elsif val == :CANT_TARGET_RACE
    195
  elsif val == :MUST_TARGET_SIMILAR_UNITS
    196
  elsif val == :CANT_TARGET_SIMILAR_UNITS
    197
  elsif val == :CANT_FIND_ENOUGH_TARGETS
    198
  elsif val == :ALREADY_SPAWNING_LARVA
    199
  elsif val == :CANT_TARGET_EXHAUSTED_RESOURCES
    200
  elsif val == :CANT_USE_MINIMAP
    201
  elsif val == :CANT_USE_INFO_PANEL
    202
  elsif val == :ORDER_QUEUE_IS_FULL
    203
  elsif val == :CANT_HARVEST_THAT_RESOURCE
    204
  elsif val == :HARVESTERS_NOT_REQUIRED
    205
  elsif val == :ALREADY_TARGETED
    206
  elsif val == :CANT_ATTACK_WEAPONS_DISABLED
    207
  elsif val == :COULDNT_REACH_TARGET
    208
  elsif val == :TARGET_IS_OUT_OF_RANGE
    209
  elsif val == :TARGET_IS_TOO_CLOSE
    210
  elsif val == :TARGET_IS_OUT_OF_ARC
    211
  elsif val == :CANT_FIND_TELEPORT_LOCATION
    212
  elsif val == :INVALID_ITEM_CLASS
    213
  elsif val == :CANT_FIND_CANCEL_ORDER
    214
  end
end