changeset 471:616f08c0f096

None is the same as not changing screen (it's dry but you can commit it).
author Simon Cross <hodgestar@gmail.com>
date Sat, 07 Sep 2013 16:25:08 +0200
parents eb412bb594b4
children 93191a8b99c7
files nagslang/screens/area.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nagslang/screens/area.py	Sat Sep 07 16:23:34 2013 +0200
+++ b/nagslang/screens/area.py	Sat Sep 07 16:25:08 2013 +0200
@@ -173,7 +173,7 @@
                 self.protagonist.handle_keypress(cmd_key)
         elif DoorEvent.matches(ev):
             self.protagonist.set_position(ev.dest_pos)
-            if ev.destination != self.name:
+            if ev.destination is not None and ev.destination != self.name:
                 # Go to anther screen
                 self._disable_render = True
                 self.world.rooms += 1