Mercurial > skaapsteker
comparison scripts/npc-test @ 195:445a28f4b38e
Fix npc tester.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Wed, 06 Apr 2011 22:04:19 +0200 |
parents | 704d23022f09 |
children | a4c4e2f34162 |
comparison
equal
deleted
inserted
replaced
194:7a4e7859bc26 | 195:445a28f4b38e |
---|---|
7 from pprint import pprint | 7 from pprint import pprint |
8 | 8 |
9 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) | 9 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) |
10 | 10 |
11 from skaapsteker.dialogue import DSM, DsmEvent, DummyWorld | 11 from skaapsteker.dialogue import DSM, DsmEvent, DummyWorld |
12 from skaapsteker.gamestate import GameState | |
12 | 13 |
13 | 14 |
14 def run(npc_file): | 15 def run(npc_file): |
15 world = DummyWorld() | 16 game = GameState("game.json") |
16 dsm = DSM(npc_file, world) | 17 name = os.path.splitext(os.path.basename(npc_file))[0] |
18 dsm = DSM(name, game.world, npc_file) | |
17 | 19 |
18 print "States:" | 20 print "States:" |
19 print "-------" | 21 print "-------" |
20 pprint(dsm.states.keys()) | 22 pprint(dsm.states.keys()) |
21 print | 23 print |