Files
beck-thompson 3135b2ab3e Fix matchstick prediction issues (#31418)
* First commit

* Minor fixes please ymal error begone

* If this fixes it

* Last chance

* How

* Forgot

* First fixes

* Added correct component tags

* Minor cleanup

* Address review!

* Namespace change

* Fix yaml yelling

* Changes

* Update namespace

* Removed the unneeded files
2025-04-08 23:00:57 +02:00

35 lines
1.2 KiB
C#

using Content.Shared.Smoking;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.IgnitionSource.Components;
[NetworkedComponent, RegisterComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class MatchstickComponent : Component
{
/// <summary>
/// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.
/// </summary>
[DataField, AutoNetworkedField]
public SmokableState State = SmokableState.Unlit;
/// <summary>
/// How long the matchstick will burn for.
/// </summary>
[DataField, AutoNetworkedField]
public TimeSpan Duration = TimeSpan.FromSeconds(10);
/// <summary>
/// The time that the match will burn out. If null, that means the match is unlit.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
public TimeSpan? TimeMatchWillBurnOut;
/// <summary>
/// Sound played when you ignite the matchstick.
/// </summary>
[DataField]
public SoundSpecifier? IgniteSound;
}