Unstable fixes

This commit is contained in:
EvilFactory
2022-12-09 18:30:36 -03:00
parent 90c3cef977
commit c739ea3952
8 changed files with 11 additions and 15 deletions
@@ -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
{
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\BarotraumaShared\LuaCsDependencies.props" />
<ItemGroup>
@@ -11,7 +11,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.19.14.0</Version>
<Version>0.20.12.0</Version>
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
@@ -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();
@@ -100,7 +100,7 @@ namespace Barotrauma.Networking
if (canUse != null)
{
return should.Value;
return canUse.Value;
}
if (recipientRadio.CanReceive(senderRadio)) { return true; }
@@ -77,11 +77,6 @@ namespace Barotrauma
Directory.SetCurrentDirectory(executableDir);
}
if (File.Exists("usecurrentdirectoryforsaves"))
{
SaveUtil.SaveFolder = Environment.CurrentDirectory;
}
Game = new GameMain(args);
Game.Run();
@@ -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
@@ -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)))