lb_known_maps print current map by default

This commit is contained in:
Not 2022-11-19 01:49:32 +01:00
parent 57120e257a
commit 172b9d3633
1 changed files with 8 additions and 11 deletions

View File

@ -353,16 +353,13 @@ COM_AddCommand("lb_write_checksums", function(player)
end, COM_ADMIN)
COM_AddCommand("lb_known_maps", function(player, map)
if not map then
CONS_Printf(player, "Usage: <map>")
CONS_Printf(player, "Print all known checksums under <map>")
return
end
local mapnum = mapnumFromExtended(map)
if not mapnum then
CONS_Printf(player, string.format("invalid map '%s'", map))
return
local mapnum = gamemap
if map then
mapnum = mapnumFromExtended(map)
if not mapnum then
CONS_Printf(player, string.format("invalid map '%s'", map))
return
end
end
local known = {}
@ -380,7 +377,7 @@ COM_AddCommand("lb_known_maps", function(player, map)
CONS_Printf(player, "Map Chck Records")
for checksum, count in pairs(known) do
CONS_Printf(player, string.format("%s %s %d", map, checksum, count))
CONS_Printf(player, string.format("%s %s %d", G_BuildMapName(mapnum), checksum, count))
end
end)