From ec4769e1aca35eb67b3f8f656c436a14bd696983 Mon Sep 17 00:00:00 2001 From: Janet Blackquill Date: Fri, 10 Jan 2025 00:22:58 -0500 Subject: [PATCH] Allow tank harnesses and hospital gowns to be operated through --- Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs | 3 +++ Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs | 2 ++ Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml | 3 +++ Resources/Prototypes/Entities/Clothing/OuterClothing/vests.yml | 3 +++ Resources/Prototypes/_DV/tags.yml | 3 +++ 5 files changed, 14 insertions(+) diff --git a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs index a01077c77d2e..86a4d1914624 100644 --- a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs +++ b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs @@ -283,6 +283,9 @@ private void OnToolCanPerform(Entity ent, ref SurgeryCanPe if (!containerSlot.ContainedEntity.HasValue) continue; + if (_tagSystem.HasTag(containerSlot.ContainedEntity.Value, "PermissibleForSurgery")) + continue; + args.Invalid = StepInvalidReason.Armor; args.Popup = Loc.GetString("surgery-ui-window-steps-error-armor"); return; diff --git a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs index fe12eed8fe7a..589ba03e036f 100644 --- a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs +++ b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs @@ -21,6 +21,7 @@ using Content.Shared.Popups; using Content.Shared.Prototypes; using Content.Shared.Standing; +using Content.Shared.Tag; using Robust.Shared.Audio.Systems; using Robust.Shared.Map; using Robust.Shared.Network; @@ -47,6 +48,7 @@ public abstract partial class SharedSurgerySystem : EntitySystem [Dependency] private readonly RotateToFaceSystem _rotateToFace = default!; [Dependency] private readonly StandingStateSystem _standing = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; /// /// Cache of all surgery prototypes' singleton entities. diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml index 552000cbc010..58d5eee8b5cc 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml @@ -265,6 +265,9 @@ sprite: Clothing/OuterClothing/Misc/hospitalgown.rsi - type: Clothing sprite: Clothing/OuterClothing/Misc/hospitalgown.rsi + - type: Tag + tags: + - PermissibleForSurgery - type: entity parent: ClothingOuterBase diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/vests.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/vests.yml index 0cecbcab7e8a..7bf254f26e1d 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/vests.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/vests.yml @@ -91,3 +91,6 @@ sprite: Clothing/OuterClothing/Vests/tankharness.rsi - type: Clothing sprite: Clothing/OuterClothing/Vests/tankharness.rsi + - type: Tag + tags: + - PermissibleForSurgery \ No newline at end of file diff --git a/Resources/Prototypes/_DV/tags.yml b/Resources/Prototypes/_DV/tags.yml index 2557e71e9de4..76b96a7595ee 100644 --- a/Resources/Prototypes/_DV/tags.yml +++ b/Resources/Prototypes/_DV/tags.yml @@ -104,3 +104,6 @@ - type: Tag id: GlassesCorpsman # Prescription corpsman glasses. + +- type: Tag + id: PermissibleForSurgery # Can be worn on the body during surgery