Skip to content

Commit

Permalink
FIX: Revenant can unbuckle while in invisible form (#2225)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZer2 authored Dec 1, 2024
1 parent 59e61b7 commit 23187be
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.DragDrop;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.SS220.BlockBuckleVerbsInteraction;
using Content.Shared.Verbs;
using Robust.Shared.Utility;

Expand Down Expand Up @@ -126,6 +127,11 @@ private void AddStrapVerbs(EntityUid uid, StrapComponent component, GetVerbsEven
if (args.Hands == null || !args.CanAccess || !args.CanInteract || !component.Enabled)
return;

//ss220 fix revenant verbs start
if (HasComp<BlockBuckleVerbsInteractionComponent>(args.User))
return;
//ss220 fix revenant verbs end

// Note that for whatever bloody reason, buckle component has its own interaction range. Additionally, this
// range can be set per-component, so we have to check a modified InRangeUnobstructed for every verb.

Expand Down Expand Up @@ -201,6 +207,11 @@ private void AddUnbuckleVerb(EntityUid uid, BuckleComponent component, GetVerbsE
if (!args.CanAccess || !args.CanInteract || !component.Buckled)
return;

//ss220 fix revenant verbs start
if (HasComp<BlockBuckleVerbsInteractionComponent>(args.User))
return;
//ss220 fix revenant verbs end

InteractionVerb verb = new()
{
Act = () => TryUnbuckle(uid, args.User, buckleComp: component),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Shared.SS220.BlockBuckleVerbsInteraction;

[RegisterComponent]
public sealed partial class BlockBuckleVerbsInteractionComponent : Component
{

}
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@
requirePower: false
ignoreInsulation: true
#ss220 revenant buff end
- type: BlockBuckleVerbsInteraction #ss220 revenant unbuckle verbs interaction fix

0 comments on commit 23187be

Please sign in to comment.