use TOL_SP and TOL_COOP as indicators of nuked race, battle maps

This commit is contained in:
Not 2022-05-20 19:49:49 +02:00
parent 7b28cd0777
commit 13aeceeedd
1 changed files with 4 additions and 3 deletions

View File

@ -373,7 +373,8 @@ local function findMap(player, ...)
local hell = "\x85HELL"
local tol = {
[TOL_SP] = "\x81Nuked\x80", -- Single player
[TOL_SP] = "\x81Race\x80", -- Nuked race maps
[TOL_COOP] = "\x8D\Battle\x80", -- Nuked battle maps
[TOL_RACE] = "\x88Race\x80",
[TOL_MATCH] = "\x87\Battle\x80"
}
@ -390,12 +391,12 @@ local function findMap(player, ...)
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)
lvltype = (map.typeoflevel & (TOL_MATCH | TOL_COOP) and lvltype) or string.format("%s \x82%-2d\x80", lvltype, map.numlaps)
CONS_Printf(
player,
string.format(
"%s %-10s %-25s - %s\t%s",
"%s %-9s %-25s - %s\t%s",
G_BuildMapName(i),
lvltype,
map.lvlttl,