test workshop maps
This commit is contained in:
parent
96ab448550
commit
2a79226d47
@ -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");
|
||||
|
@ -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") {
|
||||
|
@ -107,20 +107,7 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="map" class="form-label">Map:</label>
|
||||
<select id="map" name="map" class="form-select maps">
|
||||
<option value="cs_italy">cs_italy</option>
|
||||
<option value="cs_office">cs_office</option>
|
||||
<option value="de_ancient">de_ancient</option>
|
||||
<option value="de_anubis">de_anubis</option>
|
||||
<option value="de_basalt">de_basalt</option>
|
||||
<option value="de_dust2">de_dust2</option>
|
||||
<option value="de_edin">de_edin</option>
|
||||
<option value="de_inferno">de_inferno</option>
|
||||
<option value="de_mirage">de_mirage</option>
|
||||
<option value="de_nuke">de_nuke</option>
|
||||
<option value="de_overpass">de_overpass</option>
|
||||
<option value="de_train">de_train</option>
|
||||
<option value="de_vertigo">de_vertigo</option>
|
||||
<select id="map" name="map" class="form-select maps">
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
|
Loading…
x
Reference in New Issue
Block a user