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:
Joonas Rikkonen
2017-08-30 18:09:48 +03:00
parent dc3b9baa0d
commit 96a64d45dc
26 changed files with 386 additions and 434 deletions
@@ -5,7 +5,6 @@ using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace Barotrauma
{
@@ -75,20 +74,10 @@ namespace Barotrauma
get { return selectedList.Contains(this); }
}
protected bool ResizeHorizontal
{
get { return prefab != null && prefab.ResizeHorizontal; }
}
protected bool ResizeVertical
{
get { return prefab != null && prefab.ResizeVertical; }
}
public virtual void Draw(SpriteBatch spriteBatch, bool editing, bool back = true) { }
public virtual void DrawDamage(SpriteBatch spriteBatch, Effect damageEffect) { }
/// <summary>
/// Update the selection logic in submarine editor
/// </summary>
@@ -635,13 +624,5 @@ namespace Barotrauma
return foundEntities;
}
public virtual XElement Save(XElement parentElement)
{
DebugConsole.ThrowError("Saving entity " + GetType() + " failed.");
return null;
}
}
}