Skip to content

Commit

Permalink
Complete TODOs (#1929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thundermaker300 authored Jul 3, 2023
1 parent f710819 commit 39e1fbd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Exiled.API/Enums/AuthenticationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Exiled.API.Enums
{
using System;

/// <summary>
/// Players authentication types.
/// </summary>
Expand All @@ -31,6 +33,7 @@ public enum AuthenticationType
/// <summary>
/// Indicates that the player has been authenticated as a Patreon.
/// </summary>
[Obsolete("Value is unused.")]
Patreon, // TODO: Removing this it's have never exist

/// <summary>
Expand Down
16 changes: 14 additions & 2 deletions Exiled.API/Features/Cassie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.API.Features
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -110,8 +111,19 @@ public static void DelayedGlitchyMessage(string message, float delay, float glit
/// <param name="message">The message, which duration will be calculated.</param>
/// <param name="rawNumber">Determines if a number won't be converted to its full pronunciation.</param>
/// <returns>Duration (in seconds) of specified message.</returns>
public static float CalculateDuration(string message, bool rawNumber = false) // TODO: Add Speed property
=> Announcer.CalculateDuration(message, rawNumber);
[Obsolete("Use CalculateDuration(string, bool, float)")]
public static float CalculateDuration(string message, bool rawNumber = false)
=> CalculateDuration(message, rawNumber, 1f);

/// <summary>
/// Calculates the duration of a C.A.S.S.I.E message.
/// </summary>
/// <param name="message">The message, which duration will be calculated.</param>
/// <param name="rawNumber">Determines if a number won't be converted to its full pronunciation.</param>
/// <param name="speed">The speed of the message.</param>
/// <returns>Duration (in seconds) of specified message.</returns>
public static float CalculateDuration(string message, bool rawNumber = false, float speed = 1f)
=> Announcer.CalculateDuration(message, rawNumber, speed);

/// <summary>
/// Converts a <see cref="Team"/> into a Cassie-Readable <c>CONTAINMENTUNIT</c>.
Expand Down
1 change: 0 additions & 1 deletion Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ public AuthenticationType AuthenticationType
"steam" => AuthenticationType.Steam,
"discord" => AuthenticationType.Discord,
"northwood" => AuthenticationType.Northwood,
"patreon" => AuthenticationType.Patreon,
_ => AuthenticationType.Unknown,
};
}
Expand Down

0 comments on commit 39e1fbd

Please sign in to comment.