Some more tests.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6057 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2007-04-17 22:03:10 +00:00
parent 0d98319f8e
commit d136b2427b
1 changed files with 19 additions and 0 deletions

View File

@ -33,6 +33,8 @@ def do_help():
whoami.Say(' - directory') whoami.Say(' - directory')
whoami.Say(' - event') whoami.Say(' - event')
whoami.Say(' - light') whoami.Say(' - light')
whoami.Say(' - attacktype')
whoami.Say(' - players')
def do_arch(): def do_arch():
archs = Crossfire.GetArchetypes() archs = Crossfire.GetArchetypes()
@ -320,6 +322,19 @@ def do_light():
whoami.Map.ChangeLight(chg) whoami.Map.ChangeLight(chg)
whoami.Say('new light: %d'%whoami.Map.Light) 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() topic = Crossfire.WhatIsMessage().split()
#whoami.Say('topic = %s'%topic) #whoami.Say('topic = %s'%topic)
#whoami.Say('topic[0] = %s'%topic[0]) #whoami.Say('topic[0] = %s'%topic[0])
@ -377,5 +392,9 @@ elif topic[0] == 'event':
do_event() do_event()
elif topic[0] == 'light': elif topic[0] == 'light':
do_light() do_light()
elif topic[0] == 'attacktype':
do_attacktype()
elif topic[0] == 'players':
do_players()
else: else:
do_help() do_help()