From b86b6e0ff019a74b61dd477a78edb5a72a4318e8 Mon Sep 17 00:00:00 2001 From: InsoPL Date: Tue, 20 Jan 2026 16:46:49 +0100 Subject: [PATCH] Examination verb for insuls (#42444) * feat * only clothing * fix * Revert "fix" This reverts commit 858c3f882718cd003391e0fde6b2711b31e6ab54. * fix * reversal * removed double namespace --- .../Electrocution/InsulatedSystem.cs | 33 +++++++++++++++++++ .../components/insulated-component.ftl | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 Content.Shared/Electrocution/InsulatedSystem.cs create mode 100644 Resources/Locale/en-US/clothing/components/insulated-component.ftl diff --git a/Content.Shared/Electrocution/InsulatedSystem.cs b/Content.Shared/Electrocution/InsulatedSystem.cs new file mode 100644 index 0000000000..7cd4913f7d --- /dev/null +++ b/Content.Shared/Electrocution/InsulatedSystem.cs @@ -0,0 +1,33 @@ +using Content.Shared.Clothing.Components; +using Content.Shared.Examine; +using Content.Shared.Verbs; + +namespace Content.Shared.Electrocution; + +public sealed class InsulatedSystem : EntitySystem +{ + [Dependency] private readonly ExamineSystemShared _examine = default!; + + /// + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>(OnDetailedExamine); + } + + private void OnDetailedExamine(EntityUid ent, InsulatedComponent component, ref GetVerbsEvent args) + { + if (!HasComp(ent)) + return; + + var iconTexture = "/Textures/Interface/VerbIcons/zap.svg.192dpi.png"; + + _examine.AddHoverExamineVerb(args, + component, + Loc.GetString("identity-block-examinable-verb-text"), + Loc.GetString("identity-block-examinable-verb-text-message"), + iconTexture + ); + } +} diff --git a/Resources/Locale/en-US/clothing/components/insulated-component.ftl b/Resources/Locale/en-US/clothing/components/insulated-component.ftl new file mode 100644 index 0000000000..30c7e98a52 --- /dev/null +++ b/Resources/Locale/en-US/clothing/components/insulated-component.ftl @@ -0,0 +1,2 @@ +identity-block-examinable-verb-text = Insulatated +identity-block-examinable-verb-text-message = This item appears to be electrically insulated. It should protect the wearer from shocks. -- 2.52.0