Improve hands & pulling (#4389)

This commit is contained in:
Pieter-Jan Briers
2021-07-31 03:14:00 +02:00
committed by GitHub
parent 73e4946e27
commit 632e72b817
33 changed files with 945 additions and 612 deletions

View File

@@ -1,6 +1,4 @@
using Content.Shared.Alert;
using Content.Shared.Movement.Components;
using Content.Shared.Physics.Pull;
using Content.Shared.Movement.Components;
using Robust.Shared.GameObjects;
using Component = Robust.Shared.GameObjects.Component;
@@ -46,30 +44,5 @@ namespace Content.Shared.Pulling.Components
base.OnRemove();
}
public override void HandleMessage(ComponentMessage message, IComponent? component)
{
base.HandleMessage(message, component);
if (message is not PullMessage pullMessage ||
pullMessage.Puller.Owner != Owner)
{
return;
}
SharedAlertsComponent? ownerStatus = Owner.GetComponentOrNull<SharedAlertsComponent>();
switch (message)
{
case PullStartedMessage msg:
Pulling = msg.Pulled.Owner;
ownerStatus?.ShowAlert(AlertType.Pulling);
break;
case PullStoppedMessage _:
Pulling = null;
ownerStatus?.ClearAlert(AlertType.Pulling);
break;
}
}
}
}