Просмотр исходного кода

Added support for Starbound 1.0

- removed deprecated file "sbboot.config"
- added new default config
- fixed details
- new structure
Marvin Lehmann 10 лет назад
Родитель
Сommit
a60432b0c3

+ 49 - 0
Starbound/cfg/lgsm-default.config

@@ -0,0 +1,49 @@
+{
+  "allowAdminCommands" : true,
+  "allowAdminCommandsFromAnyone" : false,
+  "allowAnonymousConnections" : true,
+  "allowAssetsMismatch" : true,
+  "anonymousConnectionsAreAdmin" : false,
+  "bannedIPs" : [],
+  "bannedUuids" : [],
+  "checkAssetsDigest" : false,
+  "clearPlayerFiles" : false,
+  "clearUniverseFiles" : false,
+  "clientIPJoinable" : false,
+  "clientP2PJoinable" : true,
+  "configurationVersion" : {
+    "basic" : 1,
+    "server" : 4
+  },
+  "crafting" : {
+    "filterHaveMaterials" : false
+  },
+  "gameServerBind" : "::",
+  "gameServerPort" : 21025,
+  "interactiveHighlight" : true,
+  "inventory" : {
+    "pickupToActionBar" : true
+  },
+  "maxPlayers" : 8,
+  "maxTeamSize" : 4,
+  "playerBackupFileCount" : 3,
+  "queryServerBind" : "::",
+  "queryServerPort" : 21025,
+  "rconServerBind" : "::",
+  "rconServerPassword" : "<rconpassword>",
+  "rconServerPort" : 21026,
+  "rconServerTimeout" : 1000,
+  "runQueryServer" : false,
+  "runRconServer" : false,
+  "safeScripts" : true,
+  "scriptInstructionLimit" : 10000000,
+  "scriptInstructionMeasureInterval" : 10000,
+  "scriptProfilingEnabled" : false,
+  "scriptRecursionLimit" : 100,
+  "serverFidelity" : "automatic",
+  "serverName" : "<hostname>",
+  "serverOverrideAssetsDigest" : null,
+  "serverUsers" : {
+  },
+  "tutorialMessages" : true
+}

+ 0 - 141
Starbound/cfg/sbboot.config

@@ -1,141 +0,0 @@
-{
-  "handleFatalSignals" : true,
-  "handleInterruptSignal" : true,
-  "rootMaintenanceSleep" : 5000,
-  "logFileBackups" : 5,
-  "assetSources" : [
-    "../assets/packed.pak",
-    "../assets/user"
-  ],
-  "modSource" : "../giraffe_storage/mods/",
-  "storageDirectory" : "../giraffe_storage/",
-  "defaultConfiguration" : {
-    "gameServerPort" : 21025,
-    "gameServerBind" : "*",
-
-    "serverUsers" : {},
-    "allowAnonymousConnections" : true,
-
-    "bannedUuids" : [],
-    "bannedIPs" : [],
-
-    "serverName" : "A Starbound Server",
-    "maxPlayers" : 8,
-    "upnpPortForwarding" : true,
-
-    "checkAssetsDigest" : false,
-
-    "allowAdminCommands" : true,
-    "allowAdminCommandsFromAnyone" : false,
-    "anonymousConnectionsAreAdmin" : false,
-
-    "runQueryServer" : false,
-    "queryServerPort" : 21025,
-    "queryServerBind" : "*",
-
-    "runRconServer" : false,
-    "rconServerPort" : 21026,
-    "rconServerBind" : "*",
-    "rconServerPassword" : "",
-    "rconServerTimeout" : 1000,
-
-    "windowTitle" : "Starbound - Beta",
-    "vsync" : true,
-    "renderSleep" : true,
-    "maxFrameSkip" : 10,
-    "sampleRate" : 44100,
-    "audioChannels" : 2,
-    "audioChannelSeparation" : [-25, 25],
-
-    "clearUniverseFiles" : false,
-    "clearPlayerFiles" : false,
-    "playerBackupFileCount" : 3,
-
-    "sfxVol" : 100,
-    "musicVol" : 100,
-    "windowedResolution" : [1000, 600],
-    "maximizedResolution" : [1000, 600],
-    "fullscreenResolution" : [1920, 1080],
-    "fullscreen" : false,
-    "maximized" : true,
-    "zoomLevel" : 3.0,
-    "speechBubbles" : true,
-
-    "crafting.filterHaveMaterials" : false,
-    "title.connectionString" : "",
-
-    "bindings" : {
-      "PlayerUp" :  [ { "type" : "key", "value" : "W", "mods" : [] } ],
-      "PlayerDown" :  [ { "type" : "key", "value" : "S", "mods" : [] } ],
-      "PlayerLeft" :  [ { "type" : "key", "value" : "A", "mods" : [] } ],
-      "PlayerRight" :  [ { "type" : "key", "value" : "D", "mods" : [] } ],
-      "PlayerJump" :  [ { "type" : "key", "value" : "Space", "mods" : [] } ],
-      "PlayerDropItem" :  [ { "type" : "key", "value" : "Q", "mods" : [] } ],
-      "PlayerInteract" :  [ { "type" : "key", "value" : "E", "mods" : [] } ],
-      "PlayerShifting" :  [ { "type" : "key", "value" : "RShift", "mods" : [] },                                                                                                                           { "type" : "key", "value" : "LShift", "mods" : [] } ],
-      "PlayerTechAction1" :  [ { "type" : "key", "value" : "F", "mods" : [] } ],
-      "PlayerTechAction2" :  [ { "type" : "key", "value" : "G", "mods" : [] } ],
-      "PlayerTechAction3" :  [ { "type" : "key", "value" : "H", "mods" : [] } ],
-      "EmoteBlabbering" :  [ { "type" : "key", "value" : "Right", "mods" : ["LCt                                                                                                                          rl", "LShift"] } ],
-      "EmoteShouting" :  [ { "type" : "key", "value" : "Up", "mods" : ["LCtrl",                                                                                                                           "LAlt"] } ],
-      "EmoteHappy" :  [ { "type" : "key", "value" : "Up", "mods" : [] } ],
-      "EmoteSad" :  [ { "type" : "key", "value" : "Down", "mods" : [] } ],
-      "EmoteNeutral" :  [ { "type" : "key", "value" : "Left", "mods" : [] } ],
-      "EmoteLaugh" :  [ { "type" : "key", "value" : "Left", "mods" : [ "LCtrl" ]                                                                                                                           } ],
-      "EmoteAnnoyed" :  [ { "type" : "key", "value" : "Right", "mods" : [] } ],
-      "EmoteOh" :  [ { "type" : "key", "value" : "Right", "mods" : [ "LCtrl" ] }                                                                                                                           ],
-      "EmoteOooh" :  [ { "type" : "key", "value" : "Down", "mods" : [ "LCtrl" ]                                                                                                                           } ],
-      "EmoteBlink" :  [ { "type" : "key", "value" : "Up", "mods" : [ "LCtrl" ] }                                                                                                                           ],
-      "EmoteWink" :  [ { "type" : "key", "value" : "Up", "mods" : ["LCtrl", "LSh                                                                                                                          ift"] } ],
-      "EmoteEat" :  [ { "type" : "key", "value" : "Down", "mods" : ["LCtrl", "LS                                                                                                                          hift"] } ],
-      "EmoteSleep" :  [ { "type" : "key", "value" : "Left", "mods" : ["LCtrl", "                                                                                                                          LShift"] } ],
-      "ShowLabels" :  [ { "type" : "key", "value" : "RAlt", "mods" : [] }, { "ty                                                                                                                          pe" : "key", "value" : "LAlt", "mods" : [] } ],
-      "CameraShift" :  [ { "type" : "key", "value" : "RCtrl", "mods" : [] }, { "                                                                                                                          type" : "key", "value" : "LCtrl", "mods" : [] } ],
-      "CockpitUp" :  [ { "type" : "key", "value" : "W", "mods" : [] }, { "type"                                                                                                                           : "key", "value" : "Up", "mods" : [] } ],
-      "CockpitDown" :  [ { "type" : "key", "value" : "S", "mods" : [] }, { "type                                                                                                                          " : "key", "value" : "Down", "mods" : [] } ],
-      "CockpitLeft" :  [ { "type" : "key", "value" : "Left", "mods" : [] }, { "t                                                                                                                          ype" : "key", "value" : "A", "mods" : [] } ],
-      "CockpitRight" :  [ { "type" : "key", "value" : "Right", "mods" : [] }, {                                                                                                                           "type" : "key", "value" : "D", "mods" : [] } ],
-      "TitleBack" :  [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
-      "CinematicSkip" :  [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
-      "CinematicNext" :  [ { "type" : "key", "value" : "Right", "mods" : [] }, {                                                                                                                           "type" : "key", "value" : "Return", "mods" : [] } ],
-      "GuiClose" :  [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
-      "GuiShifting" :  [ { "type" : "key", "value" : "RShift", "mods" : [] }, {                                                                                                                           "type" : "key", "value" : "LShift", "mods" : [] } ],
-      "KeybindingCancel" :  [ { "type" : "key", "value" : "Esc", "mods" : [] } ]                                                                                                                          ,
-      "KeybindingClear" :  [ { "type" : "key", "value" : "Del", "mods" : [] }, {                                                                                                                           "type" : "key", "value" : "Backspace", "mods" : [] } ],
-      "ChatPageUp" :  [ { "type" : "key", "value" : "PageUp", "mods" : [] } ],
-      "ChatPageDown" :  [ { "type" : "key", "value" : "PageDown", "mods" : [] }                                                                                                                           ],
-      "ChatPreviousLine" :  [ { "type" : "key", "value" : "Up", "mods" : [] } ],
-      "ChatNextLine" :  [ { "type" : "key", "value" : "Down", "mods" : [] } ],
-      "ChatSendLine" :  [ { "type" : "key", "value" : "Return", "mods" : [] } ],
-      "ChatBegin" :  [ { "type" : "key", "value" : "Return", "mods" : [] } ],
-      "ChatBeginCommand" :  [ { "type" : "key", "value" : "/", "mods" : [] } ],
-      "ChatStop" :  [ { "type" : "key", "value" : "Esc", "mods" : [] } ],
-      "InterfaceShowHelp" :  [ { "type" : "key", "value" : "F1", "mods" : [] } ]                                                                                                                          ,
-      "InterfaceHideHud" :  [ { "type" : "key", "value" : "Z", "mods" : [ "LAlt"                                                                                                                           ] } ],
-      "InterfaceSwapHands" :  [ { "type" : "key", "value" : "Z", "mods" : [] } ]                                                                                                                          ,
-      "InterfaceDeselectHands" :  [ { "type" : "key", "value" : "X", "mods" : []                                                                                                                           } ],
-      "InterfaceBar1" :  [ { "type" : "key", "value" : "1", "mods" : [] } ],
-      "InterfaceBar2" :  [ { "type" : "key", "value" : "2", "mods" : [] } ],
-      "InterfaceBar3" :  [ { "type" : "key", "value" : "3", "mods" : [] } ],
-      "InterfaceBar4" :  [ { "type" : "key", "value" : "4", "mods" : [] } ],
-      "InterfaceBar5" :  [ { "type" : "key", "value" : "5", "mods" : [] } ],
-      "InterfaceBar6" :  [ { "type" : "key", "value" : "6", "mods" : [] } ],
-      "InterfaceBar7" :  [ { "type" : "key", "value" : "7", "mods" : [] } ],
-      "InterfaceBar8" :  [ { "type" : "key", "value" : "8", "mods" : [] } ],
-      "InterfaceBar9" :  [ { "type" : "key", "value" : "9", "mods" : [] } ],
-      "InterfaceBar10" :  [ { "type" : "key", "value" : "0", "mods" : [] } ],
-      "EssentialBar1" :  [ { "type" : "key", "value" : "R", "mods" : [] } ],
-      "EssentialBar2" :  [ { "type" : "key", "value" : "T", "mods" : [] } ],
-      "EssentialBar3" :  [ { "type" : "key", "value" : "Y", "mods" : [] } ],
-      "InterfaceBarNPos" :  [ { "type" : "key", "value" : "-", "mods" : [] }, {                                                                                                                           "type" : "key", "value" : "`", "mods" : [] } ],
-      "InterfaceRepeatCommand" :  [ { "type" : "key", "value" : "P", "mods" : []                                                                                                                           } ],
-      "InterfaceToggleFullscreen" :  [ { "type" : "key", "value" : "F11", "mods"                                                                                                                           : [] } ],
-      "InterfaceEscapeMenu" :  [ { "type" : "key", "value" : "Esc", "mods" : []                                                                                                                           } ],
-      "InterfaceInventory" :  [ { "type" : "key", "value" : "I", "mods" : [] } ]                                                                                                                          ,
-      "InterfaceCodex" :  [ { "type" : "key", "value" : "L", "mods" : [] } ],
-      "InterfaceQuest" :  [ { "type" : "key", "value" : "J", "mods" : [] } ],
-      "InterfaceCrafting" :  [ { "type" : "key", "value" : "C", "mods" : [] } ],
-      "InterfaceInspectCursor" :  [ { "type" : "key", "value" : "N", "mods" : []                                                                                                                           } ]
-    }
-  }
-}

+ 6 - 5
Starbound/sbserver

@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="210516"
+version="230716"
 
 
 #### Variables ####
 #### Variables ####
 
 
@@ -62,16 +62,17 @@ lgsmdir="${rootdir}/lgsm"
 functionsdir="${lgsmdir}/functions"
 functionsdir="${lgsmdir}/functions"
 filesdir="${rootdir}/serverfiles"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}"
 systemdir="${filesdir}"
-executabledir="${filesdir}/linux64"
+executabledir="${filesdir}/linux"
 executable="./starbound_server"
 executable="./starbound_server"
-servercfg="sbboot.config"
-servercfgdir="${executabledir}"
+servercfg="starbound_server.config"
+servercfgdir="${filesdir}/storage"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
+servercfgdefault="${servercfgdir}/lgsm-default.config"
 backupdir="${rootdir}/backups"
 backupdir="${rootdir}/backups"
 
 
 # Logging
 # Logging
 logdays="7"
 logdays="7"
-gamelogdir="${filesdir}/giraffe_storage"
+gamelogdir="${filesdir}/storage"
 scriptlogdir="${rootdir}/log/script"
 scriptlogdir="${rootdir}/log/script"
 consolelogdir="${rootdir}/log/console"
 consolelogdir="${rootdir}/log/console"
 consolelogging="on"
 consolelogging="on"

+ 29 - 0
lgsm/functions/info_config.sh

@@ -161,6 +161,32 @@ fn_info_config_source(){
 	fi
 	fi
 }
 }
 
 
+fn_info_config_starbound(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		rconpassword="${unavailable}"
+		port="21025"
+		queryport="21025"
+		rconport="21026"
+		slots="8"
+	else
+		servername=$(grep "serverName" "${servercfgfullpath}" | sed 's/"serverName" \: //g' | grep -oP '"\K[^"]+(?=["])')
+		rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed 's/"rconServerPassword" \: //g' | grep -oP '"\K[^"]+(?=["])')
+		port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		slots=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]')
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		rconpassword=${rconpassword:-"NOT SET"}
+		port=${port:-"21025"}
+		queryport=${queryport:-"21025"}
+		rconport=${rconport:-"21026"}
+		slots=${slots:-"8"}
+	fi
+}
+
 fn_info_config_teamspeak3(){
 fn_info_config_teamspeak3(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
 		dbplugin="${unavailable}"
 		dbplugin="${unavailable}"
@@ -289,6 +315,9 @@ elif [ "${engine}" == "seriousengine35" ]; then
 # Source Engine Games
 # Source Engine Games
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	fn_info_config_source
 	fn_info_config_source
+# Starbound
+elif [ "${engine}" == "starbound" ]; then
+	fn_info_config_starbound
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_info_config_teamspeak3
 	fn_info_config_teamspeak3
 # Teeworlds
 # Teeworlds

+ 6 - 0
lgsm/functions/install_config.sh

@@ -335,6 +335,12 @@ elif [ "${gamename}" == "Sven Co-op" ]; then
 	wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	sleep 1
 	fn_goldsourceconfig
 	fn_goldsourceconfig
+elif [ "${gamename}" == "Starbound" ]; then
+	echo -e "downloading lgsm-default.config...\c"
+	wget -N /dev/null ${githuburl}/Starbound/cfg/lgsm-default.config 2>&1 | grep -F HTTP | cut -c45- | uniq
+	sleep 1
+	fn_defaultconfig
+	fn_userinputconfig
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 	echo -e "downloading lgsm-default.ini...\c"
 	echo -e "downloading lgsm-default.ini...\c"
 	wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
 	wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq