diff --git a/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs b/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs index 44b8ffc59..d89dc8940 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs @@ -93,7 +93,7 @@ namespace Barotrauma }; filesToUpdate = filesToUpdate.Concat(Directory.EnumerateFiles(luaCsPath, "*.dll", SearchOption.AllDirectories) - .Where(s => s.Contains("mscordaccore_amd64_amd64_4.")).Select(s => Path.GetFileName(s))).ToArray(); + .Where(s => s.Contains("mscordaccore_amd64_amd64")).Select(s => Path.GetFileName(s))).ToArray(); try { diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index 4eaf63bfe..bfe7236bd 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -1,4 +1,4 @@ - + @@ -11,7 +11,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.19.14.0 + 0.20.12.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs b/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs index a0c51daff..358ee911a 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs @@ -37,7 +37,7 @@ namespace Barotrauma "System.Runtime.CompilerServices.Unsafe.dll" }; filesToCopy = filesToCopy.Concat(Directory.EnumerateFiles(path, "*.dll", SearchOption.AllDirectories) - .Where(s => s.Contains("mscordaccore_amd64_amd64_4.")).Select(s => Path.GetFileName(s))).ToArray(); + .Where(s => s.Contains("mscordaccore_amd64_amd64")).Select(s => Path.GetFileName(s))).ToArray(); CreateMissingDirectory(); diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/Voip/VoipServer.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/Voip/VoipServer.cs index df0eeebac..97c7777dd 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/Voip/VoipServer.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/Voip/VoipServer.cs @@ -100,7 +100,7 @@ namespace Barotrauma.Networking if (canUse != null) { - return should.Value; + return canUse.Value; } if (recipientRadio.CanReceive(senderRadio)) { return true; } diff --git a/Barotrauma/BarotraumaServer/ServerSource/Program.cs b/Barotrauma/BarotraumaServer/ServerSource/Program.cs index b0af47a87..e132b7e01 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Program.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Program.cs @@ -77,11 +77,6 @@ namespace Barotrauma Directory.SetCurrentDirectory(executableDir); } - if (File.Exists("usecurrentdirectoryforsaves")) - { - SaveUtil.SaveFolder = Environment.CurrentDirectory; - } - Game = new GameMain(args); Game.Run(); diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs index 92a15bdbb..ea90303e1 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs @@ -14,7 +14,7 @@ namespace Barotrauma { public bool IsSingleplayer => GameMain.IsSingleplayer; public bool IsMultiplayer => GameMain.IsMultiplayer; - public string SaveFolder => SaveUtil.SaveFolder; + public string SaveFolder => string.IsNullOrEmpty(GameSettings.CurrentConfig.SavePath) ? SaveUtil.DefaultSaveFolder : GameSettings.CurrentConfig.SavePath; #if CLIENT public GameClient Client diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs index ffa2ba388..6b4ad0f10 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs @@ -28,7 +28,8 @@ namespace Barotrauma #if CLIENT string tempDownloadDir = getFullPath(ModReceiver.DownloadFolder); #endif - + if (pathStartsWith(getFullPath(string.IsNullOrEmpty(GameSettings.CurrentConfig.SavePath) ? SaveUtil.DefaultSaveFolder : GameSettings.CurrentConfig.SavePath))) + return true; if (pathStartsWith(localModsDir)) return true; @@ -63,7 +64,7 @@ namespace Barotrauma } } - if (pathStartsWith(getFullPath(SaveUtil.SaveFolder))) + if (pathStartsWith(getFullPath(string.IsNullOrEmpty(GameSettings.CurrentConfig.SavePath) ? SaveUtil.DefaultSaveFolder : GameSettings.CurrentConfig.SavePath))) return true; if (pathStartsWith(getFullPath(ContentPackage.LocalModsDir))) diff --git a/luacs-docs/lua/manual/networking.md b/luacs-docs/lua/manual/networking.md index 8e1c0c560..579bfe87b 100644 --- a/luacs-docs/lua/manual/networking.md +++ b/luacs-docs/lua/manual/networking.md @@ -25,7 +25,7 @@ local item = ... item.SpriteColor = Color(0, 0, 255, 255) local property = item.SerializableProperties[Identifier("SpriteColor")] -Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(property)) +Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(property, item)) ``` This is also possible to do with item components: @@ -36,7 +36,7 @@ local light = item.GetComponentString("LightComponent") light.LightColor = Color(0, 0, 255, 255) local property = light.SerializableProperties[Identifier("LightColor")] -Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(property)) +Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(property, light)) ``` ## Sending Custom Net Messages