Module: Api::Alert
- Defined in:
- lib/sc2ai/protocol/sc2api_pb.rb
Constant Summary collapse
- ENUM_ALERT_UNSET =
0
- ALERT_ERROR =
3
- ADD_ON_COMPLETE =
4
- BUILDING_COMPLETE =
5
- BUILDING_UNDER_ATTACK =
6
- LARVA_HATCHED =
7
- MERGE_COMPLETE =
8
- MINERALS_EXHAUSTED =
9
- MORPH_COMPLETE =
10
- MOTHERSHIP_COMPLETE =
11
- MULE_EXPIRED =
12
- NUCLEAR_LAUNCH_DETECTED =
1
- NUKE_COMPLETE =
13
- NYDUS_WORM_DETECTED =
2
- RESEARCH_COMPLETE =
14
- TRAIN_ERROR =
15
- TRAIN_UNIT_COMPLETE =
16
- TRAIN_WORKER_COMPLETE =
17
- TRANSFORMATION_COMPLETE =
18
- UNIT_UNDER_ATTACK =
19
- UPGRADE_COMPLETE =
20
- VESPENE_EXHAUSTED =
21
- WARP_IN_COMPLETE =
22
Class Method Summary collapse
Class Method Details
.lookup(val) ⇒ Object
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 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 221 def self.lookup(val) if val == 0 :ENUM_ALERT_UNSET elsif val == 3 :ALERT_ERROR elsif val == 4 :ADD_ON_COMPLETE elsif val == 5 :BUILDING_COMPLETE elsif val == 6 :BUILDING_UNDER_ATTACK elsif val == 7 :LARVA_HATCHED elsif val == 8 :MERGE_COMPLETE elsif val == 9 :MINERALS_EXHAUSTED elsif val == 10 :MORPH_COMPLETE elsif val == 11 :MOTHERSHIP_COMPLETE elsif val == 12 :MULE_EXPIRED elsif val == 1 :NUCLEAR_LAUNCH_DETECTED elsif val == 13 :NUKE_COMPLETE elsif val == 2 :NYDUS_WORM_DETECTED elsif val == 14 :RESEARCH_COMPLETE elsif val == 15 :TRAIN_ERROR elsif val == 16 :TRAIN_UNIT_COMPLETE elsif val == 17 :TRAIN_WORKER_COMPLETE elsif val == 18 :TRANSFORMATION_COMPLETE elsif val == 19 :UNIT_UNDER_ATTACK elsif val == 20 :UPGRADE_COMPLETE elsif val == 21 :VESPENE_EXHAUSTED elsif val == 22 :WARP_IN_COMPLETE end end |
.resolve(val) ⇒ Object
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 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 271 def self.resolve(val) if val == :ENUM_ALERT_UNSET 0 elsif val == :ALERT_ERROR 3 elsif val == :ADD_ON_COMPLETE 4 elsif val == :BUILDING_COMPLETE 5 elsif val == :BUILDING_UNDER_ATTACK 6 elsif val == :LARVA_HATCHED 7 elsif val == :MERGE_COMPLETE 8 elsif val == :MINERALS_EXHAUSTED 9 elsif val == :MORPH_COMPLETE 10 elsif val == :MOTHERSHIP_COMPLETE 11 elsif val == :MULE_EXPIRED 12 elsif val == :NUCLEAR_LAUNCH_DETECTED 1 elsif val == :NUKE_COMPLETE 13 elsif val == :NYDUS_WORM_DETECTED 2 elsif val == :RESEARCH_COMPLETE 14 elsif val == :TRAIN_ERROR 15 elsif val == :TRAIN_UNIT_COMPLETE 16 elsif val == :TRAIN_WORKER_COMPLETE 17 elsif val == :TRANSFORMATION_COMPLETE 18 elsif val == :UNIT_UNDER_ATTACK 19 elsif val == :UPGRADE_COMPLETE 20 elsif val == :VESPENE_EXHAUSTED 21 elsif val == :WARP_IN_COMPLETE 22 end end |