home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add door keys and door locking.
[plomrogue2]
/
plomrogue
/
game.py
diff --git
a/plomrogue/game.py
b/plomrogue/game.py
index ec663b7b4b5bf362b9a4f801fd9d1c78dec421c6..d3ab1e73b08b8b19d6bcc81f3832d6a72811d963 100755
(executable)
--- a/
plomrogue/game.py
+++ b/
plomrogue/game.py
@@
-545,7
+545,7
@@
class Game(GameBase):
if hasattr(t, 'installable') and (not t.portable):
write(f, 'THING_INSTALLED %s' % t.id_)
if t.type_ == 'Door' and t.blocks_movement:
if hasattr(t, 'installable') and (not t.portable):
write(f, 'THING_INSTALLED %s' % t.id_)
if t.type_ == 'Door' and t.blocks_movement:
- write(f, 'THING_DOOR_CLOSED %s
' % t.id_
)
+ write(f, 'THING_DOOR_CLOSED %s
%s' % (t.id_, int(t.locked))
)
elif t.type_ == 'Hat':
write(f, 'THING_HAT_DESIGN %s %s' % (t.id_,
quote(t.design)))
elif t.type_ == 'Hat':
write(f, 'THING_HAT_DESIGN %s %s' % (t.id_,
quote(t.design)))
@@
-557,6
+557,8
@@
class Game(GameBase):
(t.id_, quote(item[0]), item[1]))
elif t.type_ == 'Bottle' and not t.full:
write(f, 'THING_BOTTLE_EMPTY %s' % t.id_)
(t.id_, quote(item[0]), item[1]))
elif t.type_ == 'Bottle' and not t.full:
write(f, 'THING_BOTTLE_EMPTY %s' % t.id_)
+ elif t.type_ == 'DoorKey':
+ write(f, 'THING_DOOR_KEY %s %s' % (t.id_, t.door.id_))
write(f, 'SPAWN_POINT %s %s' % (self.spawn_point[0],
self.spawn_point[1]))
write(f, 'SPAWN_POINT %s %s' % (self.spawn_point[0],
self.spawn_point[1]))