Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions EXILED/Exiled.API/Features/Intercom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ public static float SpeechRemainingTime
/// <param name="isStarting">Sets a value indicating whether the sound is the intercom's start speaking sound.</param>
public static void PlaySound(bool isStarting) => GameIntercom._singleton.RpcPlayClip(isStarting);

/// <summary>
/// Modifies whether the player is overriding the intercom to speak globally.
/// </summary>
/// <param name="player">The <see cref="Player"/> whose intercom override state will be changed.</param>
/// <param name="newState">Indicates whether the player should be given the global intercom override.</param>
/// <returns><see langword="true"/> if the player was successfully added or removed from the override list; otherwise, <see langword="false"/>.</returns>
public static bool TrySetOverride(Player player, bool newState) => GameIntercom.TrySetOverride(player?.ReferenceHub, newState);

/// <summary>
/// Checks whether the player is currently overriding the intercom to speak globally.
/// </summary>
/// <param name="player">The <see cref="Player"/> to check for a global intercom override.</param>
/// <returns><see langword="true"/> if the player has global intercom override; otherwise, <see langword="false"/>.</returns>
public static bool HasOverride(Player player) => GameIntercom.HasOverride(player?.ReferenceHub);

/// <summary>
/// Reset the intercom's cooldown.
/// </summary>
Expand Down
Loading