Skip to content

Commit

Permalink
- Deleted maps.xml
Browse files Browse the repository at this point in the history
- Added methods to lock/unlock on map locations:

$ pytfall.maps.unlock("pytfall_ms", "general_store")
$ pytfall.maps.lock("pytfall_ms", "general_store")

Dev mode will notify if there is no such location or throw an Error if there is no such map.

Fix  #65
  • Loading branch information
XelaPy committed Aug 6, 2015
1 parent 399edf9 commit b05710e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 90 deletions.
86 changes: 0 additions & 86 deletions game/content/db/maps.xml

This file was deleted.

20 changes: 16 additions & 4 deletions game/library/classes - support.rpy
Expand Up @@ -373,7 +373,19 @@ init -9 python:

def __call__(self, map):
return getattr(self, map)


class OnScreenMapCell(_object):
pass

def unlock(self, map, loc):
for l in self(map):
if l["id"] == loc:
l["hidden"] = False
break
else:
notify("Could not find location: {} in map: {} to unlock.".format(map, loc))

def lock(self, map, loc):
for l in self(map):
if l["id"] == loc:
l["hidden"] = True
break
else:
notify("Could not find location: {} in map: {} to lock.".format(map, loc))

0 comments on commit b05710e

Please sign in to comment.