Mercurial > skaapsteker
changeset 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 | 766d257e7e7f |
children | 8c0c132b422f |
files | scripts/npc-test skaapsteker/dialogue.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/npc-test Thu Apr 07 18:51:59 2011 +0200 +++ b/scripts/npc-test Thu Apr 07 19:11:08 2011 +0200 @@ -89,7 +89,7 @@ if len(args) != 1: p.error("Must provide an npc json file") - run(args[0], game) + run(args[0], opts.game) if __name__ == '__main__': main()
--- 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?