Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Revenant can unbuckle while in invisible form #2225

Merged
merged 4 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading