using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Cargo.Components; [RegisterComponent, AutoGenerateComponentPause] public sealed partial class CargoBountyConsoleComponent : Component { /// /// The id of the label entity spawned by the print label button. /// [DataField("bountyLabelId", customTypeSerializer: typeof(PrototypeIdSerializer))] public string BountyLabelId = "PaperCargoBountyManifest"; /// /// The time at which the console will be able to print a label again. /// [DataField("nextPrintTime", customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan NextPrintTime = TimeSpan.Zero; /// /// The time between prints. /// [DataField("printDelay")] public TimeSpan PrintDelay = TimeSpan.FromSeconds(5); /// /// The sound made when printing occurs /// [DataField("printSound")] public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/printer.ogg"); /// /// The sound made when the bounty is skipped. /// [DataField("skipSound")] public SoundSpecifier SkipSound = new SoundPathSpecifier("/Audio/Effects/Cargo/ping.ogg"); /// /// The sound made when bounty skipping is denied due to lacking access. /// [DataField("denySound")] public SoundSpecifier DenySound = new SoundPathSpecifier("/Audio/Effects/Cargo/buzz_two.ogg"); /// /// The time at which the console will be able to make the denial sound again. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan NextDenySoundTime = TimeSpan.Zero; /// /// The time between playing a denial sound. /// [DataField] public TimeSpan DenySoundDelay = TimeSpan.FromSeconds(2); } [NetSerializable, Serializable] public sealed class CargoBountyConsoleState : BoundUserInterfaceState { public List Bounties; public List History; public TimeSpan UntilNextSkip; public CargoBountyConsoleState(List bounties, List history, TimeSpan untilNextSkip) { Bounties = bounties; History = history; UntilNextSkip = untilNextSkip; } } [Serializable, NetSerializable] public sealed class BountyPrintLabelMessage : BoundUserInterfaceMessage { public string BountyId; public BountyPrintLabelMessage(string bountyId) { BountyId = bountyId; } } [Serializable, NetSerializable] public sealed class BountySkipMessage : BoundUserInterfaceMessage { public string BountyId; public BountySkipMessage(string bountyId) { BountyId = bountyId; } }