forked from Not/srb2k-leaderboard
display more map info on findmap
This commit is contained in:
parent
f3ec32384a
commit
ec982d10c3
@ -371,19 +371,36 @@ local function findMap(player, ...)
|
||||
return
|
||||
end
|
||||
|
||||
local hell = "\x85HELL"
|
||||
local tol = {
|
||||
[TOL_SP] = "\x81Nuked\x80", -- Single player
|
||||
[TOL_RACE] = "\x88Race\x80",
|
||||
[TOL_MATCH] = "\x87\Battle\x80"
|
||||
}
|
||||
local lvltype, map
|
||||
|
||||
for i = 1, #mapheaderinfo do
|
||||
local map = mapheaderinfo[i]
|
||||
map = mapheaderinfo[i]
|
||||
if map == nil then
|
||||
continue
|
||||
end
|
||||
|
||||
if map.lvlttl:lower():find(search:lower()) then
|
||||
-- Only care for up to TOL_MATCH (0x10)
|
||||
lvltype = tol[map.typeoflevel & 0x1F] or map.typeoflevel
|
||||
|
||||
-- If not battle print numlaps
|
||||
lvltype = (map.typeoflevel & TOL_MATCH and lvltype) or string.format("%-7s \x82%-2d\x80", lvltype, map.numlaps)
|
||||
|
||||
CONS_Printf(
|
||||
player,
|
||||
string.format(
|
||||
"%s - %s",
|
||||
"%s %-10s %-25s - %s\t%s",
|
||||
G_BuildMapName(i),
|
||||
map.lvlttl
|
||||
lvltype,
|
||||
map.lvlttl,
|
||||
map.subttl,
|
||||
(map.menuflags & LF2_HIDEINMENU and hell) or ""
|
||||
)
|
||||
)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user