Skip to content

Commit 2fff61f

Browse files
authored
feat(cs2): update parameters and add workshop support (#4405)
* feat(cs2): update config and parameter settings * remove serverlogging * add authkey for workshop * add cs2 label
1 parent e2bdefd commit 2fff61f

File tree

3 files changed

+9
-37
lines changed

3 files changed

+9
-37
lines changed

.github/labeler.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
- "/(Barotrauma)/i"
7575
"game: Counter-Strike: Global Offensive":
7676
- "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i"
77+
"game: Counter-Strike 2":
78+
- "/(Counter-Strike 2|CS2)/i"
7779
"game: Counter-Strike: Source":
7880
- "/(Counter-Strike: Source|CS:S)/i"
7981
"game: Counter-Strike 1.6":
@@ -95,13 +97,13 @@
9597
"game: Left 4 Dead 2":
9698
- "/(Left 4 Dead 2|L4D2)/i"
9799
"game: Minecraft":
98-
- "/(minecraft)((?!bedrock).)*$/i"
100+
- "/(Minecraft)((?!bedrock).)*$/i"
99101
"game: Minecraft Bedrock":
100102
- "/(Bedrock)/i"
101103
"game: Mumble":
102104
- "/(Mumble)/i"
103105
"game: Project Zomboid":
104-
- "/(Project Zomboid)/i"
106+
- "/(Project Zomboid|PZ)/i"
105107
"game: Quake 3":
106108
- "/(Quake 3|Q3A|q3)/i"
107109
"game: Rising World":

lgsm/config-default/config-lgsm/cs2server/_default.cfg

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,13 @@
1010

1111
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
1212
# https://docs.linuxgsm.com/game-servers/counter-strike-2
13-
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
14-
# Arms Race 1 0 0 0 mg_armsrace
15-
# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots
16-
# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta
17-
# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
18-
# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
19-
# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
20-
# Deathmatch (Default) 1 2 0 0 mg_deathmatch
21-
# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch
22-
# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch
23-
# Demolition 1 1 0 0 mg_demolition
24-
# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman
25-
# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers
26-
# Retakes 0 0 0 12 mg_skirmish_retakes
27-
# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap
28-
# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline
29-
# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake
30-
gametype="0"
31-
gamemode="1"
32-
gamemodeflags="0"
33-
skirmishid="0"
34-
mapgroup="mg_active"
3513
ip="0.0.0.0"
3614
port="27015"
37-
defaultmap="de_dust2"
3815
maxplayers="16"
39-
tickrate="64"
40-
41-
## Game Server Login Token (GSLT): Required
42-
# GSLT is required for running a public server.
43-
# More info: https://docs.linuxgsm.com/steamcmd/gslt
44-
gslt=""
16+
wsapikey=""
4517

4618
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
47-
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -tickrate ${tickrate} -serverlogging +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +sv_logfile 1 +exec ${selfname}.cfg"
19+
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg"
4820

4921
#### LinuxGSM Settings ####
5022

lgsm/modules/info_game.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,14 +1159,12 @@ fn_info_game_col() {
11591159
fn_info_game_cs2() {
11601160
if [ -f "${servercfgfullpath}" ]; then
11611161
fn_info_game_valve_keyvalues "servername" "hostname"
1162-
fi
1163-
# Steamport can be between 26901-26910 and is normally automatically set.
1164-
# Some servers might support -steamport parameter to set
1165-
if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then
1166-
steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)"
1162+
fn_info_game_valve_keyvalues "defaultmap" "map"
1163+
fn_info_game_valve_keyvalues "password" "sv_password"
11671164
fi
11681165
defaultmap="${defaultmap:-"NOT SET"}"
11691166
maxplayers="${maxplayers:-"0"}"
1167+
password="${password:-"NOT SET"}"
11701168
port="${port:-"0"}"
11711169
queryport="${port:-"0"}"
11721170
servername="${servername:-"NOT SET"}"

0 commit comments

Comments
 (0)