Skip to content

Commit a421ca0

Browse files
committed
handle 3.1.0. add test replays to prove it.
1 parent 77d405f commit a421ca0

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

sc2reader/readers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def __call__(self, data, replay):
119119
commander=data.read_aligned_bytes(data.read_bits(9)) if replay.base_build >= 34784 else None,
120120
commander_level=data.read_uint32() if replay.base_build >= 36442 else None,
121121
has_silence_penalty=data.read_bool() if replay.base_build >= 38215 else None,
122+
tandem_id=data.read_bits(4) if replay.base_build >= 39576 and data.read_bool() else None,
122123
) for i in range(data.read_bits(5))],
123124
random_seed=data.read_uint32(),
124125
host_user_id=data.read_bits(4) if data.read_bool() else None,

test_replays/3.1.0/1.SC2Replay

36.6 KB
Binary file not shown.

test_replays/3.1.0/2.SC2Replay

85.2 KB
Binary file not shown.

test_replays/3.1.0/3.SC2Replay

54.6 KB
Binary file not shown.

test_replays/3.1.0/4.SC2Replay

49 KB
Binary file not shown.

test_replays/test_all.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ def test_30(self):
432432
replay = sc2reader.load_replay("test_replays/3.0.0.38215/second.SC2Replay")
433433
replay = sc2reader.load_replay("test_replays/3.0.0.38215/third.SC2Replay")
434434

435+
def test_31(self):
436+
for i in range(1,5):
437+
print "DOING {}".format(i)
438+
replay = sc2reader.load_replay("test_replays/3.1.0/{}.SC2Replay".format(i))
439+
435440
def test_30_map(self):
436441
for replayfilename in [
437442
"test_replays/3.0.0.38215/third.SC2Replay",

0 commit comments

Comments
 (0)