Attachable items are always attached by default when adding them in the sub editor

This commit is contained in:
Joonas Rikkonen
2017-07-25 21:53:57 +03:00
parent 286c1ad950
commit 431e5bb9b8
@@ -100,7 +100,6 @@ namespace Barotrauma.Items.Components
prevPickKey = PickKey; prevPickKey = PickKey;
prevRequiredItems = new List<RelatedItem>(requiredItems); prevRequiredItems = new List<RelatedItem>(requiredItems);
if (item.Submarine != null) if (item.Submarine != null)
{ {
if (item.Submarine.Loading) if (item.Submarine.Loading)
@@ -110,7 +109,7 @@ namespace Barotrauma.Items.Components
} }
else //the submarine is not being loaded, which means we're either in the sub editor or the item has been spawned mid-round else //the submarine is not being loaded, which means we're either in the sub editor or the item has been spawned mid-round
{ {
if (Screen.Selected == GameMain.EditMapScreen && attachedByDefault) if (Screen.Selected == GameMain.EditMapScreen)
{ {
//in the sub editor, attach //in the sub editor, attach
AttachToWall(); AttachToWall();