using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared._NF.CrateMachine.Components;
[RegisterComponent]
[NetworkedComponent]
[Access(typeof(SharedCrateMachineSystem))]
public sealed partial class CrateMachineComponent: Component
{
///
/// Used by the animation code to determine whether the next action is opening or closing
///
[NonSerialized]
public bool DidTakeCrate = true;
///
/// Sounds played when the door is opening and crate coming out.
///
[ViewVariables]
public SoundSpecifier? OpeningSound = new SoundPathSpecifier("/Audio/Machines/disposalflush.ogg");
///
/// Sounds played when the door is closing
///
[ViewVariables]
public SoundSpecifier? ClosingSound = new SoundPathSpecifier("/Audio/Machines/disposalflush.ogg");
[DataField]
public string CratePrototype = "CrateGenericSteel";
///
/// How long the opening animation will play
///
[NonSerialized]
public float OpeningTime = 3.2f;
///
/// How long the closing animation will play
///
[NonSerialized]
public float ClosingTime = 3.2f;
///
/// Remaining time of opening animation
///
[NonSerialized]
public float OpeningTimeRemaining;
///
/// Remaining time of closing animation
///
[NonSerialized]
public float ClosingTimeRemaining;
#region Graphics
///
/// The sprite state used to animate the airlock frame when the airlock opens
///
[DataField]
public string OpeningSpriteState = "opening";
///
/// The sprite state used to animate the airlock frame when the airlock closes.
///
[DataField]
public string ClosingSpriteState = "closing";
///
/// The sprite state used to animate the crate going up.
///
[DataField]
public string CrateSpriteState = "crate";
///
/// The sprite state used for the open airlock lights.
///
[DataField]
public string OpenSpriteState = "open";
///
/// The sprite state used for the closed airlock.
///
[DataField]
public string ClosedSpriteState = "opening";
#endregion
}