2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.UserInterface;
|
|
|
|
|
using Content.Shared.Communications;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Server.GameObjects;
|
2020-04-09 00:28:56 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Communications
|
2020-04-09 00:28:56 +02:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2022-06-03 21:37:35 +10:00
|
|
|
public sealed class CommunicationsConsoleComponent : SharedCommunicationsConsoleComponent
|
2020-04-09 00:28:56 +02:00
|
|
|
{
|
2022-07-01 13:40:36 -07:00
|
|
|
public float UIUpdateAccumulator = 0f;
|
|
|
|
|
|
2022-06-03 21:37:35 +10:00
|
|
|
/// <summary>
|
|
|
|
|
/// Remaining cooldown between making announcements.
|
|
|
|
|
/// </summary>
|
2022-06-04 19:09:04 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-06-03 21:37:35 +10:00
|
|
|
public float AnnouncementCooldownRemaining;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fluent ID for the announcement title
|
|
|
|
|
/// If a Fluent ID isn't found, just uses the raw string
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("title", required: true)]
|
|
|
|
|
public string AnnouncementDisplayName = "comms-console-announcement-title-station";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Announcement color
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("color")]
|
|
|
|
|
public Color AnnouncementColor = Color.Gold;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Time in seconds between announcement delays on a per-console basis
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("delay")]
|
|
|
|
|
public int DelayBetweenAnnouncements = 90;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Can call or recall the shuttle
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("canShuttle")]
|
|
|
|
|
public bool CanCallShuttle = true;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Announce on all grids (for nukies)
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("global")]
|
|
|
|
|
public bool AnnounceGlobal = false;
|
|
|
|
|
|
|
|
|
|
public BoundUserInterface? UserInterface => Owner.GetUIOrNull(CommunicationsConsoleUiKey.Key);
|
2020-04-09 00:28:56 +02:00
|
|
|
}
|
|
|
|
|
}
|