Browse Source

feat (game server): StickyBots Server

pull/2096/head
Daniel Gibbs 6 years ago
parent
commit
5950a2b1f8
  1. 7
      lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
  2. 5
      lgsm/functions/info_messages.sh
  3. 12
      lgsm/functions/query_gamedig.sh

7
lgsm/config-default/config-lgsm/sbotsserver/_default.cfg

@ -9,13 +9,16 @@
#### Server Settings ####
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
port="7777"
queryport="27015"
defaultmap="Outpost"
servername="LinuxGSM Server"
serverpassword="NOT SET" # Can't be adjusted currently
maxplayers="8" # Can't be adjusted currently
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
fn_parms(){
parms="Port=${port}?QueryPort=${queryport}"
parms="Port=${port}?QueryPort=${queryport} -startup_map \"${defaultmap}\" -server_name \"${servername}\""
}
#### LinuxGSM Settings ####

5
lgsm/functions/info_messages.sh

@ -231,7 +231,10 @@ fn_info_message_gameserver(){
echo -e "${blue}Current Scenario:\t${default}${gdgamemode}"
fi
else
echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}"
# Current Scenario
if [ -n "${gdgamemode}" ]; then
echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}"
fi
fi
# Default Map

12
lgsm/functions/query_gamedig.sh

@ -89,37 +89,37 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
# server name
gdname=$(echo "${gamedigraw}" | jq -re '.name')
if [ "${gdname}" == "null" ]; then
gdname=
unset gdname
fi
# numplayers
gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length')
if [ "${gdplayers}" == "null" ]; then
gdplayers=
unset gdplayers
fi
# maxplayers
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length')
if [ "${gdmaxplayers}" == "null" ]; then
maxplayers=
unset maxplayers
fi
# current map
gdmap=$(echo "${gamedigraw}" | jq -re '.map')
if [ "${gdmap}" == "null" ]; then
gdmap=
unset gdmap
fi
# current gamemode
gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s')
if [ "${gdgamemode}" == "null" ]; then
gdgamemode=
unset gdgamemode
fi
# numbots
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots')
if [ "${gdbots}" == "null" ]; then
gdbots=
unset gdbots
fi
fi
fi
Loading…
Cancel
Save