1
0

LightReplacerComponent.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Content.Shared.Light.EntitySystems;
  2. using Content.Shared.Storage;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Containers;
  5. using Robust.Shared.GameStates;
  6. namespace Content.Server.Light.Components;
  7. /// <summary>
  8. /// Device that allows user to quikly change bulbs in <see cref="PoweredLightComponent"/>
  9. /// Can be reloaded by new light tubes or light bulbs
  10. /// </summary>
  11. [RegisterComponent, NetworkedComponent, Access(typeof(SharedLightReplacerSystem))]
  12. public sealed partial class LightReplacerComponent : Component
  13. {
  14. [DataField("sound")]
  15. public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Weapons/click.ogg")
  16. {
  17. Params = new()
  18. {
  19. Volume = -4f
  20. }
  21. };
  22. /// <summary>
  23. /// Bulbs that were inserted inside light replacer
  24. /// </summary>
  25. [ViewVariables]
  26. public Container InsertedBulbs = default!;
  27. /// <summary>
  28. /// The default starting bulbs
  29. /// </summary>
  30. [DataField("contents")]
  31. public List<EntitySpawnEntry> Contents = new();
  32. }