Skip to content

Commit

Permalink
Allow tank harnesses and hospital gowns to be operated through
Browse files Browse the repository at this point in the history
  • Loading branch information
pontaoski committed Jan 10, 2025
1 parent f9d5f34 commit ec4769e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ private void OnToolCanPerform(Entity<SurgeryStepComponent> 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;
Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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!;

/// <summary>
/// Cache of all surgery prototypes' singleton entities.
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,6 @@
sprite: Clothing/OuterClothing/Vests/tankharness.rsi
- type: Clothing
sprite: Clothing/OuterClothing/Vests/tankharness.rsi
- type: Tag
tags:
- PermissibleForSurgery
3 changes: 3 additions & 0 deletions Resources/Prototypes/_DV/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@

- type: Tag
id: GlassesCorpsman # Prescription corpsman glasses.

- type: Tag
id: PermissibleForSurgery # Can be worn on the body during surgery

0 comments on commit ec4769e

Please sign in to comment.