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
This commit is contained in:
Daniel Gibbs 2024-01-19 18:44:34 +00:00 committed by GitHub
parent e2bdefdf9a
commit 2fff61f41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 37 deletions

6
.github/labeler.yml vendored
View File

@ -74,6 +74,8 @@
- "/(Barotrauma)/i"
"game: Counter-Strike: Global Offensive":
- "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i"
"game: Counter-Strike 2":
- "/(Counter-Strike 2|CS2)/i"
"game: Counter-Strike: Source":
- "/(Counter-Strike: Source|CS:S)/i"
"game: Counter-Strike 1.6":
@ -95,13 +97,13 @@
"game: Left 4 Dead 2":
- "/(Left 4 Dead 2|L4D2)/i"
"game: Minecraft":
- "/(minecraft)((?!bedrock).)*$/i"
- "/(Minecraft)((?!bedrock).)*$/i"
"game: Minecraft Bedrock":
- "/(Bedrock)/i"
"game: Mumble":
- "/(Mumble)/i"
"game: Project Zomboid":
- "/(Project Zomboid)/i"
- "/(Project Zomboid|PZ)/i"
"game: Quake 3":
- "/(Quake 3|Q3A|q3)/i"
"game: Rising World":

View File

@ -10,41 +10,13 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
# https://docs.linuxgsm.com/game-servers/counter-strike-2
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
# Arms Race 1 0 0 0 mg_armsrace
# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots
# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta
# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
# Deathmatch (Default) 1 2 0 0 mg_deathmatch
# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch
# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch
# Demolition 1 1 0 0 mg_demolition
# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman
# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers
# Retakes 0 0 0 12 mg_skirmish_retakes
# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap
# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline
# 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
gametype="0"
gamemode="1"
gamemodeflags="0"
skirmishid="0"
mapgroup="mg_active"
ip="0.0.0.0"
port="27015"
defaultmap="de_dust2"
maxplayers="16"
tickrate="64"
## Game Server Login Token (GSLT): Required
# GSLT is required for running a public server.
# More info: https://docs.linuxgsm.com/steamcmd/gslt
gslt=""
wsapikey=""
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
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"
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg"
#### LinuxGSM Settings ####

View File

@ -1159,14 +1159,12 @@ fn_info_game_col() {
fn_info_game_cs2() {
if [ -f "${servercfgfullpath}" ]; then
fn_info_game_valve_keyvalues "servername" "hostname"
fi
# Steamport can be between 26901-26910 and is normally automatically set.
# Some servers might support -steamport parameter to set
if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then
steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)"
fn_info_game_valve_keyvalues "defaultmap" "map"
fn_info_game_valve_keyvalues "password" "sv_password"
fi
defaultmap="${defaultmap:-"NOT SET"}"
maxplayers="${maxplayers:-"0"}"
password="${password:-"NOT SET"}"
port="${port:-"0"}"
queryport="${port:-"0"}"
servername="${servername:-"NOT SET"}"