Fix some bugs (#805)

* fix buckling from fences

* fix #804
This commit is contained in:
Ed
2025-01-23 22:47:49 +03:00
committed by GitHub
parent 3f84a19ff0
commit cc924a2478
2 changed files with 10 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Pulling.Events;
using Content.Shared.Physics;
using Content.Shared.Popups;
using Content.Shared.Pulling.Events;
using Content.Shared.Rotation;
@@ -18,7 +19,6 @@ using Content.Shared.Stunnable;
using Content.Shared.Throwing;
using Content.Shared.Whitelist;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
@@ -318,6 +318,11 @@ public abstract partial class SharedBuckleSystem
return false;
}
//CP14
if (!_interaction.InRangeUnobstructed(buckleUid, strapUid, collisionMask: CollisionGroup.MobMask))
return false;
//CP14 End
var buckleAttempt = new BuckleAttemptEvent((strapUid, strapComp), (buckleUid, buckleComp), user, popup);
RaiseLocalEvent(buckleUid, ref buckleAttempt);
if (buckleAttempt.Cancelled)