Improved level generation algorithm, fixed invisible hulls, turret projectile fix, fabricators work in mp

This commit is contained in:
Regalis
2016-02-11 21:37:37 +02:00
parent 5a38c4b1ef
commit 4f54e04c8c
32 changed files with 435 additions and 161 deletions
@@ -30,7 +30,7 @@ namespace Barotrauma.Items.Components
[HasDefaultValue(false, true)]
public bool Attached
{
get { return attached; }
get { return attached && item.Inventory == null; }
set { attached = value; }
}
@@ -101,7 +101,7 @@ namespace Barotrauma.Items.Components
Msg = "";
}
if (attachedByDefault || (Screen.Selected == GameMain.EditMapScreen && Submarine.Loaded!=null)) Use(1.0f);
if (attachedByDefault || (Screen.Selected == GameMain.EditMapScreen && Submarine.Loaded!=null)) Use(1.0f);
//holdAngle = ToolBox.GetAttributeFloat(element, "holdangle", 0.0f);
@@ -259,12 +259,22 @@ namespace Barotrauma.Items.Components
{
//prevRequiredItems = new List<RelatedItem>(requiredItems);
if (attached)
if (Attached)
{
Use(1.0f);
}
else
{
{
if (item.Inventory!=null)
{
if (body != null)
{
item.body = body;
body.Enabled = false;
}
attached = false;
}
requiredItems.Clear();
Msg = "";
}