Fix script when more than a few maps loaded

master
Nicolas Weeger 2022-10-09 20:29:36 +02:00
parent 60f793b38d
commit 3af37110ce
1 changed files with 4 additions and 2 deletions

View File

@ -70,9 +70,11 @@ def do_arch():
def do_maps():
whoami.Say('Current map is %s'%who.Map.Name)
maps = Crossfire.GetMaps()
whoami.Say('%d maps loaded'%len(maps))
whoami.Say('%d maps loaded:'%len(maps))
list = '\n'
for map in maps:
whoami.Say('%s [%d] -> %d players'%(map.Name, map.Unique, map.Players))
list += '%s [%d] -> %d players\n'%(map.Name, map.Unique, map.Players)
whoami.Say(list)
#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):