Browse Source

revert: remove fix for Colony survival - not needed after ver 0.8.1

pull/3075/head
H3o66 5 years ago
parent
commit
c4cd47baaa
  1. 5
      lgsm/functions/core_functions.sh
  2. 6
      lgsm/functions/fix.sh
  3. 35
      lgsm/functions/fix_col.sh

5
lgsm/functions/core_functions.sh

@ -330,11 +330,6 @@ functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_col.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_csgo.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function

6
lgsm/functions/fix.sh

@ -42,8 +42,6 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then
fix_ark.sh
elif [ "${shortname}" == "bo" ]; then
fix_bo.sh
elif [ "${shortname}" == "col" ]; then
fix_col.sh
elif [ "${shortname}" == "csgo" ]; then
fix_csgo.sh
elif [ "${shortname}" == "cmw" ]; then
@ -93,7 +91,7 @@ fi
# Fixes that are run on install only.
if [ "${commandname}" == "INSTALL" ]; then
if [ "${shortname}" == "av" ]||[ "${shortname}" == "col" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
echo -e ""
echo -e "Applying Post-Install Fixes"
echo -e "================================="
@ -101,8 +99,6 @@ if [ "${commandname}" == "INSTALL" ]; then
postinstall=1
if [ "${shortname}" == "av" ]; then
fix_av.sh
elif [ "${shortname}" == "col" ]; then
fix_col.sh
elif [ "${shortname}" == "kf" ]; then
fix_kf.sh
elif [ "${shortname}" == "kf2" ]; then

35
lgsm/functions/fix_col.sh

@ -1,35 +0,0 @@
#!/bin/bash
# LinuxGSM fix_col.sh function
# Author: Christian Birk
# Website: https://linuxgsm.com
# Description: Resolves issue that a random seed is generated before the first start of the server
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${servercfgfullpath}" ]; then
if [ "${postinstall}" == "1" ]; then
# check if seed is set "RNDSEED"
currentseed=$(jq -r '.NewOptions.Seed' "${servercfgfullpath}" )
defaultseed="RNDSEED"
# check if seed is set
if [ "${currentseed}" == "${defaultseed}" ]; then
fixname="set inital random seed for server"
fn_fix_msg_start
fn_script_log_info "set initial random seed for server"
random=$(shuf -i 1-1000000 -n 1)
sed -i "s/\"${defaultseed}\"/${random}/g" "${servercfgfullpath}"
fn_fix_msg_end
fi
fi
worldname=$(jq -r '.NewOptions.WorldName' "${servercfgfullpath}" )
# this is executed only on the second start of the gameserver to change from generating to load the map
if [ "${worldname}" != "null" ]; then
if [ -d "${systemdir}/gamedata/savegames/${worldname}" ]; then
fn_print_information_nl "changing json to load world, if it already exists"
sed -i 's/"NewOptions"/"LoadOptions"/' "${servercfgfullpath}"
fi
fi
fi
Loading…
Cancel
Save