From 7354e3fab2579ba66fe0f955bdb687f018fdde58 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Sat, 4 Jun 2022 13:39:30 -0300 Subject: [PATCH] when installing cl lua via workshop, create LuaDedicatedServer.bat --- Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs b/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs index b234495b0..c7495e4a2 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs @@ -1265,6 +1265,7 @@ namespace Barotrauma GameMain.LuaCs.Initialize(); })); +#if WINDOWS commands.Add(new Command("install_cl_lua", "Installs Client-Side Lua into your client.", (string[] args) => { ContentPackage luaPackage = LuaCsSetup.GetPackage("Lua For Barotrauma"); @@ -1302,7 +1303,7 @@ namespace Barotrauma File.Move("System.Reflection.Metadata.dll", "System.Reflection.Metadata.dll.old", true); File.Move("System.Collections.Immutable.dll", "System.Collections.Immutable.dll.old", true); File.Move("System.Runtime.CompilerServices.Unsafe.dll", "System.Runtime.CompilerServices.Unsafe.dll.old", true); - + foreach (string file in filesToCopy) { if (File.Exists(file)) @@ -1313,6 +1314,7 @@ namespace Barotrauma } File.WriteAllText(LuaCsSetup.VersionFile, luaPackage.ModVersion); + File.WriteAllText("LuaDedicatedServer.bat", "\"%LocalAppData%/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2559634234/Binary/DedicatedServer.exe\""); } catch (UnauthorizedAccessException e) { @@ -1330,6 +1332,8 @@ namespace Barotrauma GameMain.Server.SendChatMessage("Client-Side Lua installed, restart your game to apply changes.", ChatMessageType.ServerMessageBox); })); +#endif + commands.Add(new Command("randomizeseed", "randomizeseed: Toggles level seed randomization on/off.", (string[] args) => { GameMain.Server.ServerSettings.RandomizeSeed = !GameMain.Server.ServerSettings.RandomizeSeed;