From: Winkarst-cpu <74284083+Winkarst-cpu@users.noreply.github.com>
Date: Sat, 11 Oct 2025 22:21:04 +0000 (+0300)
Subject: Fix visual bug with masks appearing to be pulled down after re-equipping (#40332)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=0ad48093a200d1d424411f5ffe44ca3757c2c5d0;p=space-station-14.git
Fix visual bug with masks appearing to be pulled down after re-equipping (#40332)
Fix
---
diff --git a/Content.Shared/Clothing/EntitySystems/MaskSystem.cs b/Content.Shared/Clothing/EntitySystems/MaskSystem.cs
index 30e00faf0a..0c53349934 100644
--- a/Content.Shared/Clothing/EntitySystems/MaskSystem.cs
+++ b/Content.Shared/Clothing/EntitySystems/MaskSystem.cs
@@ -62,27 +62,7 @@ public sealed class MaskSystem : EntitySystem
private void OnGotUnequipped(EntityUid uid, MaskComponent mask, GotUnequippedEvent args)
{
- if (!mask.IsToggled || !mask.IsToggleable)
- return;
-
- mask.IsToggled = false;
- ToggleMaskComponents(uid, mask, args.Equipee, mask.EquippedPrefix, true);
- }
-
- ///
- /// Called after setting IsToggled, raises events and dirties.
- ///
- private void ToggleMaskComponents(EntityUid uid, MaskComponent mask, EntityUid wearer, string? equippedPrefix = null, bool isEquip = false)
- {
- Dirty(uid, mask);
- if (mask.ToggleActionEntity is { } action)
- _actionSystem.SetToggled(action, mask.IsToggled);
-
- var maskEv = new ItemMaskToggledEvent((uid, mask), wearer);
- RaiseLocalEvent(uid, ref maskEv);
-
- var wearerEv = new WearerMaskToggledEvent((uid, mask));
- RaiseLocalEvent(wearer, ref wearerEv);
+ SetToggled(uid, false);
}
private void OnFolded(Entity ent, ref FoldedEvent args)