Modified:
trunk/trunk/gbfileio.py
Log:
Updated gbfileio to a new file version number - you can now open old .gb
files
Modified: trunk/trunk/gbfileio.py
==============================================================================
--- trunk/trunk/gbfileio.py (original)
+++ trunk/trunk/gbfileio.py Sat Feb 21 09:55:21 2009
@@ -1,4 +1,10 @@
-VERSION_NUMBER = 0
+VERSION_NUMBER = 1
+"""
+Versions:
+ version 0: origional
+ version 1: gamebaker 0.3.0 onwards
+ * Added "sounds" property to games
+"""
def get_type_string(typ):
if typ == "game":
@@ -66,6 +72,11 @@
elif method == "pickle":
game = unpickle(s)
+ if typ == "game":
+ if version < 1:
+ # have to add "sounds" property
+ if game.__dict__.get("sounds") is None:
+ game.sounds = {}
return game