From e6b72931d4ea5fc6172729f2b53141eb96aa1fff Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Tue, 26 Dec 2006 22:49:08 +0000 Subject: [PATCH] Misc tests. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@5212 282e977c-c81d-0410-88c4-b93c2d0d6712 --- test/python.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/python.py b/test/python.py index 84218e814..2e25634c4 100644 --- a/test/python.py +++ b/test/python.py @@ -115,7 +115,8 @@ def do_resist(): def do_basics(): whoami.Say('Basic test') who = Crossfire.WhoIsActivator() - whoami.Say('type = %d'%who.Type) + whoami.Say(' your type is %d'%who.Type) + whoami.Say(' your level is %d'%who.Level) def do_time(): cftime = Crossfire.GetTime() @@ -152,6 +153,14 @@ def do_misc(): else: whoami.Say("Empty inv??") +def do_inventory(): + whoami.Say('You have:'); + who = Crossfire.WhoIsActivator() + inv = who.Inventory + while inv: + whoami.Say('%s (type = %d, subtype = %d)'%(inv.Name, inv.Type, inv.Subtype)) + inv = inv.Below + def do_exp(): who = Crossfire.WhoIsActivator() if ( len(topic) < 2 ): @@ -232,5 +241,7 @@ elif topic[0] == 'const': do_const() elif topic[0] == 'move': do_move() +elif topic[0] == 'inv': + do_inventory() else: do_help()