using Content.Shared.Light;
using Content.Shared.Sound;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Light.Components
{
///
/// Device that allows user to quikly change bulbs in
/// Can be reloaded by new light tubes or light bulbs
///
[RegisterComponent]
public sealed class LightReplacerComponent : Component
{
[DataField("sound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Weapons/click.ogg");
///
/// Bulbs that were inside light replacer when it spawned
///
[DataField("contents")]
public List Contents = new();
///
/// Bulbs that were inserted inside light replacer
///
[ViewVariables]
public IContainer InsertedBulbs = default!;
[Serializable]
[DataDefinition]
public sealed class LightReplacerEntity
{
[DataField("name", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string PrototypeName = default!;
[DataField("amount")]
public int Amount;
[DataField("type")]
public LightBulbType Type;
}
}
}