Merge branch 'master' into buckle-locker-fix-1262
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Content.Client.GameObjects.Components.Strap;
|
||||
using Content.Client.Interfaces.GameObjects.Components.Interaction;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Mobs
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class BuckleComponent : SharedBuckleComponent
|
||||
public class BuckleComponent : SharedBuckleComponent, IClientDraggable
|
||||
{
|
||||
private bool _buckled;
|
||||
private int? _originalDrawDepth;
|
||||
|
||||
protected override bool Buckled => _buckled;
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is BuckleComponentState buckle))
|
||||
@@ -39,6 +42,14 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool Buckled => _buckled;
|
||||
bool IClientDraggable.ClientCanDropOn(CanDropEventArgs eventArgs)
|
||||
{
|
||||
return eventArgs.Target.HasComponent<StrapComponent>();
|
||||
}
|
||||
|
||||
bool IClientDraggable.ClientCanDrag(CanDragEventArgs eventArgs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user