Browse Source

feat(new server): Jedi Knight: Jedi Academy

pull/3891/head
AlexCSilva 3 years ago
parent
commit
c1e508b2b6
  1. 1
      lgsm/data/serverlist.csv
  2. 31
      lgsm/functions/info_game.sh
  3. 9
      lgsm/functions/info_messages.sh
  4. 6
      lgsm/functions/install_config.sh

1
lgsm/data/serverlist.csv

@ -53,6 +53,7 @@ ios,iosserver,IOSoccer
jc2,jc2server,Just Cause 2
jc3,jc3server,Just Cause 3
jk2,jk2server,Jedi Knight II: Jedi Outcast
jk3,jk3server,Jedi Knight: Jedi Academy
kf,kfserver,Killing Floor
kf2,kf2server,Killing Floor 2
lo,loserver,Last Oasis

1 ac acserver Assetto Corsa
53 jc2 jc2server Just Cause 2
54 jc3 jc3server Just Cause 3
55 jk2 jk2server Jedi Knight II: Jedi Outcast
56 jk3 jk3server Jedi Knight: Jedi Academy
57 kf kfserver Killing Floor
58 kf2 kf2server Killing Floor 2
59 lo loserver Last Oasis

31
lgsm/functions/info_game.sh

@ -776,6 +776,35 @@ fn_info_game_jk2(){
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_game_jk2(){
# Config
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
serverversion="${unavailable}"
else
rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
# Not set
rconpassword=${rconpassword:-"NOT SET"}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
serverversion=${serverversion:-"NOT SET"}
fi
# Parameters
port=${port:-"0"}
queryport=${port}
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_game_kf(){
# Config
if [ ! -f "${servercfgfullpath}" ]; then
@ -2361,6 +2390,8 @@ elif [ "${shortname}" == "jc3" ]; then
fn_info_game_jc3
elif [ "${shortname}" == "jk2" ]; then
fn_info_game_jk2
elif [ "${shortname}" == "jk3" ]; then
fn_info_game_jk3
elif [ "${shortname}" == "kf" ]; then
fn_info_game_kf
elif [ "${shortname}" == "kf2" ]; then

9
lgsm/functions/info_messages.sh

@ -1062,6 +1062,13 @@ fn_info_message_jk2(){
} | column -s $'\t' -t
}
fn_info_message_jk3(){
{
fn_port "header"
fn_port "Game" port udp
} | column -s $'\t' -t
}
fn_info_message_kf(){
{
fn_port "header"
@ -1706,6 +1713,8 @@ fn_info_message_select_engine(){
fn_info_message_jc3
elif [ "${shortname}" == "jk2" ]; then
fn_info_message_jk2
elif [ "${shortname}" == "jk3" ]; then
fn_info_message_jk3
elif [ "${shortname}" == "kf" ]; then
fn_info_message_kf
elif [ "${shortname}" == "kf2" ]; then

6
lgsm/functions/install_config.sh

@ -672,6 +672,12 @@ elif [ "${shortname}" == "jk2" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${shortname}" == "jk3" ]; then
gamedirname="JediKnightJediAcademy"
array_configs+=( server.cfg )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
elif [ "${shortname}" == "qw" ]; then
gamedirname="QuakeWorld"
array_configs+=( server.cfg )

Loading…
Cancel
Save