]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix random clothing slots being able to hide character's nose and hair (#26708)
authorDinoWattz <116862698+DinoWattz@users.noreply.github.com>
Thu, 4 Apr 2024 08:35:44 +0000 (05:35 -0300)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 08:35:44 +0000 (02:35 -0600)
Fix bug and formatting

Content.Shared/Clothing/EntitySystems/ClothingSystem.cs

index f189db005bc6d3009297ed45962833ea27ce5065..85df04d20a172b2badb75ac9fa0ec0e3b93c408a 100644 (file)
@@ -91,7 +91,7 @@ public abstract class ClothingSystem : EntitySystem
 
     private void ToggleVisualLayer(EntityUid equipee, HumanoidVisualLayers layer, string tag)
     {
-        InventorySystem.InventorySlotEnumerator enumerator = _invSystem.GetSlotEnumerator(equipee);
+        InventorySystem.InventorySlotEnumerator enumerator = _invSystem.GetSlotEnumerator(equipee, SlotFlags.HEAD ^ SlotFlags.MASK);
         bool shouldLayerShow = true;
 
         while (enumerator.NextItem(out EntityUid item))
@@ -164,7 +164,7 @@ public abstract class ClothingSystem : EntitySystem
     {
         if (args.Handled || args.Cancelled || args.Target is not { } target)
             return;
-        args.Handled = _invSystem.TryEquip(args.User, target, ent, args.Slot, clothing: ent.Comp,  predicted: true, checkDoafter: false);
+        args.Handled = _invSystem.TryEquip(args.User, target, ent, args.Slot, clothing: ent.Comp, predicted: true, checkDoafter: false);
     }
 
     private void OnUnequipDoAfter(Entity<ClothingComponent> ent, ref ClothingUnequipDoAfterEvent args)