MatchstickComponent.cs 941 B

1234567891011121314151617181920212223242526272829
  1. using Content.Server.Light.EntitySystems;
  2. using Content.Shared.Smoking;
  3. using Robust.Shared.Audio;
  4. namespace Content.Server.Light.Components
  5. {
  6. [RegisterComponent]
  7. [Access(typeof(MatchstickSystem))]
  8. public sealed partial class MatchstickComponent : Component
  9. {
  10. /// <summary>
  11. /// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.
  12. /// </summary>
  13. [DataField("state")]
  14. public SmokableState CurrentState = SmokableState.Unlit;
  15. /// <summary>
  16. /// How long will matchstick last in seconds.
  17. /// </summary>
  18. [ViewVariables(VVAccess.ReadOnly)]
  19. [DataField("duration")]
  20. public int Duration = 10;
  21. /// <summary>
  22. /// Sound played when you ignite the matchstick.
  23. /// </summary>
  24. [DataField("igniteSound", required: true)] public SoundSpecifier IgniteSound = default!;
  25. }
  26. }