diff scripts/npc-test @ 476:1c05b6c2b971

Start of drop item support.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 21:55:45 +0200
parents fbae2da0c3c0
children b48c194c4af9
line wrap: on
line diff
--- a/scripts/npc-test	Sat Apr 09 21:53:19 2011 +0200
+++ b/scripts/npc-test	Sat Apr 09 21:55:45 2011 +0200
@@ -59,13 +59,17 @@
     print "  Loaded %s." % (npc.dsm)
 
     def test_switch_to(npc_name):
-        assert npc_name in game.world.npcs
+        assert npc_name in game.world.npcs, "Unknown NPC %r" % (npc_name,)
+
+    def test_drop_item(item_name):
+        assert item_name in game.world.items, "Unknown item %r" % (item_name,)
 
     my_locals = {
         "world": dsm.world,
         "state": dsm.states,
         "npcs": dsm.world.npcs,
         "switch_to": test_switch_to,
+        "drop_item": test_drop_item,
     }
     my_locals.update(DsmEvent().items)