From 63ecf4241a4e6f8e7070220941d6bde9e7589e73 Mon Sep 17 00:00:00 2001
From: Ed <96445749+TheShuEd@users.noreply.github.com>
Date: Thu, 13 Mar 2025 02:51:48 +0300
Subject: [PATCH] IconSmooth additional smoothing keys (#35790)
* 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 | 6 ++++++
Content.Client/IconSmoothing/IconSmoothSystem.cs | 3 ++-
Resources/Prototypes/Entities/Structures/Walls/walls.yml | 2 +-
Resources/Prototypes/Entities/Tiles/chasm.yml | 2 ++
Resources/Prototypes/Entities/Tiles/lava.yml | 2 ++
5 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Content.Client/IconSmoothing/IconSmoothComponent.cs b/Content.Client/IconSmoothing/IconSmoothComponent.cs
index 040198529c..7898e9dc1e 100644
--- a/Content.Client/IconSmoothing/IconSmoothComponent.cs
+++ b/Content.Client/IconSmoothing/IconSmoothComponent.cs
@@ -26,6 +26,12 @@ namespace Content.Client.IconSmoothing
[ViewVariables(VVAccess.ReadWrite), DataField("key")]
public string? SmoothKey { get; private set; }
+ ///
+ /// Additional keys to smooth with.
+ ///
+ [DataField]
+ public List AdditionalKeys = new();
+
///
/// Prepended to the RSI state.
///
diff --git a/Content.Client/IconSmoothing/IconSmoothSystem.cs b/Content.Client/IconSmoothing/IconSmoothSystem.cs
index 2654f1ab57..45aafb5288 100644
--- a/Content.Client/IconSmoothing/IconSmoothSystem.cs
+++ b/Content.Client/IconSmoothing/IconSmoothSystem.cs
@@ -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;
diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml
index 57b8aa915e..97823cec28 100644
--- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml
+++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml
@@ -81,7 +81,7 @@
acts: [ "Destruction" ]
- type: IconSmooth
- key: bricks
+ key: walls
base: brick
- type: entity
diff --git a/Resources/Prototypes/Entities/Tiles/chasm.yml b/Resources/Prototypes/Entities/Tiles/chasm.yml
index 23f3ad8395..a0dc308d17 100644
--- a/Resources/Prototypes/Entities/Tiles/chasm.yml
+++ b/Resources/Prototypes/Entities/Tiles/chasm.yml
@@ -27,6 +27,8 @@
state: full
- type: IconSmooth
key: chasm
+ additionalKeys:
+ - walls
base: chasm
- type: Physics
bodyType: Static
diff --git a/Resources/Prototypes/Entities/Tiles/lava.yml b/Resources/Prototypes/Entities/Tiles/lava.yml
index 68dd5671a0..10a09116ad 100644
--- a/Resources/Prototypes/Entities/Tiles/lava.yml
+++ b/Resources/Prototypes/Entities/Tiles/lava.yml
@@ -36,6 +36,8 @@
state: full
- type: IconSmooth
key: floor
+ additionalKeys:
+ - walls
base: lava
- type: Physics
bodyType: Static
--
2.51.2