Hull, Gap & WayPoint cloning, equipped items are removed when switching from character mode to wiring or mode or vice versa
This commit is contained in:
@@ -114,6 +114,11 @@ namespace Barotrauma
|
|||||||
InsertToList();
|
InsertToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override MapEntity Clone()
|
||||||
|
{
|
||||||
|
return new Gap(rect, isHorizontal, Submarine);
|
||||||
|
}
|
||||||
|
|
||||||
public override void Move(Vector2 amount)
|
public override void Move(Vector2 amount)
|
||||||
{
|
{
|
||||||
base.Move(amount);
|
base.Move(amount);
|
||||||
@@ -210,7 +215,7 @@ namespace Barotrauma
|
|||||||
isHorizontal ? new Vector2(rect.Height / 16.0f, 1.0f) : new Vector2(rect.Width / 16.0f, 1.0f));
|
isHorizontal ? new Vector2(rect.Height / 16.0f, 1.0f) : new Vector2(rect.Width / 16.0f, 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSelected)
|
if (IsSelected)
|
||||||
{
|
{
|
||||||
GUI.DrawRectangle(sb,
|
GUI.DrawRectangle(sb,
|
||||||
new Vector2(WorldRect.X - 5, -WorldRect.Y - 5),
|
new Vector2(WorldRect.X - 5, -WorldRect.Y - 5),
|
||||||
|
|||||||
@@ -260,6 +260,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override MapEntity Clone()
|
||||||
|
{
|
||||||
|
return new Hull(MapEntityPrefab.list.Find(m => m.Name == "Hull"), rect, Submarine);
|
||||||
|
}
|
||||||
|
|
||||||
public static EntityGrid GenerateEntityGrid(Submarine submarine)
|
public static EntityGrid GenerateEntityGrid(Submarine submarine)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public virtual MapEntity Clone()
|
public virtual MapEntity Clone()
|
||||||
{
|
{
|
||||||
return null;
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<MapEntity> Clone(List<MapEntity> entitiesToClone)
|
public static List<MapEntity> Clone(List<MapEntity> entitiesToClone)
|
||||||
|
|||||||
@@ -113,6 +113,16 @@ namespace Barotrauma
|
|||||||
currentHull = Hull.FindHull(WorldPosition);
|
currentHull = Hull.FindHull(WorldPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override MapEntity Clone()
|
||||||
|
{
|
||||||
|
var clone = new WayPoint(rect, Submarine);
|
||||||
|
clone.idCardTags = idCardTags;
|
||||||
|
clone.spawnType = spawnType;
|
||||||
|
clone.assignedJob = assignedJob;
|
||||||
|
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
public override bool IsMouseOn(Vector2 position)
|
public override bool IsMouseOn(Vector2 position)
|
||||||
{
|
{
|
||||||
if (IsHidden()) return false;
|
if (IsHidden()) return false;
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private void CreateDummyCharacter()
|
private void CreateDummyCharacter()
|
||||||
{
|
{
|
||||||
if (dummyCharacter != null) dummyCharacter.Remove();
|
if (dummyCharacter != null) RemoveDummyCharacter();
|
||||||
|
|
||||||
dummyCharacter = Character.Create(Character.HumanConfigFile, Vector2.Zero);
|
dummyCharacter = Character.Create(Character.HumanConfigFile, Vector2.Zero);
|
||||||
|
|
||||||
@@ -588,7 +588,7 @@ namespace Barotrauma
|
|||||||
characterMode = !characterMode;
|
characterMode = !characterMode;
|
||||||
//button.Color = (characterMode) ? Color.Gold : Color.White;
|
//button.Color = (characterMode) ? Color.Gold : Color.White;
|
||||||
|
|
||||||
wiringMode = false;
|
wiringMode = false;
|
||||||
|
|
||||||
if (characterMode)
|
if (characterMode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user