Skip to content
Merged
Changes from 1 commit
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>
/// Modify if the player is overriding the Player intercom Speak.
/// </summary>
/// <param name="player">The <see cref="Player"/> who will be change for Intercom Global Override.</param>
/// <param name="newState">Sets a value indicating whether the player will be overide Intercom speaking or not.</param>
/// <returns><see langword="true"/> if player was correctly modified on overide list; otherwise, <see langword="false"/>.</returns>
public static bool TrySetOverride(Player player, bool newState) => GameIntercom.TrySetOverride(player?.ReferenceHub, newState);

/// <summary>
/// Modify if the player is overriding the Player intercom Speak.
/// </summary>
/// <param name="player">Check what <see cref="Player"/> is using Intercom Global Override.</param>
/// <returns><see langword="true"/> if player is in the Override list for using Intercom global, <see langword="false"/>.</returns>
public static bool HasOverride(Player player) => GameIntercom.HasOverride(player?.ReferenceHub);

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