using Content.Shared.Containers.ItemSlots;
using Robust.Shared.Audio;
namespace Content.Server.Fax;
[RegisterComponent]
public sealed class FaxMachineComponent : Component
{
///
/// Name with which the fax will be visible to others on the network
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("name")]
public string FaxName { get; set; } = "Unknown";
///
/// Device address of fax in network to which data will be send
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("destinationAddress")]
public string? DestinationFaxAddress { get; set; }
///
/// Contains the item to be sent, assumes it's paper...
///
[DataField("paperSlot", required: true)]
public ItemSlot PaperSlot = new();
///
/// Is fax machine should respond to pings in network
/// This will make it visible to others on the network
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("responsePings")]
public bool ResponsePings { get; set; } = true;
///
/// Should admins be notified on message receive
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("notifyAdmins")]
public bool NotifyAdmins { get; set; } = false;
///
/// Should that fax receive nuke codes send by admins. Probably should be captain fax only
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("receiveNukeCodes")]
public bool ReceiveNukeCodes { get; set; } = false;
///
/// Is fax was emaaged
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("emagged")]
public bool Emagged { get; set; } = false;
///
/// Sound to play when fax has been emagged
///
[DataField("emagSound")]
public SoundSpecifier EmagSound = new SoundCollectionSpecifier("sparks");
///
/// Sound to play when fax printing new message
///
[DataField("printSound")]
public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/printer.ogg");
///
/// Sound to play when fax successfully send message
///
[DataField("sendSound")]
public SoundSpecifier SendSound = new SoundPathSpecifier("/Audio/Machines/high_tech_confirm.ogg");
///
/// Known faxes in network by address with fax names
///
[ViewVariables]
public Dictionary KnownFaxes { get; } = new();
///
/// Print queue of the incoming message
///
[ViewVariables]
[DataField("printingQueue")]
public Queue PrintingQueue { get; } = new();
///
/// Message sending timeout
///
[ViewVariables]
[DataField("sendTimeoutRemaining")]
public float SendTimeoutRemaining;
///
/// Message sending timeout
///
[ViewVariables]
[DataField("sendTimeout")]
public float SendTimeout = 5f;
///
/// Remaining time of inserting animation
///
[DataField("insertingTimeRemaining")]
public float InsertingTimeRemaining;
///
/// How long the inserting animation will play
///
[ViewVariables]
public float InsertionTime = 1.88f; // 0.02 off for correct animation
///
/// Remaining time of printing animation
///
[DataField("printingTimeRemaining")]
public float PrintingTimeRemaining;
///
/// How long the printing animation will play
///
[ViewVariables]
public float PrintingTime = 2.3f;
}
[DataDefinition]
public sealed class FaxPrintout
{
[DataField("name")]
public string Name { get; }
[DataField("content")]
public string Content { get; }
public FaxPrintout(string content, string name)
{
Content = content;
Name = name;
}
}