From d136b2427b53877eabedbd5e5ac840333751c18b Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Tue, 17 Apr 2007 22:03:10 +0000 Subject: [PATCH] Some more tests. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6057 282e977c-c81d-0410-88c4-b93c2d0d6712 --- test/python.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/python.py b/test/python.py index 1783b9891..b8bdb9673 100644 --- a/test/python.py +++ b/test/python.py @@ -33,6 +33,8 @@ def do_help(): whoami.Say(' - directory') whoami.Say(' - event') whoami.Say(' - light') + whoami.Say(' - attacktype') + whoami.Say(' - players') def do_arch(): archs = Crossfire.GetArchetypes() @@ -320,6 +322,19 @@ def do_light(): whoami.Map.ChangeLight(chg) whoami.Say('new light: %d'%whoami.Map.Light) +def do_attacktype(): + att = [ Crossfire.AttackType.FIRE, Crossfire.AttackType.COLD, Crossfire.AttackType.ELECTRICITY ] + whoami.Say('Your attacktype are:') + for at in att: + if ( at & Crossfire.WhoIsActivator().AttackType == at): + whoami.Say(Crossfire.AttackTypeName[ at ]) + +def do_players(): + players = Crossfire.GetPlayers() + whoami.Say('Players logged in:') + for pl in players: + whoami.Say(' - %s'%pl.Name) + topic = Crossfire.WhatIsMessage().split() #whoami.Say('topic = %s'%topic) #whoami.Say('topic[0] = %s'%topic[0]) @@ -377,5 +392,9 @@ elif topic[0] == 'event': do_event() elif topic[0] == 'light': do_light() +elif topic[0] == 'attacktype': + do_attacktype() +elif topic[0] == 'players': + do_players() else: do_help()