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:
@@ -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>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
acts: [ "Destruction" ]
|
acts: [ "Destruction" ]
|
||||||
|
|
||||||
- type: IconSmooth
|
- type: IconSmooth
|
||||||
key: bricks
|
key: walls
|
||||||
base: brick
|
base: brick
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user