Files
wwdpublic/Content.Client/Sticky/Visualizers/StickyVisualizerSystem.cs
Will-Oliver-Br 07d2610a86 Port Medical Patches (#2185)
Port medical patches from
[Goob-Station](https://github.com/Goob-Station/Goob-Station).
Prs:
https://github.com/space-wizards/space-station-14/pull/30230
https://github.com/Goob-Station/Goob-Station/pull/493
https://github.com/Goob-Station/Goob-Station/pull/663
https://github.com/Goob-Station/Goob-Station/pull/1086
https://github.com/Goob-Station/Goob-Station/pull/1072
https://github.com/Goob-Station/Goob-Station/pull/1243
https://github.com/Goob-Station/Goob-Station/pull/1246
https://github.com/Goob-Station/Goob-Station/pull/1707

---

<details><summary><h1>Media</h1></summary>
<p>

![Captura de tela 2025-04-06
132934](https://github.com/user-attachments/assets/914fc728-b4cd-452f-9f71-1300d836895a)

</p>
</details>

---

🆑 deltanedas, jorgun, fishbait_x, Huffs-The-Frezone, Teapug, Speebr0,
CerberusWolfie, yglop, botanySupremist, Will-Oliver-Br
- add: Added medical patches
- add: Added a guidebook entry for medical patches.

---------

Signed-off-by: Will-Oliver-Br <164823659+Will-Oliver-Br@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: fishbait <gnesse@gmail.com>
Co-authored-by: unknown <Administrator@DESKTOP-PMRIVVA.kommune.indresogn.no>
Co-authored-by: Fishbait <Fishbait@git.ml>
Co-authored-by: Theapug <159912420+Teapug@users.noreply.github.com>
Co-authored-by: Speebro <100388782+Speebr0@users.noreply.github.com>
Co-authored-by: Speebro <speebro@notreal.com>
Co-authored-by: John Willis <143434770+CerberusWolfie@users.noreply.github.com>
Co-authored-by: yglop <95057024+yglop@users.noreply.github.com>
Co-authored-by: botanySupremist <160211017+botanySupremist@users.noreply.github.com>
Co-authored-by: botanySupremist <definitelyrealBotSupremist@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-20 13:21:18 +10:00

39 lines
1.1 KiB
C#

using Content.Shared.Sticky.Components;
using Robust.Client.GameObjects;
namespace Content.Client.Sticky.Visualizers;
public sealed class StickyVisualizerSystem : VisualizerSystem<StickyVisualizerComponent>
{
private EntityQuery<SpriteComponent> _spriteQuery;
public override void Initialize()
{
base.Initialize();
_spriteQuery = GetEntityQuery<SpriteComponent>();
SubscribeLocalEvent<StickyVisualizerComponent, ComponentInit>(OnInit);
}
private void OnInit(Entity<StickyVisualizerComponent> ent, ref ComponentInit args)
{
if (!_spriteQuery.TryComp(ent, out var sprite))
return;
ent.Comp.OriginalDrawDepth = sprite.DrawDepth;
}
protected override void OnAppearanceChange(EntityUid uid, StickyVisualizerComponent comp, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
return;
if (!AppearanceSystem.TryGetData<bool>(uid, StickyVisuals.IsStuck, out var isStuck, args.Component))
return;
var drawDepth = isStuck ? comp.StuckDrawDepth : comp.OriginalDrawDepth;
args.Sprite.DrawDepth = drawDepth;
}
}