* Adds smoke reaction effect * smoke tweaks * address reviews * Smoke fix * Refactor smoke and add foam * Fix stuff * Remove thing * Little things * Address some comments * Address more things * More addressing * License stuff * Address refactor request * Small things * Add nullability * Update Content.Server/GameObjects/EntitySystems/SolutionAreaEffectSystem.cs Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
27 lines
776 B
C#
27 lines
776 B
C#
#nullable enable
|
|
using Content.Shared.GameObjects.Components.Chemistry;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.Interfaces.GameObjects.Components;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Content.Client.GameObjects.Components.Chemistry
|
|
{
|
|
[UsedImplicitly]
|
|
public class SmokeVisualizer : AppearanceVisualizer
|
|
{
|
|
public override void OnChangeData(AppearanceComponent component)
|
|
{
|
|
base.OnChangeData(component);
|
|
|
|
if (component.TryGetData<Color>(SmokeVisuals.Color, out var color))
|
|
{
|
|
if (component.Owner.TryGetComponent(out ISpriteComponent? sprite))
|
|
{
|
|
sprite.Color = color;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|