_uiSystem.SetUiState(ui, new CommunicationsConsoleInterfaceState(
CanAnnounce(comp),
- CanBroadcast(comp),
CanCallOrRecall(comp),
levels,
currentLevel,
return comp.AnnouncementCooldownRemaining <= 0f;
}
- private static bool CanBroadcast(CommunicationsConsoleComponent comp)
- {
- return comp.AnnouncementCooldownRemaining <= 0f;
- }
-
private bool CanUse(EntityUid user, EntityUid console)
{
// This shouldn't technically be possible because of BUI but don't trust client.
public string CurrentAlert;
public float CurrentAlertDelay;
- public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canBroadcast, bool canCall, List<string>? alertLevels, string currentAlert, float currentAlertDelay, TimeSpan? expectedCountdownEnd = null)
+ public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canCall, List<string>? alertLevels, string currentAlert, float currentAlertDelay, TimeSpan? expectedCountdownEnd = null)
{
CanAnnounce = canAnnounce;
- CanBroadcast = canBroadcast;
CanCall = canCall;
ExpectedCountdownEnd = expectedCountdownEnd;
CountdownStarted = expectedCountdownEnd != null;