From 23187be7916dc45e3a6d81c07aa59a0933b38f50 Mon Sep 17 00:00:00 2001 From: ReeZer2 <63300653+ReeZer2@users.noreply.github.com> Date: Sun, 1 Dec 2024 03:29:18 +0200 Subject: [PATCH] FIX: Revenant can unbuckle while in invisible form (#2225) --- .../Buckle/SharedBuckleSystem.Interaction.cs | 11 +++++++++++ .../BlockBuckleVerbsInteractionComponent.cs | 7 +++++++ Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Content.Shared/SS220/BlockBuckleVerbsInteraction/BlockBuckleVerbsInteractionComponent.cs diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs b/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs index 1a15e52a3c4311..c45e2888d99313 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs @@ -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; @@ -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(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. @@ -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(args.User)) + return; + //ss220 fix revenant verbs end + InteractionVerb verb = new() { Act = () => TryUnbuckle(uid, args.User, buckleComp: component), diff --git a/Content.Shared/SS220/BlockBuckleVerbsInteraction/BlockBuckleVerbsInteractionComponent.cs b/Content.Shared/SS220/BlockBuckleVerbsInteraction/BlockBuckleVerbsInteractionComponent.cs new file mode 100644 index 00000000000000..59400022e30913 --- /dev/null +++ b/Content.Shared/SS220/BlockBuckleVerbsInteraction/BlockBuckleVerbsInteractionComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Shared.SS220.BlockBuckleVerbsInteraction; + +[RegisterComponent] +public sealed partial class BlockBuckleVerbsInteractionComponent : Component +{ + +} diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml b/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml index 921020aa6667d9..1c762b185a3067 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml @@ -100,4 +100,4 @@ requirePower: false ignoreInsulation: true #ss220 revenant buff end - + - type: BlockBuckleVerbsInteraction #ss220 revenant unbuckle verbs interaction fix