Remove IRelayMoveInput (#4663)
* Remove IRelayMoveInput This interface gets called every time a movement key is pressed so it gets called a lot. * Remove RelayMovementEntityMessage Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -10,19 +10,10 @@ namespace Content.Server.Ghost.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IGhostOnMove))]
|
||||
public class GhostOnMoveComponent : Component, IRelayMoveInput, IGhostOnMove
|
||||
public class GhostOnMoveComponent : Component,IGhostOnMove
|
||||
{
|
||||
public override string Name => "GhostOnMove";
|
||||
|
||||
[DataField("canReturn")] public bool CanReturn { get; set; } = true;
|
||||
|
||||
void IRelayMoveInput.MoveInputPressed(ICommonSession session)
|
||||
{
|
||||
// Let's not ghost if our mind is visiting...
|
||||
if (Owner.HasComponent<VisitingMindComponent>()) return;
|
||||
if (!Owner.TryGetComponent(out MindComponent? mind) || !mind.HasMind || mind.Mind!.IsVisitingEntity) return;
|
||||
|
||||
EntitySystem.Get<GameTicker>().OnGhostAttempt(mind.Mind!, CanReturn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user