mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* First impl. of appearance TryGetData cleanup * Handful of fixes * DamageVisuals: fix HandleDamage call, inheritdoc * bunch of unused AppearanceSystem instances * Handful more unused appearance systems, inheritdoc * JetpackSystem: Ent<T> * cleanup roundup, more Ent<T> * a few lingering AppearanceSystem.TryGetData calls * more lingering AppearanceData access * Remove unnecessary inheritdoc * once again, with feeling
22 lines
691 B
C#
22 lines
691 B
C#
using Content.Shared.IconSmoothing;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.IconSmoothing;
|
|
|
|
public sealed partial class ClientRandomIconSmoothSystem : SharedRandomIconSmoothSystem
|
|
{
|
|
[Dependency] private IconSmoothSystem _iconSmooth = default!;
|
|
|
|
[SubscribeLocalEvent]
|
|
private void OnAppearanceChange(Entity<RandomIconSmoothComponent> ent, ref AppearanceChangeEvent args)
|
|
{
|
|
if (!TryComp<IconSmoothComponent>(ent, out var smooth))
|
|
return;
|
|
|
|
if (!args.TryGetData<string>(RandomIconSmoothState.State, out var state))
|
|
return;
|
|
|
|
smooth.StateBase = state;
|
|
_iconSmooth.SetStateBase(ent, smooth, state);
|
|
}
|
|
}
|