# HG changeset patch # User Thibaut Girka # Date 1312572066 -7200 # Node ID 07fba4e1da65406d56bc97107fce626afc26791f # Parent 07a7f28c8aaa4a8577edee8df36aed6cb33e4833 Refactor diff --git a/pytouhou/formats/std.py b/pytouhou/formats/std.py --- a/pytouhou/formats/std.py +++ b/pytouhou/formats/std.py @@ -11,7 +11,8 @@ class Object(object): class Stage(object): - def __init__(self): + def __init__(self, num): + self.num = num self.name = '' self.bgms = (('', ''), ('', ''), ('', '')) self.objects = [] @@ -20,8 +21,8 @@ class Stage(object): @classmethod - def read(cls, file): - stage = Stage() + def read(cls, file, num): + stage = Stage(num) nb_objects, nb_faces = unpack('