]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Texture Scaling for clothing (#39714)
authorInsoPL <lukasz.lindert@protonmail.com>
Mon, 1 Sep 2025 15:31:11 +0000 (17:31 +0200)
committerGitHub <noreply@github.com>
Mon, 1 Sep 2025 15:31:11 +0000 (18:31 +0300)
scale

Content.Client/Clothing/ClientClothingSystem.cs
Content.Shared/Clothing/Components/ClothingComponent.cs

index 8d53e90e3453a649152142651e9e8d3b4101ba22..417e540d4aa6927611106ddbe9d5a9921952f17f 100644 (file)
@@ -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;
index ff1d422189f8c6f27f96cc878c9b981f11957a74..2d576637a607d6f33f148d31333c38c1ac0e0184 100644 (file)
@@ -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
     /// </summary>
     [DataField]
     public TimeSpan StripDelay = TimeSpan.Zero;
+
+    /// <summary>
+    ///     A scale applied to all layers.
+    /// </summary>
+    /// 
+    [DataField]
+    public Vector2 Scale = Vector2.One;
 }
 
 public enum ClothingMask : byte