Skip to content

Commit 8dadfff

Browse files
committed
Remove old build order constants and functions.
1 parent b9fa020 commit 8dadfff

File tree

2 files changed

+1
-150
lines changed

2 files changed

+1
-150
lines changed

sc2reader/constants.py

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -129,126 +129,6 @@
129129
3010 : 'unknown4', #no/yes (Never required)
130130
}
131131

132-
BUILD_ORDER_UPGRADES = {
133-
# Protoss
134-
135-
## Forge
136-
0x2902 : 'Protoss Ground Weapons Level 1',
137-
0x2a02 : 'Protoss Ground Weapons Level 2',
138-
0x2b02 : 'Protoss Ground Weapons Level 3',
139-
0x2c02 : 'Protoss Ground Armor Level 1',
140-
0x2d02 : 'Protoss Ground Armor Level 2',
141-
0x2e02 : 'Protoss Ground Armor Level 3',
142-
0x2f02 : 'Protoss Shields Level 1',
143-
0x3002 : 'Protoss Shields Level 2',
144-
0x3102 : 'Protoss Shields Level 3',
145-
## Robo bay
146-
0x3202 : 'Gravitic Boosters',
147-
0x3302 : 'Gravitic Drive',
148-
0x3402 : 'Extended Thermal Lance',
149-
## Cyber core
150-
0x5002 : 'Protoss Air Weapons Level 1',
151-
0x5102 : 'Protoss Air Weapons Level 2',
152-
0x5202 : 'Protoss Air Weapons Level 3',
153-
0x5302 : 'Protoss Air Armor Level 1',
154-
0x5402 : 'Protoss Air Armor Level 2',
155-
0x5502 : 'Protoss Air Armor Level 3',
156-
0x5602 : 'Warp Gate Research',
157-
0x5702 : 'Hallucination',
158-
## Twilight
159-
0x5802 : 'Charge',
160-
0x5902 : 'Blink',
161-
## Fleet Beacon
162-
0x0302 : 'Graviton Catapult',
163-
0x7102 : 'Anion Pulse-Crystals',
164-
165-
#Zerg
166-
167-
## Roach Warren
168-
0x0402 : 'Gial Reconstitution',
169-
0x0502 : 'Tunneling Claws',
170-
## Ultralisk Cavern
171-
0x0602 : 'Chitinous Plating',
172-
## Evo. chamber
173-
0x3702 : 'Zerg Melee Attacks Level 1',
174-
0x3802 : 'Zerg Melee Attacks Level 2',
175-
0x3902 : 'Zerg Melee Attacks Level 3',
176-
0x3a02 : 'Zerg Ground Carapace Level 1',
177-
0x3b02 : 'Zerg Ground Carapace Level 2',
178-
0x3c02 : 'Zerg Ground Carapace Level 3',
179-
0x3d02 : 'Zerg Missile Attacks Level 1',
180-
0x3e02 : 'Zerg Missile Attacks Level 2',
181-
0x3f02 : 'Zerg Missile Attacks Level 3',
182-
## Lair
183-
0x4002 : 'Pneumatized Carapace',
184-
0x4102 : 'Ventral Sacs',
185-
0x4202 : 'Burrow',
186-
## Pool
187-
0x4302 : 'Adrenal Glands',
188-
0x4402 : 'Metabolic Boost',
189-
## Hydra den
190-
0x4502 : 'Grooved Spines',
191-
## Spire
192-
0x4602 : 'Zerg Flyer Attacks Level 1',
193-
0x4702 : 'Zerg Flyer Attacks Level 2',
194-
0x4802 : 'Zerg Flyer Attacks Level 3',
195-
0x4902 : 'Zerg Flyer Carapace Level 1',
196-
0x4a02 : 'Zerg Flyer Carapace Level 2',
197-
0x4b02 : 'Zerg Flyer Carapace Level 3',
198-
## Infestation pit
199-
0x4c02 : 'Pathogen Glands',
200-
0x7202 : 'Neural Parasite',
201-
## Baneling Nest
202-
0x4d02 : 'Centrifugal Hooks',
203-
204-
#Terran
205-
## Engineering bay
206-
0x702 : 'Hi-Sec Auto Tracking',
207-
0x802 : 'Terran Building Armor',
208-
0x902 : 'Terran Infantry Weapons Level 1',
209-
0xa02 : 'Terran Infantry Weapons Level 2',
210-
0xb02 : 'Terran Infantry Weapons Level 3',
211-
0xc02 : 'Neosteel Frame',
212-
0xd02 : 'Terran Infantry Armor Level 1',
213-
0xe02 : 'Terran Infantry Armor Level 2',
214-
0xf02 : 'Terran Infantry Armor Level 3',
215-
## Barracks tech lab
216-
0x1002 : 'Nitro Packs',
217-
0x1102 : 'Stimpack',
218-
0x1202 : 'Combat Shields',
219-
0x1302 : 'Concussive Shells',
220-
## Factory tech lab
221-
0x1402 : 'Siege Tech',
222-
0x1502 : 'Infernal Pre-igniter',
223-
0x7002 : '250mm Strike Cannons',
224-
## Starport tech lab
225-
0x1602 : 'Cloaking Field',
226-
0x1702 : 'Caduceus Reactor',
227-
0x1902 : 'Seeker Missile',
228-
0x1a02 : 'Durable Materials',
229-
0x4e02 : 'Corvid Reactor',
230-
## Fusion Core
231-
0x1802 : 'Behemoth Reactor',
232-
0x4f02 : 'Weapon Refit',
233-
## Ghost Academy
234-
0x1b02 : 'Personal Cloaking',
235-
0x1c02 : 'Moebiue Reactor',
236-
## Armory
237-
0x1d02 : 'Terran Vehicle Plating Level 1',
238-
0x1e02 : 'Terran Vehicle Plating Level 2',
239-
0x1f02 : 'Terran Vehicle Plating Level 3',
240-
0x2002 : 'Terran Vehicle Weapons Level 1',
241-
0x2102 : 'Terran Vehicle Weapons Level 2',
242-
0x2202 : 'Terran Vehicle Weapons Level 3',
243-
0x2302 : 'Terran Ship Plating Level 1',
244-
0x2402 : 'Terran Ship Plating Level 2',
245-
0x2502 : 'Terran Ship Plating Level 3',
246-
0x2602 : 'Terran Ship Weapons Level 1',
247-
0x2702 : 'Terran Ship Weapons Level 2',
248-
0x2802 : 'Terran Ship Weapons Level 3'
249-
}
250-
251-
# TODO: Not sure if this is a complete mapping
252132
REGIONS = {
253133
# United States
254134
'us': {

sc2reader/utils.py

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from collections import deque
1515

1616
from sc2reader import exceptions
17-
from sc2reader.constants import COLOR_CODES, COLOR_CODES_INV, BUILD_ORDER_UPGRADES
17+
from sc2reader.constants import COLOR_CODES, COLOR_CODES_INV
1818

1919
LITTLE_ENDIAN,BIG_ENDIAN = '<','>'
2020

@@ -566,32 +566,3 @@ def __str__(self):
566566
return "{0:0>2}.{1:0>2}.{2:0>2}".format(self.hours,self.mins,self.secs)
567567
else:
568568
return "{0:0>2}.{1:0>2}".format(self.mins,self.secs)
569-
570-
571-
def get_unit(type_int):
572-
"""
573-
Takes an int, i, with (i & 0xff000000) = 0x01000000
574-
and returns the corresponding unit/structure
575-
"""
576-
# Try to parse a unit
577-
unit_code = ((type_int & 0xff) << 8) | 0x01
578-
if unit_code in Data.units:
579-
unit_name = Data.units[unit_code].name
580-
else:
581-
unit_name = "Unknown Unit ({0:X})".format(type_int)
582-
583-
return dict(name=unit_name, type_int=hex(type_int))
584-
585-
586-
def get_research(type_int):
587-
"""
588-
Takes an int, i, with (i & 0xff000000) = 0x02000000
589-
and returns the corresponding research/upgrade
590-
"""
591-
research_code = ((type_int & 0xff) << 8) | 0x02
592-
if research_code in BUILD_ORDER_UPGRADES:
593-
research_name = BUILD_ORDER_UPGRADES[research_code]
594-
else:
595-
research_name = "Unknown upgrade ({0:X})".format(research_code)
596-
597-
return dict(name=research_name, type_int=hex(type_int))

0 commit comments

Comments
 (0)