using Content.Shared.Smoking;
using Content.Shared.Sound;
using Content.Shared.Temperature;
using Content.Server.Items;
using Content.Server.Light.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Light.Components
{
[RegisterComponent]
[ComponentReference(typeof(IHotItem))]
[Friend(typeof(MatchstickSystem))]
public class MatchstickComponent : Component, IHotItem
{
public override string Name => "Matchstick";
///
/// Current state to matchstick. Can be Unlit, Lit or Burnt.
///
[ViewVariables]
public SharedBurningStates CurrentState = SharedBurningStates.Unlit;
///
/// How long will matchstick last in seconds.
///
[ViewVariables(VVAccess.ReadOnly)]
[DataField("duration")]
public int Duration = 10;
///
/// Sound played when you ignite the matchstick.
///
[DataField("igniteSound", required: true)] public SoundSpecifier IgniteSound = default!;
///
/// Point light component. Gives matches a glow in dark effect.
///
[ComponentDependency]
public readonly PointLightComponent? PointLightComponent = default!;
bool IHotItem.IsCurrentlyHot()
{
return CurrentState == SharedBurningStates.Lit;
}
}
}