Browse Source

Committing new gamedata and mod changes

pull/553/head
Jared Ballou 10 years ago
parent
commit
52fc1afcc3
  1. 4
      functions/core_functions.sh
  2. 8
      functions/game_settings.sh
  3. 2
      functions/install_lgsm.sh
  4. 39
      functions/install_mod.sh
  5. 4
      functions/menu.sh
  6. 9
      gamedata/_default
  7. 2
      gamedata/_halflife_shared
  8. 2
      gamedata/_seriousengine35
  9. 2
      gamedata/_spark
  10. 3
      gamedata/dabserver
  11. 2
      gamedata/dstserver
  12. 2
      gamedata/fofserver
  13. 2
      gamedata/insserver
  14. 2
      gamedata/nmrihserver

4
functions/core_functions.sh

@ -337,6 +337,10 @@ log_dirs.sh(){
fn_runfunction "${FUNCNAME}" fn_runfunction "${FUNCNAME}"
} }
install_mod.sh(){
fn_runfunction "${FUNCNAME}"
}
install_retry.sh(){ install_retry.sh(){
fn_runfunction "${FUNCNAME}" fn_runfunction "${FUNCNAME}"

8
functions/game_settings.sh

@ -198,3 +198,11 @@ if [ ! -f $cfg_file_common ]; then fn_create_config common; else source $cfg_fil
# Load instance specific settings # Load instance specific settings
if [ ! -f $cfg_file_instance ]; then fn_create_config instance; else source $cfg_file_instance; fi if [ ! -f $cfg_file_instance ]; then fn_create_config instance; else source $cfg_file_instance; fi
# Import mod
if [ "${game_mod}" != "" ]; then
modfile="mods/${selfname}/${game_mod}"
echo $modfile
fn_set_game_setting settings "game_mod" "${game_mod}"
fn_import_game_settings "${modfile}"
fi

2
functions/install_lgsm.sh

@ -20,7 +20,7 @@ fn_getgithubfile $gamelist
# Display installer menu # Display installer menu
fn_menu result "Linux Game Server Manager" "Select game to install" "${lgsmdir}/${gamelist}" fn_menu result "Linux Game Server Manager" "Select game to install" "${lgsmdir}/${gamelist}"
echo $result #echo $result
# If we have a selection, do the install # If we have a selection, do the install
if [ -n "${result}" ]; then if [ -n "${result}" ]; then
if [ "${BASH_SOURCE[0]}" == "" ]; then if [ "${BASH_SOURCE[0]}" == "" ]; then

39
functions/install_mod.sh

@ -0,0 +1,39 @@
#!/bin/bash
# LGSM install_mod function
# Author: Jared Ballou
# Website: http://gameservermanagers.com
# Description: Display menu of available mods, and add them to game settings
# Perform installation
fn_runfunction menu.sh
# Listing of available games
modlist="gamedata/__mod_list"
# Installation path
installpath=$(cd ~ && pwd)
# Get game list
fn_getgithubfile "${modlist}"
gamemods="$(grep "^${selfname}\/" "${lgsmdir}/${modlist}" | cut -d'/' -f2-)"
if [ "${gamemods}" == "" ]; then
echo "Sorry, there are no mods available for your current game."
exit
fi
# Display installer menu
fn_menu result "Linux Game Server Manager" "Select mod to install" "${gamemods}"
#echo $result
# If we have a selection, do the install
if [ -n "${result}" ]; then
game_mod="${result}"
fn_set_game_setting settings "game_mod" "${result}"
fn_update_config "game_mod" "${result}" "${cfg_file_instance}"
# modlink="${lgsmserverdir}/mod"
# modtarget="${gamedatadir}/mods/${selfname}/${result}"
# if [ "$(readlink -f "${modlink}")" != "${modtarget}" ]; then
# ln -nsvf "${modtarget}" "${modlink}"
# fi
fi

4
functions/menu.sh

@ -61,8 +61,8 @@ fn_menu() {
caption=$3 caption=$3
options=$4 options=$4
# If this is a list of options as a string, dump it to a file so we can process it # If this is a list of options as a string, dump it to a file so we can process it
if [ ! -e $options ]; then if [ ! -e "${options}" ]; then
echo -ne "{$options}\n" > "${cachedir}/menu.options" echo -ne "${options}\n" > "${cachedir}/menu.options"
options="${cachedir}/menu.options" options="${cachedir}/menu.options"
fi fi

9
gamedata/_default

@ -2,12 +2,10 @@
# _default # _default
# Base defaults for all games # Base defaults for all games
# Set the default settings for the script
fn_set_game_setting settings "dependency_path" "${filesdir}"
# Default settings. This group includes a lot of blanks just so that the comments are set (and the engine/game files will show blank values to remind people to set them). # Default settings. This group includes a lot of blanks just so that the comments are set (and the engine/game files will show blank values to remind people to set them).
fn_set_game_setting settings "backupdir" "\${lgsmdir}/backups" "Backup Directory" fn_set_game_setting settings "backupdir" "\${lgsmdir}/backups" "Backup Directory"
fn_set_game_setting settings "map" "--EMPTY--" "Default map to load" fn_set_game_setting settings "map" "--EMPTY--" "Default map to load"
fn_set_game_setting settings "game_mod" "--EMPTY--" "Mod to load from gamedata/mods"
fn_set_game_setting settings "email" "[email protected]" "Email address for notification" fn_set_game_setting settings "email" "[email protected]" "Email address for notification"
fn_set_game_setting settings "emaillog" "\${scriptlogdir}/\${servicename}-email.log" "Email Log" fn_set_game_setting settings "emaillog" "\${scriptlogdir}/\${servicename}-email.log" "Email Log"
fn_set_game_setting settings "emailnotification" "off" "Email notification (on|off)" fn_set_game_setting settings "emailnotification" "off" "Email notification (on|off)"
@ -43,6 +41,9 @@ fn_set_game_setting settings "servercfg" "\${servicename}\${servercfg_suffix}" "
fn_set_game_setting settings "servercfgdefault" "\${servercfgdir}/lgsm-default\${servercfg_suffix}" "Default server configuration file" fn_set_game_setting settings "servercfgdefault" "\${servercfgdir}/lgsm-default\${servercfg_suffix}" "Default server configuration file"
fn_set_game_setting settings "servercfgfullpath" "\${servercfgdir}/\${servercfg}" "Full path to server config" fn_set_game_setting settings "servercfgfullpath" "\${servercfgdir}/\${servercfg}" "Full path to server config"
# Set the default settings for the script
fn_set_game_setting settings "dependency_path" "\${filesdir}"
fn_set_game_setting settings "server_parms" "--EMPTY--" "Additional Server command-line arguments. Put the parameters that start with \"-\" first, then \"+\" parameters after" fn_set_game_setting settings "server_parms" "--EMPTY--" "Additional Server command-line arguments. Put the parameters that start with \"-\" first, then \"+\" parameters after"
# Script actions # Script actions
@ -50,6 +51,7 @@ fn_set_game_setting scriptactions "st" "start|command_start.sh|Start the server.
fn_set_game_setting scriptactions "sp" "stop|command_stop.sh|Stop the server." fn_set_game_setting scriptactions "sp" "stop|command_stop.sh|Stop the server."
fn_set_game_setting scriptactions "r" "restart|fn_restart|Restart the server." fn_set_game_setting scriptactions "r" "restart|fn_restart|Restart the server."
fn_set_game_setting scriptactions "dd" "depsdetect|command_dev_detect_deps.sh|Detect Dependencies" fn_set_game_setting scriptactions "dd" "depsdetect|command_dev_detect_deps.sh|Detect Dependencies"
fn_set_game_setting scriptactions "gd" "game-dependencies|fn_fix_game_dependencies|Make sure that the correct libraries for this game are installed"
fn_set_game_setting scriptactions "u" "update|update_check.sh|Checks and applies updates from SteamCMD." fn_set_game_setting scriptactions "u" "update|update_check.sh|Checks and applies updates from SteamCMD."
fn_set_game_setting scriptactions "uf" "update-functions|update_functions.sh|Removes all functions so latest can be downloaded." fn_set_game_setting scriptactions "uf" "update-functions|update_functions.sh|Removes all functions so latest can be downloaded."
fn_set_game_setting scriptactions "m" "monitor|command_monitor.sh|Checks that the server is running." fn_set_game_setting scriptactions "m" "monitor|command_monitor.sh|Checks that the server is running."
@ -60,6 +62,7 @@ fn_set_game_setting scriptactions "dev" "dev-debug|command_dev_debug.sh|Toggle D
fn_set_game_setting scriptactions "i" "install|command_install.sh|Install the server." fn_set_game_setting scriptactions "i" "install|command_install.sh|Install the server."
fn_set_game_setting scriptactions "ai" "auto-install|fn_autoinstall|Install the server, without prompts." fn_set_game_setting scriptactions "ai" "auto-install|fn_autoinstall|Install the server, without prompts."
fn_set_game_setting scriptactions "b" "backup|command_backup.sh|Create archive of the server." fn_set_game_setting scriptactions "b" "backup|command_backup.sh|Create archive of the server."
fn_set_game_setting scriptactions "im" "install-mod|install_mod.sh|Install mods"
# Default fn_parms just loads the parms file. Still need to figure out how to handle "simple" parms. # Default fn_parms just loads the parms file. Still need to figure out how to handle "simple" parms.
fn_parms(){ fn_parms(){

2
gamedata/_halflife_shared

@ -8,7 +8,7 @@ fn_import_game_settings _parms_plusminus
fn_import_game_settings _tickrate fn_import_game_settings _tickrate
# Dependencies # Dependencies
fn_set_game_setting settings "dependency_path" "${filesdir}/bin" fn_set_game_setting settings "dependency_path" "\${filesdir}/bin"
# Game Parameters # Game Parameters

2
gamedata/_seriousengine35

@ -6,7 +6,7 @@
fn_import_game_settings _steam fn_import_game_settings _steam
# Dependencies # Dependencies
fn_set_game_setting settings "dependency_path" "${filesdir}/Bin" fn_set_game_setting settings "dependency_path" "\${filesdir}/Bin"
fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f" fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f"
# Game settings # Game settings

2
gamedata/_spark

@ -11,7 +11,7 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser
} }
# Dependencies # Dependencies
fn_set_game_setting settings "dependency_path" "${filesdir}" fn_set_game_setting settings "dependency_path" "\${filesdir}"
fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c" fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c"
fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f" fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f"
fn_set_game_setting dependencies "libc.so.6" "7d751c7d8c061730fc5cb7317322d370 fn_set_game_setting dependencies "libc.so.6" "7d751c7d8c061730fc5cb7317322d370

3
gamedata/dabserver

@ -6,8 +6,7 @@ fn_import_game_settings _source
fn_parms(){ fn_parms(){
parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${tv_port} +map ${map} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${tv_port} +map ${map} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
} }
fn_set_game_setting settings "dependency_path" "\${filesdir}"
fn_set_game_setting settings "dependency_path" "${filesdir}"
fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c" fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c"
fn_set_game_setting settings "appid" "317800" fn_set_game_setting settings "appid" "317800"

2
gamedata/dstserver

@ -8,7 +8,7 @@ parms=""
} }
# Dependencies # Dependencies
fn_set_game_setting settings "dependency_path" "${filesdir}/bin/lib32" fn_set_game_setting settings "dependency_path" "\${filesdir}/bin/lib32"
fn_set_game_setting dependencies "libpthread.so.0" "50a2a33d3cdd82f15c3de6539db7bf60" fn_set_game_setting dependencies "libpthread.so.0" "50a2a33d3cdd82f15c3de6539db7bf60"
fn_set_game_setting dependencies "librt.so.1" "eabf0fc1f81292270343bd0796fc64ca" fn_set_game_setting dependencies "librt.so.1" "eabf0fc1f81292270343bd0796fc64ca"
fn_set_game_setting dependencies "libc.so.6" "c856f3fcac0a944a36e723b06bdbeb7e" fn_set_game_setting dependencies "libc.so.6" "c856f3fcac0a944a36e723b06bdbeb7e"

2
gamedata/fofserver

@ -6,7 +6,7 @@ fn_import_game_settings _source
fn_parms(){ fn_parms(){
parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${tv_port} +map ${map} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${tv_port} +map ${map} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
} }
fn_set_game_setting settings "dependency_path" "${filesdir}" fn_set_game_setting settings "dependency_path" "\${filesdir}"
fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c" fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c"
fn_set_game_setting settings "appid" "295230" fn_set_game_setting settings "appid" "295230"

2
gamedata/insserver

@ -23,7 +23,7 @@ fn_set_game_setting settings "gamename" "Insurgency"
fn_set_game_parm parms_plus "sv_playlist" "custom" "Server Playlist" fn_set_game_parm parms_plus "sv_playlist" "custom" "Server Playlist"
# Mapcycle # Mapcycle
fn_set_game_parm params_plus "mapcyclefile" "mapcycle_cooperative.txt" fn_set_game_parm parms_plus "mapcyclefile" "mapcycle_cooperative.txt"
# Workshop # Workshop
fn_set_game_parm parms_plus "sv_workshop_enabled" "--EMPTY--" "Comma-delimited list of workshop items to subscribe to" fn_set_game_parm parms_plus "sv_workshop_enabled" "--EMPTY--" "Comma-delimited list of workshop items to subscribe to"

2
gamedata/nmrihserver

@ -8,7 +8,7 @@ parms="-game nmrih -insecure -strictportbind -ip ${ip} -port ${port} +clientport
} }
# Dependencies # Dependencies
fn_set_game_setting settings "dependency_path" "${filesdir}" fn_set_game_setting settings "dependency_path" "\${filesdir}"
fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c" fn_set_game_setting dependencies "libm.so.6" "b6fef88fd045bfcd05fd4036f323855c"
fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f" fn_set_game_setting dependencies "libstdc++.so.6" "4f9c911de2276f988afaf47659a8367f"

Loading…
Cancel
Save