6
2025-12-13 13:46:17 +03:00

37 lines
1.0 KiB
C#

using Content.Shared.Light.EntitySystems;
using Content.Shared.Storage;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
namespace Content.Server.Light.Components;
/// <summary>
/// Device that allows user to quikly change bulbs in <see cref="PoweredLightComponent"/>
/// Can be reloaded by new light tubes or light bulbs
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedLightReplacerSystem))]
public sealed partial class LightReplacerComponent : Component
{
[DataField("sound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Weapons/click.ogg")
{
Params = new()
{
Volume = -4f
}
};
/// <summary>
/// Bulbs that were inserted inside light replacer
/// </summary>
[ViewVariables]
public Container InsertedBulbs = default!;
/// <summary>
/// The default starting bulbs
/// </summary>
[DataField("contents")]
public List<EntitySpawnEntry> Contents = new();
}