Unstable 0.1500.2.0 (Rokvach's dog edition)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user