diff nagslang/screens/area.py @ 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 82db70c28722
children c302e304b0ce
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