]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
IconSmooth additional smoothing keys (#35790)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Wed, 12 Mar 2025 23:51:48 +0000 (02:51 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Mar 2025 23:51:48 +0000 (00:51 +0100)
* additionalKeys

* Update lava.yml

* Update Content.Client/IconSmoothing/IconSmoothComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Client/IconSmoothing/IconSmoothComponent.cs
Content.Client/IconSmoothing/IconSmoothSystem.cs
Resources/Prototypes/Entities/Structures/Walls/walls.yml
Resources/Prototypes/Entities/Tiles/chasm.yml
Resources/Prototypes/Entities/Tiles/lava.yml

index 040198529c751ff54274c236b2ae77c0f866673d..7898e9dc1ebc658daec698773d9f67a6cf4e00f7 100644 (file)
@@ -26,6 +26,12 @@ namespace Content.Client.IconSmoothing
         [ViewVariables(VVAccess.ReadWrite), DataField("key")]
         public string? SmoothKey { get; private set; }
 
+        /// <summary>
+        ///     Additional keys to smooth with.
+        /// </summary>
+        [DataField]
+        public List<string> AdditionalKeys = new();
+
         /// <summary>
         ///     Prepended to the RSI state.
         /// </summary>
index 2654f1ab574f1aec47a7569b4b2c63c50a4e6e35..45aafb528875fb1c6c5aa560c7df92807e37e9e2 100644 (file)
@@ -376,7 +376,8 @@ namespace Content.Client.IconSmoothing
             while (candidates.MoveNext(out var entity))
             {
                 if (smoothQuery.TryGetComponent(entity, out var other) &&
-                    other.SmoothKey == smooth.SmoothKey &&
+                    other.SmoothKey != null &&
+                    (other.SmoothKey == smooth.SmoothKey || smooth.AdditionalKeys.Contains(other.SmoothKey)) &&
                     other.Enabled)
                 {
                     return true;
index 57b8aa915e72def473a5daea1501b509197b8d01..97823cec2877794db7701adcafa340f80119ca4e 100644 (file)
@@ -81,7 +81,7 @@
         acts: [ "Destruction" ]
 
   - type: IconSmooth
-    key: bricks
+    key: walls
     base: brick
 
 - type: entity
index 23f3ad839500277d930799d854feaf7c8297b2fe..a0dc308d17efcffb509312e74f76334e449c1290 100644 (file)
@@ -27,6 +27,8 @@
     state: full
   - type: IconSmooth
     key: chasm
+    additionalKeys:
+    - walls
     base: chasm
   - type: Physics
     bodyType: Static
index 68dd5671a06dc9e46df8f7f8749fb0d73e1df98c..10a09116ade4f9dfbc357fbd90fc0418773f0f12 100644 (file)
@@ -36,6 +36,8 @@
     state: full
   - type: IconSmooth
     key: floor
+    additionalKeys:
+    - walls
     base: lava
   - type: Physics
     bodyType: Static