From df1ffb471efba70060bb4b2b262af1e58346bb4e Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Mon, 5 Jan 2026 00:44:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D0=BC=D0=B5=D0=BD=D1=8F=D1=82=D1=8C?= =?UTF-8?q?=20=D1=81=D0=BF=D1=80=D0=B0=D0=B9=D1=82=20=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D0=B6=D0=B4=D1=8B=20=D0=B2=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81?= =?UTF-8?q?=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20=D0=BE=D1=82=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=B0=20(#970)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit change --- .../Clothing/ClientClothingSystem.cs | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs index bd49a60048..682d25ac49 100644 --- a/Content.Client/Clothing/ClientClothingSystem.cs +++ b/Content.Client/Clothing/ClientClothingSystem.cs @@ -112,19 +112,24 @@ public sealed class ClientClothingSystem : ClothingSystem return; List? layers = null; + var slot = args.Slot; // WD EDIT // WD EDIT START // body type specific if (TryComp(args.Equipee, out HumanoidAppearanceComponent? humanoid)) { - var bodyTypeName = _prototype.Index(humanoid.BodyType).Name; - item.ClothingVisuals.TryGetValue($"{args.Slot}-{bodyTypeName}", out layers); + if (item.ClothingVisuals.TryGetValue($"{slot}-{humanoid.Sex}", out layers)) + slot = $"{slot}-{humanoid.Sex}"; + + var bodyTypeName = _prototype.Index(humanoid.BodyType).Name; + if (item.ClothingVisuals.TryGetValue($"{slot}-{bodyTypeName}", out layers)) + slot = $"{slot}-{bodyTypeName}"; } // WD EDIT END // first attempt to get species specific data. if (inventory.SpeciesId != null) - item.ClothingVisuals.TryGetValue($"{args.Slot}-{inventory.SpeciesId}", out layers); + item.ClothingVisuals.TryGetValue($"{slot}-{inventory.SpeciesId}", out layers); // WD EDIT // if that returned nothing, attempt to find generic data if (layers == null && !item.ClothingVisuals.TryGetValue(args.Slot, out layers)) @@ -189,7 +194,10 @@ public sealed class ClientClothingSystem : ClothingSystem // body type specific if (TryComp(target, out HumanoidAppearanceComponent? humanoid)) { - var bodyTypeName = _prototype.Index(humanoid.BodyType).Name; + if (rsi.TryGetState($"{state}-{humanoid.Sex}", out _)) + state = $"{state}-{humanoid.Sex}"; + + var bodyTypeName = _prototype.Index(humanoid.BodyType).Name; if (rsi.TryGetState($"{state}-{bodyTypeName}", out _)) state = $"{state}-{bodyTypeName}"; } @@ -305,10 +313,12 @@ public sealed class ClientClothingSystem : ClothingSystem // WD EDIT START string? bodyTypeName = null; + var sex = Sex.Unsexed; if (TryComp(equipee, out HumanoidAppearanceComponent? humanoid)) { bodyTypeName = _prototype.Index(humanoid.BodyType).Name; - switch (humanoid.Sex) + sex = humanoid.Sex; + switch (sex) { case Sex.Male: if (inventory.MaleDisplacements.Count > 0) @@ -387,8 +397,12 @@ public sealed class ClientClothingSystem : ClothingSystem if (displacementData is not null) { //Checking that the state is not tied to the current race. In this case we don't need to use the displacement maps. - if (layerData.State is not null && (inventory.SpeciesId is not null && layerData.State.EndsWith(inventory.SpeciesId) - || bodyTypeName is not null && layerData.State.EndsWith(bodyTypeName))) // WD EDIT + if (layerData.State is not null + && (inventory.SpeciesId is not null && layerData.State.EndsWith(inventory.SpeciesId) + // WD EDIT START + || bodyTypeName is not null && layerData.State.EndsWith(bodyTypeName) + || layerData.State.EndsWith(sex.ToString()))) + // WD EDIT END continue; if (_displacement.TryAddDisplacement(displacementData, sprite, index, key, revealedLayers))