Tutorial fixes
This commit is contained in:
@@ -76,7 +76,10 @@ namespace Subsurface
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
get { return ConvertUnits.ToDisplayUnits(cells[0].body.Position); }
|
||||
get
|
||||
{
|
||||
return cells==null ? Vector2.Zero : ConvertUnits.ToDisplayUnits(cells[0].body.Position);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Vector2> PositionsOfInterest
|
||||
|
||||
@@ -623,11 +623,13 @@ namespace Subsurface
|
||||
loaded = this;
|
||||
}
|
||||
|
||||
public static Submarine Load(string fileName)
|
||||
public static Submarine Load(string fileName, string folder = SavePath)
|
||||
{
|
||||
Unload();
|
||||
Unload();
|
||||
|
||||
Submarine sub = new Submarine(SavePath+"/"+fileName);
|
||||
string path = string.IsNullOrWhiteSpace(folder) ? fileName : System.IO.Path.Combine(SavePath, fileName);
|
||||
|
||||
Submarine sub = new Submarine(path);
|
||||
sub.Load();
|
||||
|
||||
//Entity.dictionary.Add(int.MaxValue, sub);
|
||||
|
||||
Reference in New Issue
Block a user