Mercurial > fujo
changeset 80:b94735a56562
save which spells are identified
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sat, 04 Jan 2014 14:59:24 +0100 |
| parents | 7ce3f829e402 |
| children | 56b1eb2a3b07 |
| files | fujo/level.py |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/fujo/level.py Sat Jan 04 14:55:18 2014 +0100 +++ b/fujo/level.py Sat Jan 04 14:59:24 2014 +0100 @@ -196,6 +196,7 @@ 'empty': self.empty, 'mobs': [mob.save() for mob in self.mobs.values()], 'things': [thing.save() for thing in self.things.values()], + 'identified': [s.__name__ for s in items.SPELLS if s.identified] }) return data @@ -220,7 +221,8 @@ break things_list = [things.Thing.create(thing) for thing in data['things']] self.things = dict((thing.pos, thing) for thing in things_list) - + for spell in items.SPELLS: + spell.identified = spell.__name__ in data['identified'] @Level.register class BasicLevel(Level):
