Misc tests (map-related).
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@5911 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
692822ec21
commit
9f076e40c8
|
@ -59,6 +59,16 @@ def do_maps():
|
||||||
for map in maps:
|
for map in maps:
|
||||||
whoami.Say('%s -> %d players'%(map.Name,map.Players))
|
whoami.Say('%s -> %d players'%(map.Name,map.Players))
|
||||||
#activator=Crossfire.WhoIsActivator()
|
#activator=Crossfire.WhoIsActivator()
|
||||||
|
whoami.Say('this map is %s, size %d, %d'%(whoami.Map.Name, whoami.Map.Width, whoami.Map.Height))
|
||||||
|
if (len(topic) > 1):
|
||||||
|
flag = 0
|
||||||
|
if len(topic) > 2:
|
||||||
|
flag = int(topic[2]);
|
||||||
|
ready = Crossfire.ReadyMap(topic[1], flag)
|
||||||
|
if (ready):
|
||||||
|
whoami.Say('ok, loaded %d map %s'%(flag,ready.Name))
|
||||||
|
else:
|
||||||
|
whoami.Say('can\'t load %d map %s'%(flag,topic[1]))
|
||||||
|
|
||||||
def do_party():
|
def do_party():
|
||||||
parties = Crossfire.GetParties()
|
parties = Crossfire.GetParties()
|
||||||
|
@ -175,6 +185,13 @@ def do_misc():
|
||||||
else:
|
else:
|
||||||
whoami.Say("Empty inv??")
|
whoami.Say("Empty inv??")
|
||||||
|
|
||||||
|
if len(topic) > 1:
|
||||||
|
map = Crossfire.MapHasBeenLoaded(topic[1])
|
||||||
|
if map:
|
||||||
|
whoami.Say('map %s is loaded, size = %d, %d'%(map.Name, map.Width, map.Height))
|
||||||
|
else:
|
||||||
|
whoami.Say('map %s is not loaded'%topic[1])
|
||||||
|
|
||||||
def do_inventory():
|
def do_inventory():
|
||||||
whoami.Say('You have:');
|
whoami.Say('You have:');
|
||||||
inv = who.Inventory
|
inv = who.Inventory
|
||||||
|
@ -285,6 +302,8 @@ def do_directory():
|
||||||
whoami.Say('local = %s'%Crossfire.LocalDirectory());
|
whoami.Say('local = %s'%Crossfire.LocalDirectory());
|
||||||
whoami.Say('player = %s'%Crossfire.PlayerDirectory());
|
whoami.Say('player = %s'%Crossfire.PlayerDirectory());
|
||||||
whoami.Say('data = %s'%Crossfire.DataDirectory());
|
whoami.Say('data = %s'%Crossfire.DataDirectory());
|
||||||
|
whoami.Say('scriptname = %s'%Crossfire.ScriptName());
|
||||||
|
|
||||||
|
|
||||||
topic = Crossfire.WhatIsMessage().split()
|
topic = Crossfire.WhatIsMessage().split()
|
||||||
#whoami.Say('topic = %s'%topic)
|
#whoami.Say('topic = %s'%topic)
|
||||||
|
|
Loading…
Reference in New Issue