Unstable 0.1500.2.0 (Rokvach's dog edition)

This commit is contained in:
Markus Isberg
2021-09-10 04:52:34 +09:00
parent e7b7c1a748
commit 1231170fce
126 changed files with 2424 additions and 1083 deletions
@@ -96,6 +96,9 @@ namespace Barotrauma
public OutpostModuleInfo OutpostModuleInfo { get; set; }
public bool IsOutpost => Type == SubmarineType.Outpost || Type == SubmarineType.OutpostModule;
//TODO: replace when the ruin branch is merged
public bool IsRuin => false;
public bool IsWreck => Type == SubmarineType.Wreck;
public bool IsBeacon => Type == SubmarineType.BeaconStation;
public bool IsPlayer => Type == SubmarineType.Player;
@@ -743,7 +746,10 @@ namespace Barotrauma
try
{
stream.Position = 0;
doc = XDocument.Load(stream); //ToolBox.TryLoadXml(file);
using (var reader = XMLExtensions.CreateReader(stream))
{
doc = XDocument.Load(reader);
}
stream.Close();
stream.Dispose();
}
@@ -760,9 +766,10 @@ namespace Barotrauma
try
{
ToolBox.IsProperFilenameCase(file);
doc = XDocument.Load(file, LoadOptions.SetBaseUri);
using var stream = File.Open(file, System.IO.FileMode.Open, System.IO.FileAccess.Read);
using var reader = XMLExtensions.CreateReader(stream);
doc = XDocument.Load(reader);
}
catch (Exception e)
{
exception = e;