Deprecate IActionBlocker ChangeDirectionAttempt (#4851)
* Deprecate IActionBlocker ChangeDirectionAttempt * Woops
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.EffectBlocker;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -12,7 +11,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Shared.Buckle.Components
|
||||
{
|
||||
[NetworkedComponent()]
|
||||
public abstract class SharedBuckleComponent : Component, IActionBlocker, IEffectBlocker, IDraggable
|
||||
public abstract class SharedBuckleComponent : Component, IEffectBlocker, IDraggable
|
||||
{
|
||||
public sealed override string Name => "Buckle";
|
||||
|
||||
@@ -36,11 +35,6 @@ namespace Content.Shared.Buckle.Components
|
||||
|
||||
public abstract bool TryBuckle(IEntity? user, IEntity to);
|
||||
|
||||
bool IActionBlocker.CanChangeDirection()
|
||||
{
|
||||
return !Buckled;
|
||||
}
|
||||
|
||||
bool IEffectBlocker.CanFall() => !Buckled;
|
||||
|
||||
bool IDraggable.CanDrop(CanDropEvent args)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Buckle.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Movement;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Throwing;
|
||||
@@ -17,6 +18,13 @@ namespace Content.Shared.Buckle
|
||||
SubscribeLocalEvent<SharedBuckleComponent, StandAttemptEvent>(HandleStand);
|
||||
SubscribeLocalEvent<SharedBuckleComponent, ThrowPushbackAttemptEvent>(HandleThrowPushback);
|
||||
SubscribeLocalEvent<SharedBuckleComponent, MovementAttemptEvent>(HandleMove);
|
||||
SubscribeLocalEvent<SharedBuckleComponent, ChangeDirectionAttemptEvent>(OnBuckleChangeDirectionAttempt);
|
||||
}
|
||||
|
||||
private void OnBuckleChangeDirectionAttempt(EntityUid uid, SharedBuckleComponent component, ChangeDirectionAttemptEvent args)
|
||||
{
|
||||
if (component.Buckled)
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void HandleMove(EntityUid uid, SharedBuckleComponent component, MovementAttemptEvent args)
|
||||
|
||||
Reference in New Issue
Block a user