diff --git a/public/js/console.js b/public/js/console.js index 3a8562f..488f89b 100644 --- a/public/js/console.js +++ b/public/js/console.js @@ -243,21 +243,25 @@ $(document).ready(function () { map_list.push("de_train"); map_list.push("de_vertigo"); // WINGMAN maps + map_list.push("de_assembly"); // 3071005299 map_list.push("de_brewery"); map_list.push("de_dogtown"); - //map_list.push("de_palais"); - //map_list.push("de_whistle"); + map_list.push("de_memento"); // 3165559377 + map_list.push("de_palais"); // 3257582863 + map_list.push("de_whistle"); // 3308613773 } else if (e.value == "5") { // wingman - //map_list.push("de_assembly"); + // DE maps (valve) + map_list.push("de_inferno"); + map_list.push("de_nuke"); + map_list.push("de_overpass"); + map_list.push("de_vertigo"); + // Community maps + map_list.push("de_assembly"); // 3071005299 map_list.push("de_brewery"); map_list.push("de_dogtown"); - map_list.push("de_inferno"); - //map_list.push("de_memento"); - map_list.push("de_nuke"); - //map_list.push("de_palais"); - map_list.push("de_overpass"); - map_list.push("de_vertigo"); - //map_list.push("de_whistle"); + map_list.push("de_memento"); // 3165559377 + map_list.push("de_palais"); // 3257582863 + map_list.push("de_whistle"); // 3308613773 } else if (e.value == "6") { // arms race map_list.push("ar_baggage"); map_list.push("ar_pool_day"); diff --git a/routes/game.js b/routes/game.js index ee1881e..047d1ab 100644 --- a/routes/game.js +++ b/routes/game.js @@ -16,6 +16,23 @@ router.post('/api/setup-game', is_authenticated, async (req, res) => { const map = req.body.map; const game = req.body.game.toString(); + switch(map){ + case "de_assembly": + map = 3071005299; + break; + case "de_memento": + map = 3165559377; + break; + case "de_palais": + map = 3257582863; + break; + case "de_whistle": + map = 3308613773; + break; + default: + map = map; + } + if (team1.trim() != "") { await rcon.execute_command(server_id, `mp_teamname_1 "${team1}"`); } @@ -61,7 +78,11 @@ router.post('/api/setup-game', is_authenticated, async (req, res) => { execute_cfg_on_server(server_id, './cfg/live_arms_race.cfg'); } - await rcon.execute_command(server_id, `changelevel ${map}`); + if (isNaN(map)) { + await rcon.execute_command(server_id, `changelevel ${map}`); + } else { + await rcon.execute_command(server_id, `host_workshop_map ${map}`); + } // Adding 1 second delay in executing warmup.cfg to make it effective after map has been changed. if (game == "1" || game == "3" || game == "5") { diff --git a/views/manage.ejs b/views/manage.ejs index 27d0c5c..9820b0a 100644 --- a/views/manage.ejs +++ b/views/manage.ejs @@ -107,20 +107,7 @@