From 1f9c00202e5e42ad4296aab49682e4fb07c66c2f Mon Sep 17 00:00:00 2001 From: Not Date: Sat, 3 Sep 2022 00:12:57 +0200 Subject: [PATCH] group hell maps together --- browser.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/browser.lua b/browser.lua index 85a3025..937b69e 100644 --- a/browser.lua +++ b/browser.lua @@ -358,12 +358,22 @@ rawset(_G, "InitBrowser", initBrowser) -- initialize maps with racemaps only local function loadMaps() maps = {} + local hell = {} for i = 0, #mapheaderinfo do local map = mapheaderinfo[i] if map and map.typeoflevel & TOL_RACE then - table.insert(maps, i) + if map.menuflags & LF2_HIDEINMENU then + table.insert(hell, i) + else + table.insert(maps, i) + end end end + + -- append hell maps + for _, map in ipairs(hell) do + table.insert(maps, map) + end end addHook("MapLoad", loadMaps)