Ver Fonte

feat(newserver): Zombie Master: Reborn (#2465)

Co-authored-by: Frisa <digimoncn@gmail.com>
Frisasky há 6 anos atrás
pai
commit
a917b553ab

+ 141 - 0
lgsm/config-default/config-lgsm/zmrserver/_default.cfg

@@ -0,0 +1,141 @@
+##################################
+######## Default Settings ########
+##################################
+# DO NOT EDIT WILL BE OVERWRITTEN!
+# Copy settings from here and use them in either
+# common.cfg - applies settings to every instance
+# [instance].cfg - applies settings to a specific instance
+
+#### Server Settings ####
+
+## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
+ip="0.0.0.0"
+port="27015"
+clientport="27005"
+sourcetvport="27020"
+defaultmap="zm_docksofthedead"
+maxplayers="16"
+
+## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+fn_parms(){
+parms="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+}
+
+#### LinuxGSM Settings ####
+
+## Notification Alerts
+# (on|off)
+
+# Display IP | https://docs.linuxgsm.com/alerts#display-ip
+displayip=""
+
+# More info | https://docs.linuxgsm.com/alerts#more-info
+postalert="off"
+postdays="7"
+posttarget="https://hastebin.com"
+
+# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
+discordalert="off"
+discordwebhook="webhook"
+
+# Email Alerts | https://docs.linuxgsm.com/alerts/email
+emailalert="off"
+email="email@example.com"
+emailfrom=""
+
+# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
+iftttalert="off"
+ifttttoken="accesstoken"
+iftttevent="linuxgsm_alert"
+
+# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
+mailgunalert="off"
+mailguntoken="accesstoken"
+mailgundomain="example.com"
+mailgunemailfrom="alert@example.com"
+mailgunemail="email@myemail.com"
+
+# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
+pushoveralert="off"
+pushovertoken="accesstoken"
+
+# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
+# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
+# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
+# any custom string in curl - simple ignore this parameter.
+telegramalert="off"
+telegramtoken="accesstoken"
+telegramchatid=""
+curlcustomstring=""
+
+## Updating | https://docs.linuxgsm.com/commands/update
+updateonstart="off"
+
+## Backup | https://docs.linuxgsm.com/commands/backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://docs.linuxgsm.com/features/logging
+consolelogging="on"
+logdays="7"
+
+## Monitor | https://docs.linuxgsm.com/commands/monitor
+# Query delay time
+querydelay="1"
+
+#### LinuxGSM Advanced Settings ####
+
+# ANSI Colors
+ansi="on"
+
+# Message Display Time
+sleeptime="0.5"
+
+## SteamCMD Settings
+# Server appid
+appid="244310" # Source 2013 SDK
+# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
+branch=""
+# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
+steammaster="true"
+
+## LinuxGSM Server Details
+# Do not edit
+gamename="Zombie Master: Reborn"
+engine="source"
+glibc="2.15"
+
+#### Directories ####
+# Edit with care
+
+## Server Specific Directories
+systemdir="${serverfiles}/zombie_master_reborn"
+executabledir="${serverfiles}"
+executable="./srcds_run"
+servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
+servercfgdir="${systemdir}/cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${rootdir}/backups"
+
+## Logging Directories
+logdir="${rootdir}/log"
+gamelogdir="${systemdir}/logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+lgsmlog="${lgsmlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+alertlog="${lgsmlogdir}/${servicename}-alert.log"
+postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"
+
+## Logs Naming
+lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

+ 1 - 0
lgsm/data/serverlist.csv

@@ -93,4 +93,5 @@ vs,vsserver,Vampire Slayer
 wet,wetserver,Wolfenstein: Enemy Territory
 wurm,wurmserver,Wurm Unlimited
 etl,etlserver,ET: Legacy
+zmr,zmrserver,Zombie Master: Reborn
 zps,zpsserver,Zombie Panic! Source

+ 5 - 0
lgsm/functions/core_functions.sh

@@ -421,6 +421,11 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
+fix_zmr.sh(){
+functionfile="${FUNCNAME}"
+fn_fetch_function
+}
+
 # Info
 
 info_config.sh(){

+ 2 - 0
lgsm/functions/fix.sh

@@ -73,6 +73,8 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th
 		fix_unt.sh
 	elif [ "${shortname}" == "wurm" ]; then
 		fix_wurm.sh
+	elif [ "${shortname}" == "zmr" ]; then
+		fix_zmr.sh
 	fi
 fi
 

+ 49 - 0
lgsm/functions/fix_zmr.sh

@@ -0,0 +1,49 @@
+#!/bin/bash
+# LinuxGSM fix_sfc.sh function
+# Author: Daniel Gibbs
+# Website: https://linuxgsm.com
+# Description: Resolves various issues with Zombie Master: Reborn.
+
+local commandname="FIX"
+local commandaction="Fix"
+local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+if [ ! -f "${serverfiles}/bin/datacache.so" ]; then
+	ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/dedicated.so" ]; then
+	ln -s "${serverfiles}/bin/dedicated_srv.so" "${serverfiles}/bin/dedicated.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/engine.so" ]; then
+	ln -s "${serverfiles}/bin/engine_srv.so" "${serverfiles}/bin/engine.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then
+	ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/replay.so" ]; then
+	ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then
+	ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then
+	ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then
+	ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then
+	ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so"
+fi
+
+if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then
+	ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so"
+fi

+ 6 - 0
lgsm/functions/install_config.sh

@@ -669,6 +669,12 @@ elif [ "${gamename}" == "Wurm Unlimited" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
+elif [ "${gamename}" == "Zombie Master: Reborn" ]; then
+	gamedirname="ZombieMasterReborn"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Zombie Panic! Source" ]; then
 	gamedirname="ZombiePanicSource"
 	array_configs+=( server.cfg )

+ 3 - 1
lgsm/functions/install_server_files.sh

@@ -57,6 +57,8 @@ fn_install_server_files(){
 		remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7"
 	elif [ "${shortname}" == "samp" ]; then
 		remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4"
+	elif [ "${shortname}" == "zmr" ]; then
+		remote_fileurl="https://files.linuxgsm.com/ZombieMasterReborn/zombie_master_reborn_b4_fix5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b4_fix5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="73472bd84dfa6d203f3b5f48f760773e"
 	fi
 	fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
 	fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}"
@@ -155,7 +157,7 @@ elif [ "${shortname}" == "mta" ]; then
 elif [ "${shortname}" == "fctr" ]; then
 	update_factorio.sh
 	install_factorio_save.sh
-elif [ -z "${appid}" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]; then
+elif [ -z "${appid}" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then
 	if [ "${shortname}" == "ut" ]; then
 		install_eula.sh
 	fi