Fix being able to start pulling something while incapacitated. (#4240)
This commit is contained in:
committed by
GitHub
parent
a1088faa35
commit
9bedfe79be
@@ -6,6 +6,7 @@ using Content.Shared.GameTicking;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Physics.Pull;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Pulling.Events;
|
||||
using Content.Shared.Rotatable;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -237,5 +238,12 @@ namespace Content.Shared.Pulling
|
||||
pulled.Transform.WorldRotation = newAngle;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanPull(IEntity puller, IEntity pulled)
|
||||
{
|
||||
var startPull = new StartPullAttemptEvent(puller, pulled);
|
||||
RaiseLocalEvent(puller.Uid, startPull);
|
||||
return !startPull.Cancelled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user