Skip to content

Commit 9d10152

Browse files
committed
Some cleanup work
1 parent 52690e6 commit 9d10152

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

sc2reader/resources.py

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -416,30 +416,6 @@ class GameSummary(Resource):
416416
'SB',
417417
'SRC',
418418
]
419-
lobby_keys = {
420-
3000 : ('game_speed', GAME_SPEED_CODES),
421-
2001 : ('game_type', GAME_FORMAT_CODES), #1v1/2v2/3v3/4v4/5v5/6v6/FFA
422-
3010 : ('unknown1', {'sey':'yes', 'on':'no'} ), #yes/no
423-
3006 : ('unknown2', {'3':'3','5':'5','7':'7','01':'10','51':'15','02':'20','52':'25','03':'30'}), #3',5/7/10/15/20/25/30
424-
1001 : ('unknown3', {'sey':'yes', 'on':'no'}), #yes/no
425-
1000 : ('unknown4', {'tlfD':'Default'}), #Dflt
426-
2000 : ('unknown5', {'2t':'t2', '3t':'t3', 'AFF':'FFA', 'tsuC':'Custom'}), #t2/t3/FFA/Cust
427-
3007 : ('unknown6', {'traP':'Part'}),
428-
3009 : ('lobby_type', GAME_TYPE_CODES) #Priv/Pub/Amm (Auto MatchMaking)
429-
}
430-
lobby_player_keys = {
431-
500 : ('slot_state', PLAYER_TYPE_CODES), #Clsd/Open/Humn/Comp
432-
3001 : ('race', RACE_CODES),
433-
3003 : ('energy', {'05':'50','06':'60','07':'70','08':'80','09':'90','001':'100'}),
434-
3002 : ('color', TEAM_COLOR_CODES),
435-
3004 : ('difficulty', DIFFICULTY_CODES),
436-
3008 : ('nonplayer_mode', {'sbO':'Observer','feR':'Ref'}), #Obs/Ref
437-
438-
#Team properties
439-
2012 : ('team_t3', {'1T':'T1', '2T':'T2', '3T':'T3'}),
440-
441-
442-
}
443419

444420
#: Game speed
445421
game_speed = str()
@@ -523,8 +499,10 @@ def __init__(self, summary_file, filename=None, **options):
523499

524500
player = PlayerSummary(player_struct[0][0])
525501
player.race = RACE_CODES[''.join(reversed(player_struct[2]))]
526-
# I haven't found how to get the teams yet
527-
player.teamid = 0
502+
503+
# TODO: Grab team id from lobby_player_properties
504+
player.teamid = 0
505+
528506
player.is_winner = (player_struct[1][0] == 0)
529507
if player.is_winner:
530508
self.winners.append(player.pid)
@@ -585,9 +563,7 @@ def __init__(self, summary_file, filename=None, **options):
585563
parsed_hash = utils.parse_hash(hash)
586564
self.image_urls.append(self.base_url_template.format(parsed_hash['server'], parsed_hash['hash'], parsed_hash['type']))
587565

588-
589-
# Parse build orders
590-
566+
# Parse build orders
591567
bo_structs = [x[0] for x in self.parts[5:]]
592568
bo_structs.append(self.parts[4][0][3:])
593569

0 commit comments

Comments
 (0)