diff --git a/Patches/PingTrackerPatch.cs b/Patches/PingTrackerPatch.cs index af80add..f6430a2 100644 --- a/Patches/PingTrackerPatch.cs +++ b/Patches/PingTrackerPatch.cs @@ -23,7 +23,7 @@ public class PingTrackerPatch StringBuilder sb = new StringBuilder(); sb.AppendFormat("PING: {0}\n", GetPingColor(AmongUsClient.Instance.Ping)); - sb.Append($"BetterAmongUs {Main.GetVersionText()}\n"); + sb.Append($"BetterAmongUs {Main.GetVersionText(true)}\n"); sb.AppendFormat("{0}\n", Main.Github); if (Main.BetterHost.Value && GameStates.IsHost) diff --git a/main.cs b/main.cs index be15145..0b6e90d 100644 --- a/main.cs +++ b/main.cs @@ -22,20 +22,31 @@ public class Main : BasePlugin { public const ReleaseTypes ReleaseBuildType = ReleaseTypes.Canary; public const string CanaryNum = "3"; + public const string HotfixNum = "1"; + public const bool IsHotFix = true; public const string PluginGuid = "com.d1gq.betteramongus"; public const string PluginVersion = "1.0.0"; public const string ReleaseDate = "07.29.2024"; // dd/mm/yyyy public const string Github = "https://github.com/D1GQ/BetterAmongUs"; public const string Discord = "https://discord.gg/"; - public static string GetVersionText() + public static string GetVersionText(bool newLine = false) { + string text = string.Empty; + + string newLineText = newLine ? "\n" : " "; + if (ReleaseBuildType == ReleaseTypes.Release) - return $"v{BetterAmongUsVersion}"; + text = $"v{BetterAmongUsVersion}"; else if (ReleaseBuildType == ReleaseTypes.Canary) - return $"v{BetterAmongUsVersion} Canary {Main.CanaryNum}"; + text = $"v{BetterAmongUsVersion}{newLineText}Canary {Main.CanaryNum}"; else if (Main.ReleaseBuildType == ReleaseTypes.Dev) - return $"v{BetterAmongUsVersion} Dev {Main.ReleaseDate}"; + text = $"v{BetterAmongUsVersion}{newLineText}Dev {Main.ReleaseDate}"; + + if (IsHotFix) + text += $" Hotfix {HotfixNum}"; + + return text; } public Harmony Harmony { get; } = new Harmony(PluginGuid);