Misc changes from replay branch (#12581)
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Shared.Physics.Pull;
|
||||
using Content.Shared.Pulling;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Pulling.Events;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
|
||||
namespace Content.Shared.Administration;
|
||||
@@ -29,6 +30,7 @@ public sealed class AdminFrozenSystem : EntitySystem
|
||||
SubscribeLocalEvent<AdminFrozenComponent, UpdateCanMoveEvent>(OnUpdateCanMove);
|
||||
SubscribeLocalEvent<AdminFrozenComponent, PullAttemptEvent>(OnPullAttempt);
|
||||
SubscribeLocalEvent<AdminFrozenComponent, AttackAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<AdminFrozenComponent, ChangeDirectionAttemptEvent>(OnAttempt);
|
||||
}
|
||||
|
||||
private void OnAttempt(EntityUid uid, AdminFrozenComponent component, CancellableEntityEventArgs args)
|
||||
|
||||
@@ -80,8 +80,7 @@ namespace Content.Shared.Interaction
|
||||
|
||||
public bool TryFaceAngle(EntityUid user, Angle diffAngle, TransformComponent? xform = null)
|
||||
{
|
||||
// TODO: MobState should be handling CanChangeDirection's event
|
||||
if (_actionBlockerSystem.CanChangeDirection(user) && !_mobState.IsIncapacitated(user))
|
||||
if (_actionBlockerSystem.CanChangeDirection(user))
|
||||
{
|
||||
if (!Resolve(user, ref xform))
|
||||
return false;
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace Content.Shared.Interaction
|
||||
if (target != null && Deleted(target.Value))
|
||||
return;
|
||||
|
||||
if (TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode)
|
||||
if (!altInteract && TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode)
|
||||
{
|
||||
// Eat the input
|
||||
return;
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace Content.Shared.Stunnable
|
||||
SubscribeLocalEvent<KnockedDownComponent, TileFrictionEvent>(OnKnockedTileFriction);
|
||||
|
||||
// Attempt event subscriptions.
|
||||
SubscribeLocalEvent<StunnedComponent, ChangeDirectionAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<StunnedComponent, UpdateCanMoveEvent>(OnMoveAttempt);
|
||||
SubscribeLocalEvent<StunnedComponent, InteractionAttemptEvent>(OnAttempt);
|
||||
SubscribeLocalEvent<StunnedComponent, UseAttemptEvent>(OnAttempt);
|
||||
|
||||
@@ -168,6 +168,9 @@ namespace Content.Shared.Verbs
|
||||
RaiseLocalEvent(verb.ExecutionEventArgs);
|
||||
}
|
||||
|
||||
if (Deleted(user) || Deleted(target))
|
||||
return;
|
||||
|
||||
// Perform any contact interactions
|
||||
if (verb.DoContactInteraction ?? (verb.DefaultDoContactInteraction && _interactionSystem.InRangeUnobstructed(user, target)))
|
||||
_interactionSystem.DoContactInteraction(user, target);
|
||||
|
||||
Reference in New Issue
Block a user