using Content.Shared.Materials;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Construction.Components;
///
/// This is used for a machine that creates flatpacks at the cost of materials
///
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedFlatpackSystem))]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class FlatpackCreatorComponent : Component
{
///
/// Whether or not packing is occuring
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public bool Packing;
///
/// The time at which packing ends
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
[AutoPausedField]
public TimeSpan PackEndTime;
///
/// How long packing lasts.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan PackDuration = TimeSpan.FromSeconds(3);
///
/// The prototype used when spawning a flatpack.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntProtoId BaseFlatpackPrototype = "BaseFlatpack";
///
/// A default cost applied to all flatpacks outside of the cost of constructing the machine.
/// This one is applied to machines specifically.
///
[DataField]
public Dictionary, int> BaseMachineCost = new();
///
/// A default cost applied to all flatpacks outside of the cost of constructing the machine.
/// This one is applied to computers specifically.
///
[DataField]
public Dictionary, int> BaseComputerCost = new();
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string SlotId = "board_slot";
}
[Serializable, NetSerializable]
public enum FlatpackCreatorUIKey : byte
{
Key
}
[Serializable, NetSerializable]
public enum FlatpackCreatorVisuals : byte
{
Packing
}
[Serializable, NetSerializable]
public sealed class FlatpackCreatorStartPackBuiMessage : BoundUserInterfaceMessage
{
}