Skip to content

Commit d99f7ae

Browse files
committed
added events for player
1 parent 50093ff commit d99f7ae

File tree

8 files changed

+45
-2
lines changed

8 files changed

+45
-2
lines changed

mpyq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 0f6c6b7848ac3dd92147d8036dceec534a27b64b

mpyq.egg-info/PKG-INFO

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Metadata-Version: 1.0
2+
Name: mpyq
3+
Version: 0.1.4
4+
Summary: A Python library for extracting MPQ (MoPaQ) files.
5+
Home-page: http://github.com/arkx/mpyq/
6+
Author: Aku Kotkavuo
7+
Author-email: [email protected]
8+
License: UNKNOWN
9+
Description: UNKNOWN
10+
Platform: UNKNOWN
11+
Classifier: Development Status :: 3 - Alpha
12+
Classifier: Environment :: Console
13+
Classifier: Intended Audience :: End Users/Desktop
14+
Classifier: Intended Audience :: Developers
15+
Classifier: License :: OSI Approved :: BSD License
16+
Classifier: Operating System :: MacOS :: MacOS X
17+
Classifier: Operating System :: Microsoft :: Windows
18+
Classifier: Operating System :: POSIX
19+
Classifier: Programming Language :: Python :: 2.7
20+
Classifier: Topic :: Games/Entertainment :: Real Time Strategy
21+
Classifier: Topic :: Software Development :: Libraries
22+
Classifier: Topic :: System :: Archiving

mpyq.egg-info/SOURCES.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
LICENSE
2+
MANIFEST.in
3+
README.md
4+
mpyq.py
5+
setup.py
6+
mpyq.egg-info/PKG-INFO
7+
mpyq.egg-info/SOURCES.txt
8+
mpyq.egg-info/dependency_links.txt
9+
mpyq.egg-info/entry_points.txt
10+
mpyq.egg-info/top_level.txt
11+
test/test_mpqarchive.py

mpyq.egg-info/dependency_links.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

mpyq.egg-info/entry_points.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[console_scripts]
2+
mpyq = mpyq:main
3+

mpyq.egg-info/top_level.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mpyq

sc2reader/objects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ def __init__(self, pid, data, realm="us"):
163163
self.handicap = data[6]
164164
self.team = None # A number to be supplied later
165165
self.type = "" # Human or Computer
166+
self.events = list()
166167

167168
def __str__(self):
168169
return "Player %s - %s (%s)" % (self.pid, self.name, self.actual_race)

test_replays/test_all.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# encoding: UTF-8
2+
13
# Run tests with "py.test" in the project root dir
2-
#encoding:UTF-8
34
import os, sys
45
import pytest
56

@@ -119,7 +120,9 @@ def test_ffa():
119120
# Player 'Boom' won because the last building of the last player was destroyed,
120121
# but the winner cannot be parsed because "Player has left" event isn't generated.
121122
# Unknown result is the best we can do.
122-
assert replay.winner_known == False
123+
print replay.length
124+
print replay.events[-2]
125+
assert replay.winner_known == True
123126

124127
def test_unknown_winner():
125128
replay = Replay("test_replays/build17811/10.sc2replay")

0 commit comments

Comments
 (0)