Moved MapEntity saving methods to the shared project (the server needs to be able to save subs in the campaign mode)
This commit is contained in:
@@ -3,10 +3,10 @@ using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
//using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -89,6 +89,15 @@ namespace Barotrauma
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected bool ResizeHorizontal
|
||||
{
|
||||
get { return prefab != null && prefab.ResizeHorizontal; }
|
||||
}
|
||||
protected bool ResizeVertical
|
||||
{
|
||||
get { return prefab != null && prefab.ResizeVertical; }
|
||||
}
|
||||
|
||||
public virtual bool SelectableInEditor
|
||||
{
|
||||
get { return true; }
|
||||
@@ -374,10 +383,14 @@ namespace Barotrauma
|
||||
linkedSub.OnMapLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public virtual void OnMapLoaded() { }
|
||||
|
||||
public virtual void OnMapLoaded() { }
|
||||
|
||||
public virtual XElement Save(XElement parentElement)
|
||||
{
|
||||
DebugConsole.ThrowError("Saving entity " + GetType() + " failed.");
|
||||
return null;
|
||||
}
|
||||
|
||||
public void RemoveLinked(MapEntity e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user