From 831d384ff5c28f1c2bfc902dc96b9d93557129b2 Mon Sep 17 00:00:00 2001 From: InsoPL Date: Mon, 1 Sep 2025 17:31:11 +0200 Subject: [PATCH] Texture Scaling for clothing (#39714) scale --- Content.Client/Clothing/ClientClothingSystem.cs | 4 +--- Content.Shared/Clothing/Components/ClothingComponent.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs index 8d53e90e34..417e540d4a 100644 --- a/Content.Client/Clothing/ClientClothingSystem.cs +++ b/Content.Client/Clothing/ClientClothingSystem.cs @@ -1,12 +1,10 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; -using System.Numerics; using Content.Client.DisplacementMap; using Content.Client.Inventory; using Content.Shared.Clothing; using Content.Shared.Clothing.Components; using Content.Shared.Clothing.EntitySystems; -using Content.Shared.DisplacementMap; using Content.Shared.Humanoid; using Content.Shared.Inventory; using Content.Shared.Inventory.Events; @@ -14,7 +12,6 @@ using Content.Shared.Item; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.ResourceManagement; -using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.TypeSerializers.Implementations; using Robust.Shared.Utility; using static Robust.Client.GameObjects.SpriteComponent; @@ -177,6 +174,7 @@ public sealed class ClientClothingSystem : ClothingSystem var layer = new PrototypeLayerData(); layer.RsiPath = rsi.Path.ToString(); layer.State = state; + layer.Scale = clothing.Scale; layers = new() { layer }; return true; diff --git a/Content.Shared/Clothing/Components/ClothingComponent.cs b/Content.Shared/Clothing/Components/ClothingComponent.cs index ff1d422189..2d576637a6 100644 --- a/Content.Shared/Clothing/Components/ClothingComponent.cs +++ b/Content.Shared/Clothing/Components/ClothingComponent.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Numerics; using Content.Shared.Clothing.EntitySystems; using Content.Shared.DoAfter; using Content.Shared.Inventory; @@ -92,6 +93,13 @@ public sealed partial class ClothingComponent : Component /// [DataField] public TimeSpan StripDelay = TimeSpan.Zero; + + /// + /// A scale applied to all layers. + /// + /// + [DataField] + public Vector2 Scale = Vector2.One; } public enum ClothingMask : byte -- 2.51.2