mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +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
18 lines
723 B
C#
18 lines
723 B
C#
using Content.Shared.Spreader;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Kudzu;
|
|
|
|
public sealed partial class KudzuVisualsSystem : VisualizerSystem<KudzuVisualsComponent>
|
|
{
|
|
protected override void OnAppearanceChange(EntityUid uid, KudzuVisualsComponent component, ref AppearanceChangeEvent args)
|
|
{
|
|
if (args.Sprite == null
|
|
|| !args.TryGetData<int>(KudzuVisuals.Variant, out var variant)
|
|
|| !args.TryGetData<int>(KudzuVisuals.GrowthLevel, out var level))
|
|
return;
|
|
|
|
var index = SpriteSystem.LayerMapReserve((uid, args.Sprite), $"{component.Layer}");
|
|
SpriteSystem.LayerSetRsiState((uid, args.Sprite), index, $"kudzu_{level}{variant}");
|
|
}
|
|
}
|