From b5a5fcaeb84efe0f1ac3f2a135bef502c02306b2 Mon Sep 17 00:00:00 2001 From: ZypherusKhan Date: Wed, 10 Dec 2025 19:33:15 +0530 Subject: [PATCH] Fix ugly SoloPVP stuff (#429) * FIx SoloPVP Mess * Fix SoloPVP Strings and update identifiers. * Oops --- CTA/CustomTeamAssigner/CustomRoles.cs | 2 +- CTA/CustomTeamAssigner/Utils.cs | 2 +- CustomRoles.cs | 2 +- GameMode/SoloPVP.cs | 88 +++++++++++++-------------- Main.cs | 2 +- Modules/CustomRoleSelector.cs | 2 +- Modules/CustomRolesHelper.cs | 6 +- Modules/ExtendedPlayerControl.cs | 4 +- Modules/GuessManager.cs | 2 +- Patches/GameStartManagerPatch.cs | 2 +- Patches/HudPatch.cs | 4 +- Patches/IntroPatch.cs | 4 +- Resources/Lang/en_US.json | 44 +++++++------- 13 files changed, 81 insertions(+), 83 deletions(-) diff --git a/CTA/CustomTeamAssigner/CustomRoles.cs b/CTA/CustomTeamAssigner/CustomRoles.cs index 12e92d2e5..dee131399 100644 --- a/CTA/CustomTeamAssigner/CustomRoles.cs +++ b/CTA/CustomTeamAssigner/CustomRoles.cs @@ -424,7 +424,7 @@ public enum CustomRoles Wyrd, // Solo Kombat - KB_Normal, + SoloPVP_Player, // FFA Killer, diff --git a/CTA/CustomTeamAssigner/Utils.cs b/CTA/CustomTeamAssigner/Utils.cs index 998027246..ceb469878 100644 --- a/CTA/CustomTeamAssigner/Utils.cs +++ b/CTA/CustomTeamAssigner/Utils.cs @@ -74,7 +74,7 @@ namespace CustomTeamAssigner return list; } - public static IEnumerable GetAllValidRoles() => Enum.GetValues().Where(x => !Teams.Any(t => t.TeamMembers.Contains(x)) && !x.ToString().Contains("EHR") && x < CustomRoles.NotAssigned && x is not (CustomRoles.KB_Normal or CustomRoles.Killer or CustomRoles.Tasker or CustomRoles.Potato or CustomRoles.Runner or CustomRoles.CTFPlayer or CustomRoles.NDPlayer or CustomRoles.Hider or CustomRoles.Seeker or CustomRoles.Fox or CustomRoles.Troll or CustomRoles.Jet or CustomRoles.Detector or CustomRoles.Jumper or CustomRoles.Venter or CustomRoles.Locator or CustomRoles.Agent or CustomRoles.Dasher or CustomRoles.GM or CustomRoles.Convict or CustomRoles.Impostor or CustomRoles.Shapeshifter or CustomRoles.Crewmate or CustomRoles.Engineer or CustomRoles.Scientist or CustomRoles.GuardianAngel or CustomRoles.Phantom or CustomRoles.Tracker or CustomRoles.Noisemaker)); + public static IEnumerable GetAllValidRoles() => Enum.GetValues().Where(x => !Teams.Any(t => t.TeamMembers.Contains(x)) && !x.ToString().Contains("EHR") && x < CustomRoles.NotAssigned && x is not (CustomRoles.SoloPVP_Player or CustomRoles.Killer or CustomRoles.Tasker or CustomRoles.Potato or CustomRoles.Runner or CustomRoles.CTFPlayer or CustomRoles.NDPlayer or CustomRoles.Hider or CustomRoles.Seeker or CustomRoles.Fox or CustomRoles.Troll or CustomRoles.Jet or CustomRoles.Detector or CustomRoles.Jumper or CustomRoles.Venter or CustomRoles.Locator or CustomRoles.Agent or CustomRoles.Dasher or CustomRoles.GM or CustomRoles.Convict or CustomRoles.Impostor or CustomRoles.Shapeshifter or CustomRoles.Crewmate or CustomRoles.Engineer or CustomRoles.Scientist or CustomRoles.GuardianAngel or CustomRoles.Phantom or CustomRoles.Tracker or CustomRoles.Noisemaker)); public static string GetActualRoleName(CustomRoles role) { diff --git a/CustomRoles.cs b/CustomRoles.cs index c6817a625..5eefa4172 100644 --- a/CustomRoles.cs +++ b/CustomRoles.cs @@ -425,7 +425,7 @@ public enum CustomRoles Wyrd, // Solo Kombat - KB_Normal, + SoloPVP_Player, // FFA Killer, diff --git a/GameMode/SoloPVP.cs b/GameMode/SoloPVP.cs index 66dc6e120..db9fa8865 100644 --- a/GameMode/SoloPVP.cs +++ b/GameMode/SoloPVP.cs @@ -16,7 +16,7 @@ internal static class SoloPVP public static Dictionary PlayerATK = []; public static Dictionary PlayerDF = []; - public static Dictionary KBScore = []; + public static Dictionary PlayerScore = []; public static int RoundTime; private static readonly Dictionary NameNotify = []; @@ -25,7 +25,7 @@ internal static class SoloPVP private static Dictionary LastHurt = []; private static Dictionary LastCountdownTime = []; - public static bool CanVent => KB_CanVent.GetBool(); + public static bool CanVent => SoloPVP_CanVent.GetBool(); public static bool SoloAlive(this PlayerControl pc) { @@ -34,48 +34,48 @@ internal static class SoloPVP public static void SetupCustomOption() { - KB_GameTime = new IntegerOptionItem(66_233_001, "KB_GameTime", new(30, 300, 5), 180, TabGroup.GameSettings) + SoloPVP_GameTime = new IntegerOptionItem(66_233_001, "SoloPVP_GameTime", new(30, 300, 5), 180, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Seconds) .SetHeader(true); - KB_ATKCooldown = new FloatOptionItem(66_223_008, "KB_ATKCooldown", new(1f, 10f, 0.1f), 1f, TabGroup.GameSettings) + SoloPVP_ATKCooldown = new FloatOptionItem(66_223_008, "SoloPVP_ATKCooldown", new(1f, 10f, 0.1f), 1f, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Seconds); - KB_HPMax = new FloatOptionItem(66_233_002, "KB_HPMax", new(10f, 990f, 5f), 100f, TabGroup.GameSettings) + SoloPVP_HPMax = new FloatOptionItem(66_233_002, "SoloPVP_HPMax", new(10f, 990f, 5f), 100f, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Health); - KB_ATK = new FloatOptionItem(66_233_003, "KB_ATK", new(1f, 100f, 1f), 8f, TabGroup.GameSettings) + SoloPVP_ATK = new FloatOptionItem(66_233_003, "SoloPVP_ATK", new(1f, 100f, 1f), 8f, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Health); - KB_RecoverPerSecond = new FloatOptionItem(66_233_005, "KB_RecoverPerSecond", new(1f, 180f, 1f), 2f, TabGroup.GameSettings) + SoloPVP_RecoverPerSecond = new FloatOptionItem(66_233_005, "SoloPVP_RecoverPerSecond", new(1f, 180f, 1f), 2f, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Health); - KB_RecoverAfterSecond = new IntegerOptionItem(66_233_004, "KB_RecoverAfterSecond", new(0, 60, 1), 8, TabGroup.GameSettings) + SoloPVP_RecoverAfterSecond = new IntegerOptionItem(66_233_004, "SoloPVP_RecoverAfterSecond", new(0, 60, 1), 8, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Seconds); - KB_ResurrectionWaitingTime = new IntegerOptionItem(66_233_006, "KB_ResurrectionWaitingTime", new(3, 990, 1), 15, TabGroup.GameSettings) + SoloPVP_ResurrectionWaitingTime = new IntegerOptionItem(66_233_006, "SoloPVP_ResurrectionWaitingTime", new(3, 990, 1), 15, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Seconds); - KB_KillBonusMultiplier = new FloatOptionItem(66_233_007, "KB_KillBonusMultiplier", new(0.25f, 5f, 0.25f), 1.25f, TabGroup.GameSettings) + SoloPVP_KillBonusMultiplier = new FloatOptionItem(66_233_007, "SoloPVP_KillBonusMultiplier", new(0.25f, 5f, 0.25f), 1.25f, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)) .SetValueFormat(OptionFormat.Multiplier); - KB_CanVent = new BooleanOptionItem(66_233_009, "KB_CanVent", true, TabGroup.GameSettings) + SoloPVP_CanVent = new BooleanOptionItem(66_233_009, "SoloPVP_CanVent", true, TabGroup.GameSettings) .SetGameMode(CustomGameMode.SoloPVP) .SetColor(new Color32(245, 82, 82, byte.MaxValue)); } @@ -93,19 +93,19 @@ internal static class SoloPVP LastHurt = []; LastCountdownTime = []; BackCountdown = []; - KBScore = []; - RoundTime = KB_GameTime.GetInt() + 8; + PlayerScore = []; + RoundTime = SoloPVP_GameTime.GetInt() + 8; Utils.SendRPC(CustomRPC.SoloPVPSync, 1, RoundTime); foreach (PlayerControl pc in Main.AllAlivePlayerControls) { - PlayerHPMax.TryAdd(pc.PlayerId, KB_HPMax.GetFloat()); - PlayerHP.TryAdd(pc.PlayerId, KB_HPMax.GetFloat()); - PlayerHPReco.TryAdd(pc.PlayerId, KB_RecoverPerSecond.GetFloat()); - PlayerATK.TryAdd(pc.PlayerId, KB_ATK.GetFloat()); + PlayerHPMax.TryAdd(pc.PlayerId, SoloPVP_HPMax.GetFloat()); + PlayerHP.TryAdd(pc.PlayerId, SoloPVP_HPMax.GetFloat()); + PlayerHPReco.TryAdd(pc.PlayerId, SoloPVP_RecoverPerSecond.GetFloat()); + PlayerATK.TryAdd(pc.PlayerId, SoloPVP_ATK.GetFloat()); PlayerDF.TryAdd(pc.PlayerId, 0f); - KBScore.TryAdd(pc.PlayerId, 0); + PlayerScore.TryAdd(pc.PlayerId, 0); Utils.SendRPC(CustomRPC.SoloPVPSync, 2, pc.PlayerId, 0); LastHurt.TryAdd(pc.PlayerId, Utils.TimeStamp); @@ -154,17 +154,17 @@ internal static class SoloPVP if (rank != 1) { byte first = Main.PlayerStates.Keys.MinBy(GetRankFromScore); - finalText += $"\n1. {first.ColoredPlayerName()} - {string.Format(Translator.GetString("KillCount").TrimStart(' '), KBScore.GetValueOrDefault(first, 0))}"; + finalText += $"\n1. {first.ColoredPlayerName()} - {string.Format(Translator.GetString("KillCount").TrimStart(' '), PlayerScore.GetValueOrDefault(first, 0))}"; } - finalText += $"\n{rank}. {pc.PlayerId.ColoredPlayerName()} - {string.Format(Translator.GetString("KillCount").TrimStart(' '), KBScore.GetValueOrDefault(pc.PlayerId, 0))}"; + finalText += $"\n{rank}. {pc.PlayerId.ColoredPlayerName()} - {string.Format(Translator.GetString("KillCount").TrimStart(' '), PlayerScore.GetValueOrDefault(pc.PlayerId, 0))}"; return $"<#ffffff>{finalText}"; } public static string GetSummaryStatistics(byte id) { int rank = GetRankFromScore(id); - int score = KBScore.GetValueOrDefault(id, 0); + int score = PlayerScore.GetValueOrDefault(id, 0); return string.Format(Translator.GetString("SoloPVP.Summary"), rank, score); } @@ -174,7 +174,7 @@ internal static class SoloPVP if (BackCountdown.TryGetValue(player.PlayerId, out int value)) { - name = string.Format(Translator.GetString("KBBackCountDown"), value); + name = string.Format(Translator.GetString("SoloPVP_BackCountDown"), value); NameNotify.Remove(player.PlayerId); return; } @@ -187,9 +187,9 @@ internal static class SoloPVP { try { - int ms = KBScore[playerId]; - int rank = 1 + KBScore.Values.Count(x => x > ms); - rank += KBScore.Where(x => x.Value == ms).Select(x => x.Key).ToList().IndexOf(playerId); + int ms = PlayerScore[playerId]; + int rank = 1 + PlayerScore.Values.Count(x => x > ms); + rank += PlayerScore.Where(x => x.Value == ms).Select(x => x.Key).ToList().IndexOf(playerId); return rank; } catch { return Main.AllPlayerControls.Length; } @@ -222,7 +222,7 @@ internal static class SoloPVP LastHurt[target.PlayerId] = Utils.TimeStamp; - float kcd = KB_ATKCooldown.GetFloat(); + float kcd = SoloPVP_ATKCooldown.GetFloat(); if (killer.IsHost()) kcd += Math.Max(0.5f, Utils.CalculatePingDelay()); killer.SetKillCooldown(kcd, target); @@ -246,7 +246,7 @@ internal static class SoloPVP private static System.Collections.IEnumerator OnPlayerDead(PlayerControl target) { - BackCountdown.TryAdd(target.PlayerId, KB_ResurrectionWaitingTime.GetInt()); + BackCountdown.TryAdd(target.PlayerId, SoloPVP_ResurrectionWaitingTime.GetInt()); if (target.inVent || target.MyPhysics.Animations.IsPlayingEnterVentAnimation()) LateTask.New(() => target.MyPhysics.RpcExitVent(target.GetClosestVent().Id), 0.6f, log: false); while (target.inVent || target.inMovingPlat || target.onLadder || target.MyPhysics.Animations.IsPlayingAnyLadderAnimation() || target.MyPhysics.Animations.IsPlayingEnterVentAnimation()) yield return null; if (BackCountdown.ContainsKey(target.PlayerId)) target.ExileTemporarily(); @@ -258,11 +258,11 @@ internal static class SoloPVP if (Main.GM.Value && AmongUsClient.Instance.AmHost) PlayerControl.LocalPlayer.KillFlash(); ChatCommands.Spectators.ToValidPlayers().Do(x => x.KillFlash()); - KBScore[killer.PlayerId]++; - Utils.SendRPC(CustomRPC.SoloPVPSync, 2, killer.PlayerId, KBScore[killer.PlayerId]); + PlayerScore[killer.PlayerId]++; + Utils.SendRPC(CustomRPC.SoloPVPSync, 2, killer.PlayerId, PlayerScore[killer.PlayerId]); float addRate = IRandom.Instance.Next(3, 5 + GetRankFromScore(killer.PlayerId)) / 100f; - addRate *= KB_KillBonusMultiplier.GetFloat(); + addRate *= SoloPVP_KillBonusMultiplier.GetFloat(); if (killer.IsHost()) addRate /= 2f; var text = string.Empty; @@ -273,22 +273,22 @@ internal static class SoloPVP case 0: addin = PlayerHPMax[killer.PlayerId] * addRate; PlayerHPMax[killer.PlayerId] += addin; - text = string.Format(Translator.GetString("KB_Buff_HPMax"), addin.ToString("0.0#####")); + text = string.Format(Translator.GetString("SoloPVP_Buff_HPMax"), addin.ToString("0.0#####")); break; case 1: addin = PlayerHPReco[killer.PlayerId] * addRate * 2; PlayerHPReco[killer.PlayerId] += addin; - text = string.Format(Translator.GetString("KB_Buff_HPReco"), addin.ToString("0.0#####")); + text = string.Format(Translator.GetString("SoloPVP_Buff_HPReco"), addin.ToString("0.0#####")); break; case 2: addin = PlayerATK[killer.PlayerId] * addRate; PlayerATK[killer.PlayerId] += addin; - text = string.Format(Translator.GetString("KB_Buff_ATK"), addin.ToString("0.0#####")); + text = string.Format(Translator.GetString("SoloPVP_Buff_ATK"), addin.ToString("0.0#####")); break; case 3: addin = Math.Max(PlayerDF[killer.PlayerId], 1f) * addRate * 8; PlayerDF[killer.PlayerId] += addin; - text = string.Format(Translator.GetString("KB_Buff_DF"), addin.ToString("0.0#####")); + text = string.Format(Translator.GetString("SoloPVP_Buff_DF"), addin.ToString("0.0#####")); break; } @@ -309,7 +309,7 @@ internal static class SoloPVP if (LastCountdownTime[id] == now) return; LastCountdownTime[id] = now; - if (LastHurt[id] + KB_RecoverAfterSecond.GetInt() < now && PlayerHP[id] < PlayerHPMax[id] && __instance.SoloAlive() && !__instance.inVent) + if (LastHurt[id] + SoloPVP_RecoverAfterSecond.GetInt() < now && PlayerHP[id] < PlayerHPMax[id] && __instance.SoloAlive() && !__instance.inVent) { PlayerHP[id] += PlayerHPReco[id]; PlayerHP[id] = Math.Min(PlayerHPMax[id], PlayerHP[id]); @@ -337,15 +337,15 @@ internal static class SoloPVP // Options // ReSharper disable InconsistentNaming - public static OptionItem KB_GameTime; - public static OptionItem KB_ATKCooldown; - private static OptionItem KB_HPMax; - private static OptionItem KB_ATK; - private static OptionItem KB_RecoverAfterSecond; - private static OptionItem KB_RecoverPerSecond; - private static OptionItem KB_ResurrectionWaitingTime; - private static OptionItem KB_KillBonusMultiplier; - private static OptionItem KB_CanVent; + public static OptionItem SoloPVP_GameTime; + public static OptionItem SoloPVP_ATKCooldown; + private static OptionItem SoloPVP_HPMax; + private static OptionItem SoloPVP_ATK; + private static OptionItem SoloPVP_RecoverAfterSecond; + private static OptionItem SoloPVP_RecoverPerSecond; + private static OptionItem SoloPVP_ResurrectionWaitingTime; + private static OptionItem SoloPVP_KillBonusMultiplier; + private static OptionItem SoloPVP_CanVent; // ReSharper restore InconsistentNaming } diff --git a/Main.cs b/Main.cs index 81995c055..0981dc5c2 100644 --- a/Main.cs +++ b/Main.cs @@ -751,7 +751,7 @@ public class Main : BasePlugin { CustomRoles.Underdog, "#ff1919" }, // Solo PVP - { CustomRoles.KB_Normal, "#f55252" }, + { CustomRoles.SoloPVP_Player, "#f55252" }, // FFA { CustomRoles.Killer, "#00ffff" }, // Stop And Go diff --git a/Modules/CustomRoleSelector.cs b/Modules/CustomRoleSelector.cs index b75a12fb0..c42ffb29d 100644 --- a/Modules/CustomRoleSelector.cs +++ b/Modules/CustomRoleSelector.cs @@ -23,7 +23,7 @@ internal static class CustomRoleSelector public static readonly Dictionary GameModeRoles = new() { - { CustomGameMode.SoloPVP, CustomRoles.KB_Normal }, + { CustomGameMode.SoloPVP, CustomRoles.SoloPVPNormal }, { CustomGameMode.FFA, CustomRoles.Killer }, { CustomGameMode.StopAndGo, CustomRoles.Tasker }, { CustomGameMode.HotPotato, CustomRoles.Potato }, diff --git a/Modules/CustomRolesHelper.cs b/Modules/CustomRolesHelper.cs index cda258b02..9879f8e31 100644 --- a/Modules/CustomRolesHelper.cs +++ b/Modules/CustomRolesHelper.cs @@ -60,7 +60,7 @@ internal static class CustomRolesHelper public static bool IsForOtherGameMode(this CustomRoles role) { return CustomHnS.AllHnSRoles.Contains(role) || role is - CustomRoles.KB_Normal or + CustomRoles.SoloPVP_Player or CustomRoles.Killer or CustomRoles.Tasker or CustomRoles.Potato or @@ -460,7 +460,7 @@ internal static class CustomRolesHelper return role switch { // Solo PVP - CustomRoles.KB_Normal => RoleTypes.Impostor, + CustomRoles.SoloPVP_Player => RoleTypes.Impostor, // FFA CustomRoles.Killer => RoleTypes.Impostor, // Capture The Flag @@ -972,7 +972,7 @@ internal static class CustomRolesHelper return role is CustomRoles.KOTZPlayer or CustomRoles.CTFPlayer or - CustomRoles.KB_Normal or + CustomRoles.SoloPVP_Player or CustomRoles.BedWarsPlayer or CustomRoles.Weatherman or CustomRoles.Altruist or diff --git a/Modules/ExtendedPlayerControl.cs b/Modules/ExtendedPlayerControl.cs index 60c3d932a..23ed97ed1 100644 --- a/Modules/ExtendedPlayerControl.cs +++ b/Modules/ExtendedPlayerControl.cs @@ -1378,7 +1378,7 @@ internal static class ExtendedPlayerControl return pc.GetCustomRole() switch { // Solo PVP - CustomRoles.KB_Normal => pc.SoloAlive(), + CustomRoles.SoloPVP_Player => pc.SoloAlive(), // FFA CustomRoles.Killer => pc.IsAlive(), // Stop And Go @@ -1729,7 +1729,7 @@ internal static class ExtendedPlayerControl Main.AllPlayerKillCooldown[player.PlayerId] = player.GetCustomRole() switch { - CustomRoles.KB_Normal => SoloPVP.KB_ATKCooldown.GetFloat(), + CustomRoles.SoloPVP_Player => SoloPVP.SoloPVP_ATKCooldown.GetFloat(), CustomRoles.Killer => FreeForAll.FFAKcd.GetFloat(), CustomRoles.Runner => Speedrun.KCD, CustomRoles.CTFPlayer => CaptureTheFlag.KCD, diff --git a/Modules/GuessManager.cs b/Modules/GuessManager.cs index a95848b8d..6fa93b36c 100644 --- a/Modules/GuessManager.cs +++ b/Modules/GuessManager.cs @@ -1044,7 +1044,7 @@ public static class GuessManager CustomRoles.Disco or CustomRoles.Giant or CustomRoles.NotAssigned or - CustomRoles.KB_Normal or + CustomRoles.SoloPVP_Player or CustomRoles.Paranoid or CustomRoles.SuperStar or CustomRoles.GuardianAngelEHR diff --git a/Patches/GameStartManagerPatch.cs b/Patches/GameStartManagerPatch.cs index ab0107ef8..4dab81bc6 100644 --- a/Patches/GameStartManagerPatch.cs +++ b/Patches/GameStartManagerPatch.cs @@ -413,7 +413,7 @@ public static class GameStartManagerPatch int estimatedGameLength = Options.CurrentGameMode switch { - CustomGameMode.SoloPVP => SoloPVP.KB_GameTime.GetInt(), + CustomGameMode.SoloPVP => SoloPVP.SoloPVP_GameTime.GetInt(), CustomGameMode.FFA => Math.Clamp((FreeForAll.FFAKcd.GetInt() * (PlayerControl.AllPlayerControls.Count / 2)) + FreeForAll.FFAKcd.GetInt() + 5, FreeForAll.FFAKcd.GetInt(), FreeForAll.FFAGameTime.GetInt()), CustomGameMode.StopAndGo => ((Main.NormalOptions.NumShortTasks * 30) + (Main.NormalOptions.NumLongTasks * 60) + (Math.Min(3, Main.NormalOptions.NumCommonTasks) * 40)) / (int)(Main.NormalOptions.PlayerSpeedMod - ((Main.NormalOptions.PlayerSpeedMod - 1) / 2)), CustomGameMode.HotPotato => HotPotato.GetKillInterval() * (PlayerControl.AllPlayerControls.Count - 1), diff --git a/Patches/HudPatch.cs b/Patches/HudPatch.cs index 1b80acda3..24814d82e 100644 --- a/Patches/HudPatch.cs +++ b/Patches/HudPatch.cs @@ -237,7 +237,7 @@ internal static class HudManagerPatch case CustomRoles.Medic: usedButton?.OverrideText(GetString("MedicalerButtonText")); break; - case CustomRoles.KB_Normal: + case CustomRoles.SoloPVP_Player: case CustomRoles.BedWarsPlayer: __instance.KillButton?.OverrideText(GetString("DemonButtonText")); break; @@ -659,7 +659,7 @@ internal static class SetHudActivePatch __instance.ImpostorVentButton?.ToggleVisible(false); break; - case CustomRoles.KB_Normal: + case CustomRoles.SoloPVP_Player: __instance.SabotageButton?.ToggleVisible(false); __instance.AbilityButton?.ToggleVisible(false); __instance.ReportButton?.ToggleVisible(false); diff --git a/Patches/IntroPatch.cs b/Patches/IntroPatch.cs index c57ff8c8f..cf5079bda 100644 --- a/Patches/IntroPatch.cs +++ b/Patches/IntroPatch.cs @@ -872,11 +872,11 @@ internal static class BeginCrewmatePatch { case CustomGameMode.SoloPVP: { - __instance.TeamTitle.text = GetString("KB_Normal"); + __instance.TeamTitle.text = GetString("SoloPVP_Player"); __instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(245, 82, 82, byte.MaxValue); PlayerControl.LocalPlayer.Data.Role.IntroSound = DestroyableSingleton.Instance.HnSOtherImpostorTransformSfx; __instance.ImpostorText.gameObject.SetActive(true); - __instance.ImpostorText.text = GetString("KB_NormalInfo"); + __instance.ImpostorText.text = GetString("SoloPVP_PlayerInfo"); break; } case CustomGameMode.FFA: diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index 3eb0ebabb..62cf3cd90 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -43,8 +43,6 @@ "NeutralSub": "Work alone to achieve your victory", "CovenSub": "Bewitch everyone with your team", "MadmateSub": "Help the Impostors", - "KB_Normal": "SOLO PVP", - "KB_NormalInfo": "DEFEAT OPPONENTS TO WIN", "UnsupportedMap": "This map is not supported by EHR\\nPlease use a supported map or you'll experience issues", "GuesserMode": "Guesser Mode", "CrewmatesCanGuess": "Crewmates can guess", @@ -1763,15 +1761,6 @@ "UndertakerMarkCooldown": "Mark Cooldown", "UndertakerAssassinateCooldown": "Assassinate Cooldown", "UndertakerCanKillAfterAssassinate": "Can kill after Assassinating", - "KB_GameTime": "Game duration", - "KB_HPMax": "Default HP", - "KB_ATK": "Default Attack", - "KB_RecoverAfterSecond": "Recover Cooldown", - "KB_RecoverPerSecond": "Recover Per Second", - "KB_ResurrectionWaitingTime": "Resurrection waiting time", - "KB_KillBonusMultiplier": "Kill bonus multiplier", - "KB_ATKCooldown": "Attack Cooldown", - "KB_CanVent": "Players Can Vent", "JudgeTryHideMsg": "Hide Judge's commands", "TrialLimitPerMeeting": "Max Trials per Meeting", "TrialLimitPerGame": "Max Trials per Game", @@ -2206,10 +2195,6 @@ "EraserEraseNeutralNotice": "Your target is Neutral and can't be erased!", "TargetErasedInRound": "Target's role will be erased after next meeting", "EraserEraseSelf": "Unfortunately, you can't erase yourself.... Wait, why would you do that in the first place?!", - "KB_Buff_HPMax": "Gain: HP Max +{0}", - "KB_Buff_HPReco": "Gain: Recover HP Per Second +{0}", - "KB_Buff_ATK": "Gain: Attack +{0}", - "KB_Buff_DF": "Gain: Defense +{0}", "NKWinsBySabotageIfNoImpAlive": "The team that wins by critical sabotage time limit if there are no <#ff1919>Impostors alive", "IfSelectedTeamIsDead": "If the selected team is dead, then the winning team is", "SabotageTimeLimitWinners.Imps": "<#ff1919>Impostors", @@ -3131,8 +3116,6 @@ "EnterVentToWin": "Enter a Vent to Ignite!", "PetToWin": "Pet to Ignite!", "EatenByPelican": "You're swallowed, waiting for the Pelican to die or a meeting", - "KBBackCountDown": "<#ff0000>DEAD\\n<#ffffff>Respawning in <#ffff00>{0}s\\n\\n", - "SoloPVP.WinnersKillCount": "They got {0} kills!", "FireworkerPutPhase": "{0} Fireworks Left", "FireworkerWaitPhase": "Wait for it...", "FireworkerReadyFirePhase": "Fire!", @@ -3209,9 +3192,6 @@ "Preset_10": "Preset 10", "YouAreHostSuffix": "YOU!", "Standard": "Standard", - "SoloPVP": "SOLO PVP", - "ModeSoloPVP": "Gamemode: Solo PVP", - "SoloPVP.Summary": "Rank: {0} | Kills: {1}", "GameMode": "Game Mode", "PressTabToNextPage": "Press Tab or Number for Next Page...", "RoleSummaryText": "Role Summary:", @@ -3350,8 +3330,6 @@ "KickNintendoPlayer": "{0} was kicked due to playing on Nintendo Switch.", "AFKKick": "{0} was kicked because they went AFK", "AFKTooMany": "AFK detection was disabled for this round since there are too many AFK players", - "KBDisplayScore": "Rank: {0} Kills: {1}", - "KBTimeRemain": "Time Remaining: {0}s", "ResetDoorsEveryTurns": "Reset All Doors After Meetings", "GameOver": "Game Over", "EHROptions": "EHR Options", @@ -4946,6 +4924,27 @@ "GameModeTutorial.Snowdown": "The current game mode is <#e4fdff>Snowdown.\\nVanish to throw a snowball in your movement direction.\\nIf it hits someone, you get a coin. Pet to turn 20 coins into 1 point.\\nCall a critical sabotage to enter/exit the shop. Highest points wins!", "GameModeListTitle": "Game Modes", "ModeStandard": "Gamemode: Standard", + "SoloPVP": "SOLO PVP", + "ModeSoloPVP": "Gamemode: Solo PVP", + "ModeDescribe.SoloPVP": "In the Solo PVP game mode, everyone has HP and can use their kill button to cause damage on other players. When a player's health reaches 0, they 'die' and respawn after a few seconds. The player(s) with the highest number of kills win(s) at the end of the game.", + "SoloPVP_Player": "SOLO PVP", + "SoloPVP_PlayerInfo": "DEFEAT OPPONENTS TO WIN", + "SoloPVP_GameTime": "Game duration", + "SoloPVP_HPMax": "Default HP", + "SoloPVP_ATK": "Default Attack", + "SoloPVP_RecoverAfterSecond": "Recover Cooldown", + "SoloPVP_RecoverPerSecond": "Recover Per Second", + "SoloPVP_ResurrectionWaitingTime": "Resurrection waiting time", + "SoloPVP_KillBonusMultiplier": "Kill bonus multiplier", + "SoloPVP_ATKCooldown": "Attack Cooldown", + "SoloPVP_CanVent": "Players Can Vent", + "SoloPVP_Buff_HPMax": "Gain: HP Max +{0}", + "SoloPVP_Buff_HPReco": "Gain: Recover HP Per Second +{0}", + "SoloPVP_Buff_ATK": "Gain: Attack +{0}", + "SoloPVP_Buff_DF": "Gain: Defense +{0}", + "SoloPVP_BackCountDown": "<#ff0000>DEAD\\n<#ffffff>Respawning in <#ffff00>{0}s\\n\\n", + "SoloPVP.Summary": "Rank: {0} | Kills: {1}", + "SoloPVP.WinnersKillCount": "They got {0} kills!", "FFA": "FREE FOR ALL", "ModeFFA": "Gamemode: FFA", "ModeDescribe.FFA": "In the FFA (Free For All) gamemode, everyone is a killer and everyone can kill anyone. The last player alive wins!\\n\\nSome random events make this even more fun in the mean time!", @@ -10092,7 +10091,6 @@ "DCNotify.Auth": "You are not authenticated.\\n\\nYou may need to restart your game.", "DCNotify.DupeLogin": "An instance of your account is already present in this lobby.", "DCNotify.InvalidSettings": "Game settings have been detected to be invalid.\\n\\nEnter local play to reset them, then try again.", - "ModeDescribe.SoloPVP": "In the Solo PVP game mode, everyone has HP and can use their kill button to cause damage on other players. When a player's health reaches 0, they 'die' and respawn after a few seconds. The player(s) with the highest number of kills win(s) at the end of the game.", "WinnerRoleText.Impostor": "Impostors Win!", "WinnerRoleText.Crewmate": "Crewmates Win!", "WinnerRoleText.Terrorist": "Terrorist Wins!",