Skip to content

Commit

Permalink
add support for 70154, bump to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StoicLoofah committed Nov 17, 2018
1 parent b21d45e commit a821521
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
============

1.3.0 - November 16, 2018
-------------------------
* Added support for protocol 70154 (StarCraft 4.7.0)
* Added support for Zeratul
* Updated CircleCI build for Python 3.7
* Fixed a bug with printing TrackerEvent

1.2.0 - October 7, 2018
-----------------------
* Added support for Tychus
Expand Down
3 changes: 2 additions & 1 deletion sc2reader/data/attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@
"Swan": "Swann",
"Tych": "Tychus",
"Vora": "Vorazun",
"Zaga": "Zagara"
"Zaga": "Zagara",
"Zera": "Zeratul"
}
],
"3014": [
Expand Down
2 changes: 1 addition & 1 deletion sc2reader/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def __call__(self, data, replay):
working_set_slot_id=data.read_uint8() if replay.base_build >= 24764 and data.read_bool() else None,
rewards=[data.read_uint32() for i in range(data.read_bits(17 if replay.base_build >= 34784 else 6 if replay.base_build >= 24764 else 5))],
toon_handle=data.read_aligned_string(data.read_bits(7)) if replay.base_build >= 17266 else None,
licenses=[data.read_uint32() for i in range(data.read_bits(9))] if replay.base_build >= 19132 else [],
licenses=[data.read_uint32() for i in range(data.read_bits(13 if replay.base_build >= 70154 else 9))] if replay.base_build >= 19132 else [],
tandem_leader_user_id=data.read_bits(4) if replay.base_build >= 34784 and data.read_bool() else None,
commander=data.read_aligned_bytes(data.read_bits(9)) if replay.base_build >= 34784 else None,
commander_level=data.read_uint32() if replay.base_build >= 36442 else None,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
setuptools.setup(
license="MIT",
name="sc2reader",
version='1.2.0',
version='1.3.0',
keywords=["starcraft 2", "sc2", "replay", "parser"],
description="Utility for parsing Starcraft II replay files",
long_description=open("README.rst").read()+"\n\n"+open("CHANGELOG.rst").read(),
Expand Down
Binary file added test_replays/4.7.0.70154/1.SC2Replay
Binary file not shown.
7 changes: 7 additions & 0 deletions test_replays/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,13 @@ def test_event_print(self):
sys.stdout = sys.__stdout__
capturedOutput.close()

def test_70154(self):
for replayfilename in [
"test_replays/4.7.0.70154/1.SC2Replay",
]:
factory = sc2reader.factories.SC2Factory()
replay = factory.load_replay(replayfilename)


class TestGameEngine(unittest.TestCase):
class TestEvent(object):
Expand Down

0 comments on commit a821521

Please sign in to comment.