diff skaapsteker/dialogue.py @ 246:8dee25fd070d

Fix some npc-test and dialogue bugs.
author Simon Cross <hodgestar@gmail.com>
date Thu, 07 Apr 2011 19:11:08 +0200
parents 8ea658969f47
children 432f6997d306
line wrap: on
line diff
--- a/skaapsteker/dialogue.py	Thu Apr 07 18:51:59 2011 +0200
+++ b/skaapsteker/dialogue.py	Thu Apr 07 19:11:08 2011 +0200
@@ -37,7 +37,7 @@
         my_locals.update(ev.items)
         state = self.states[self.state]
         next_state = state.event(my_locals)
-        if next_state.name in self.states:
+        if next_state is not None and next_state.name in self.states:
             self.states[self.state].leave(my_locals)
             self.state = next_state.name
             # TODO: update self.world to reflect new state?