From 808488bb913b4f5188e76577ab8aeae8ab914002 Mon Sep 17 00:00:00 2001 From: pheenty Date: Sun, 20 Oct 2024 16:48:33 +0700 Subject: [PATCH] nvg fix --- Content.Server/Stories/Nightvision/NightvisionSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Stories/Nightvision/NightvisionSystem.cs b/Content.Server/Stories/Nightvision/NightvisionSystem.cs index d5e5d9db9f..3d91097982 100644 --- a/Content.Server/Stories/Nightvision/NightvisionSystem.cs +++ b/Content.Server/Stories/Nightvision/NightvisionSystem.cs @@ -17,14 +17,15 @@ public override void Initialize() } private void OnUnequipped(EntityUid uid, NightvisionClothingComponent component, GotUnequippedEvent args) { - RemCompDeferred(args.Equipee); + if (args.Slot == "eyes") + RemCompDeferred(args.Equipee); } private void OnEquipped(EntityUid uid, NightvisionClothingComponent component, GotEquippedEvent args) { if (_gameTiming.ApplyingState) return; - if (component.Enabled && !HasComp(args.Equipee)) + if (component.Enabled && !HasComp(args.Equipee) && (args.Slot == "eyes")) AddComp(args.Equipee); } }