2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Smoking;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-08-18 23:17:47 +02:00
|
|
|
using Content.Server.Light.EntitySystems;
|
2021-01-11 00:17:28 +01:00
|
|
|
using Robust.Server.GameObjects;
|
2021-08-18 23:17:47 +02:00
|
|
|
using Robust.Shared.Analyzers;
|
2021-01-11 00:17:28 +01:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-01-11 00:17:28 +01:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Light.Components
|
2021-01-11 00:17:28 +01:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2021-08-18 23:17:47 +02:00
|
|
|
[Friend(typeof(MatchstickSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MatchstickComponent : Component
|
2021-01-11 00:17:28 +01:00
|
|
|
{
|
2021-08-18 23:17:47 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
2021-09-26 15:19:00 +02:00
|
|
|
public SmokableState CurrentState = SmokableState.Unlit;
|
2021-01-11 00:17:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long will matchstick last in seconds.
|
|
|
|
|
/// </summary>
|
2021-07-31 19:52:33 +02:00
|
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
|
|
|
|
[DataField("duration")]
|
2021-08-18 23:17:47 +02:00
|
|
|
public int Duration = 10;
|
2021-01-11 00:17:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when you ignite the matchstick.
|
|
|
|
|
/// </summary>
|
2021-08-18 23:17:47 +02:00
|
|
|
[DataField("igniteSound", required: true)] public SoundSpecifier IgniteSound = default!;
|
2021-01-11 00:17:28 +01:00
|
|
|
}
|
2021-02-04 17:44:49 +01:00
|
|
|
}
|