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>
This commit is contained in:
Ed
2025-03-13 02:51:48 +03:00
committed by GitHub
parent f9a48463ba
commit 63ecf4241a
5 changed files with 13 additions and 2 deletions

View File

@@ -26,6 +26,12 @@ namespace Content.Client.IconSmoothing
[ViewVariables(VVAccess.ReadWrite), DataField("key")] [ViewVariables(VVAccess.ReadWrite), DataField("key")]
public string? SmoothKey { get; private set; } public string? SmoothKey { get; private set; }
/// <summary>
/// Additional keys to smooth with.
/// </summary>
[DataField]
public List<string> AdditionalKeys = new();
/// <summary> /// <summary>
/// Prepended to the RSI state. /// Prepended to the RSI state.
/// </summary> /// </summary>

View File

@@ -376,7 +376,8 @@ namespace Content.Client.IconSmoothing
while (candidates.MoveNext(out var entity)) while (candidates.MoveNext(out var entity))
{ {
if (smoothQuery.TryGetComponent(entity, out var other) && 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) other.Enabled)
{ {
return true; return true;

View File

@@ -81,7 +81,7 @@
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: IconSmooth - type: IconSmooth
key: bricks key: walls
base: brick base: brick
- type: entity - type: entity

View File

@@ -27,6 +27,8 @@
state: full state: full
- type: IconSmooth - type: IconSmooth
key: chasm key: chasm
additionalKeys:
- walls
base: chasm base: chasm
- type: Physics - type: Physics
bodyType: Static bodyType: Static

View File

@@ -36,6 +36,8 @@
state: full state: full
- type: IconSmooth - type: IconSmooth
key: floor key: floor
additionalKeys:
- walls
base: lava base: lava
- type: Physics - type: Physics
bodyType: Static bodyType: Static