From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Wed, 12 Mar 2025 23:51:48 +0000 (+0300) Subject: IconSmooth additional smoothing keys (#35790) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=63ecf4241a4e6f8e7070220941d6bde9e7589e73;p=space-station-14.git 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> --- 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