using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using System;
using System.Collections.Generic;
namespace Content.Shared.Light.Component;
///
/// Networked ~~solely for admemes~~ for completely legitimate reasons, like hacked energy swords.
///
[NetworkedComponent]
[RegisterComponent]
[Friend(typeof(SharedRgbLightControllerSystem))]
public sealed class RgbLightControllerComponent : Robust.Shared.GameObjects.Component
{
[DataField("cycleRate")]
public float CycleRate { get; set; } = 0.1f;
///
/// What layers of the sprite to modulate? If null, will affect the whole sprite.
///
[DataField("layers")]
public List? Layers;
// original colors when rgb was added. Used to revert Colors when removed.
public Color OriginalLightColor;
public Color OriginalItemColor;
public Color OriginalSpriteColor;
public Dictionary? OriginalLayerColors;
}
[Serializable, NetSerializable]
public sealed class RgbLightControllerState : ComponentState
{
public readonly float CycleRate;
public readonly List? Layers;
public RgbLightControllerState(float cycleRate, List? layers)
{
CycleRate = cycleRate;
Layers = layers;
}
}