v0.11.0.9

This commit is contained in:
Joonas Rikkonen
2020-12-09 16:34:16 +02:00
parent bbf06f0984
commit f433a7ba10
325 changed files with 13947 additions and 3652 deletions
@@ -89,6 +89,16 @@ namespace Barotrauma.Items.Components
}
}
/// <summary>
/// Automatically cleared after docking -> no need to unregister
/// </summary>
public event Action OnDocked;
/// <summary>
/// Automatically cleared after undocking -> no need to unregister
/// </summary>
public event Action OnUnDocked;
public DockingPort(Item item, XElement element)
: base(item, element)
{
@@ -213,6 +223,9 @@ namespace Barotrauma.Items.Components
item.CreateServerEvent(this);
}
#endif
OnDocked?.Invoke();
OnDocked = null;
}
@@ -817,6 +830,9 @@ namespace Barotrauma.Items.Components
docked = false;
Item.Submarine.EnableObstructedWaypoints(DockingTarget.Item.Submarine);
obstructedWayPointsDisabled = false;
DockingTarget.Undock();
DockingTarget = null;
@@ -860,9 +876,6 @@ namespace Barotrauma.Items.Components
outsideBlocker?.Body.Remove(outsideBlocker);
outsideBlocker = null;
Item.Submarine.EnableObstructedWaypoints();
obstructedWayPointsDisabled = false;
#if SERVER
if (GameMain.Server != null && (!item.Submarine?.Loading ?? true))
{
@@ -870,6 +883,8 @@ namespace Barotrauma.Items.Components
item.CreateServerEvent(this);
}
#endif
OnUnDocked?.Invoke();
OnUnDocked = null;
}
public override void Update(float deltaTime, Camera cam)
@@ -1034,7 +1049,6 @@ namespace Barotrauma.Items.Components
Dock(dockingPort);
}
}
}
public override void ReceiveSignal(int stepsTaken, string signal, Connection connection, Item source, Character sender, float power = 0.0f, float signalStrength = 1.0f)