using Content.Server.UserInterface;
using Content.Shared.Communications;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
namespace Content.Server.Communications
{
[RegisterComponent]
public sealed class CommunicationsConsoleComponent : SharedCommunicationsConsoleComponent
{
public float UIUpdateAccumulator = 0f;
///
/// Remaining cooldown between making announcements.
///
[ViewVariables(VVAccess.ReadWrite)]
public float AnnouncementCooldownRemaining;
///
/// Fluent ID for the announcement title
/// If a Fluent ID isn't found, just uses the raw string
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("title", required: true)]
public string AnnouncementDisplayName = "comms-console-announcement-title-station";
///
/// Announcement color
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("color")]
public Color AnnouncementColor = Color.Gold;
///
/// Time in seconds between announcement delays on a per-console basis
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("delay")]
public int DelayBetweenAnnouncements = 90;
///
/// Can call or recall the shuttle
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canShuttle")]
public bool CanCallShuttle = true;
///
/// Announce on all grids (for nukies)
///
[DataField("global")]
public bool AnnounceGlobal = false;
///
/// Announce sound file path
///
[DataField("sound")]
public SoundSpecifier AnnouncementSound = new SoundPathSpecifier("/Audio/Announcements/announce.ogg");
public BoundUserInterface? UserInterface => Owner.GetUIOrNull(CommunicationsConsoleUiKey.Key);
}
}