diff --git a/CustomRoles.cs b/CustomRoles.cs index 346db06d8..9306f5866 100644 --- a/CustomRoles.cs +++ b/CustomRoles.cs @@ -428,7 +428,7 @@ public enum CustomRoles Wyrd, // Solo Kombat - SoloPVP_Player, + Challenger, // FFA Killer, @@ -536,7 +536,7 @@ public enum CustomRoles Examiner, Facilitator, // Ghost role Finder, - Flashman, + Flash, Fragile, Fool, Giant, @@ -603,4 +603,4 @@ public enum CustomRoles Watcher, Workhorse, Youtuber -} \ No newline at end of file +} diff --git a/Main.cs b/Main.cs index a0b96a06b..ff4eb2f5d 100644 --- a/Main.cs +++ b/Main.cs @@ -690,7 +690,7 @@ public class Main : BasePlugin { CustomRoles.Stained, "#e6bf91" }, { CustomRoles.Clumsy, "#b8b8b8" }, { CustomRoles.Mischievous, "#30221c" }, - { CustomRoles.Flashman, "#ff8400" }, + { CustomRoles.Flash, "#ff8400" }, { CustomRoles.Haste, "#f0ec22" }, { CustomRoles.Busy, "#32a852" }, { CustomRoles.Sleep, "#000000" }, @@ -754,7 +754,7 @@ public class Main : BasePlugin { CustomRoles.Underdog, "#ff1919" }, // Solo PVP - { CustomRoles.SoloPVP_Player, "#f55252" }, + { CustomRoles.Challenger, "#f55252" }, // FFA { CustomRoles.Killer, "#00ffff" }, // Stop And Go diff --git a/Modules/CustomRoleSelector.cs b/Modules/CustomRoleSelector.cs index 47f7caf23..b09eb68d7 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.SoloPVP_Player }, + { CustomGameMode.SoloPVP, CustomRoles.Challenger }, { CustomGameMode.FFA, CustomRoles.Killer }, { CustomGameMode.StopAndGo, CustomRoles.Tasker }, { CustomGameMode.HotPotato, CustomRoles.Potato }, diff --git a/Modules/CustomRolesHelper.cs b/Modules/CustomRolesHelper.cs index 61586a408..5c516db40 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.SoloPVP_Player or + CustomRoles.Challenger or CustomRoles.Killer or CustomRoles.Tasker or CustomRoles.Potato or @@ -460,7 +460,7 @@ internal static class CustomRolesHelper return role switch { // Solo PVP - CustomRoles.SoloPVP_Player => RoleTypes.Impostor, + CustomRoles.Challenger => RoleTypes.Impostor, // FFA CustomRoles.Killer => RoleTypes.Impostor, // Capture The Flag @@ -975,7 +975,7 @@ internal static class CustomRolesHelper return role is CustomRoles.KOTZPlayer or CustomRoles.CTFPlayer or - CustomRoles.SoloPVP_Player or + CustomRoles.Challenger or CustomRoles.BedWarsPlayer or CustomRoles.Weatherman or CustomRoles.Altruist or @@ -1155,7 +1155,7 @@ internal static class CustomRolesHelper CustomRoles.Torch when !pc.IsCrewmate() || pc.Is(CustomRoles.Bewilder) || pc.Is(CustomRoles.Sunglasses) || pc.Is(CustomRoles.GuardianAngelEHR) => false, CustomRoles.Bewilder when pc.Is(CustomRoles.Torch) || pc.Is(CustomRoles.GuardianAngelEHR) || pc.Is(CustomRoles.Sunglasses) => false, CustomRoles.Dynamo when pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Ankylosaurus => false, - CustomRoles.Spurt when pc.GetCustomSubRoles().Any(x => x is CustomRoles.Dynamo or CustomRoles.Swiftclaw or CustomRoles.Giant or CustomRoles.Flashman) || pc.Is(CustomRoles.Ankylosaurus) => false, + CustomRoles.Spurt when pc.GetCustomSubRoles().Any(x => x is CustomRoles.Dynamo or CustomRoles.Swiftclaw or CustomRoles.Giant or CustomRoles.Flash) || pc.Is(CustomRoles.Ankylosaurus) => false, CustomRoles.Sunglasses when pc.Is(CustomRoles.Torch) || pc.Is(CustomRoles.GuardianAngelEHR) || pc.Is(CustomRoles.Bewilder) => false, CustomRoles.Guesser when pc.GetCustomRole() is CustomRoles.EvilGuesser or CustomRoles.NiceGuesser or CustomRoles.Doomsayer or CustomRoles.CopyCat => false, CustomRoles.Madmate when !pc.CanBeMadmate() || pc.Is(CustomRoles.Egoist) || pc.Is(CustomRoles.Rascal) => false, @@ -1164,8 +1164,8 @@ internal static class CustomRolesHelper CustomRoles.Egoist when !pc.IsImpostor() => false, CustomRoles.Damocles when pc.GetCustomRole() is CustomRoles.Bomber or CustomRoles.Nuker or CustomRoles.Mercenary or CustomRoles.Cantankerous => false, CustomRoles.Damocles when pc.GetRoleTypes() is not (RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter or RoleTypes.Viper) => false, - CustomRoles.Flashman when pc.Is(CustomRoles.Swiftclaw) || pc.Is(CustomRoles.Giant) || pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Zombie => false, - CustomRoles.Giant when pc.Is(CustomRoles.Flashman) || pc.Is(CustomRoles.Spurt) || pc.Is(CustomRoles.RoomRusher) => false, + CustomRoles.Flash when pc.Is(CustomRoles.Swiftclaw) || pc.Is(CustomRoles.Giant) || pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Zombie => false, + CustomRoles.Giant when pc.Is(CustomRoles.Flash) || pc.Is(CustomRoles.Spurt) || pc.Is(CustomRoles.RoomRusher) => false, CustomRoles.Necroview when pc.Is(CustomRoles.Visionary) => false, CustomRoles.Mimic when pc.Is(CustomRoles.Nemesis) => false, CustomRoles.Rascal when !pc.IsCrewmate() => false, @@ -1216,7 +1216,7 @@ internal static class CustomRolesHelper CustomRoles.Haste when pc.GetRoleTypes() is not (RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter or RoleTypes.Viper) || !pc.CanUseImpostorVentButton() || pc.Is(CustomRoles.Glitch) => false, CustomRoles.Diseased when pc.Is(CustomRoles.Antidote) => false, CustomRoles.Antidote when pc.Is(CustomRoles.Diseased) => false, - CustomRoles.Flashman or CustomRoles.Giant when pc.GetCustomRole() is CustomRoles.Swooper or CustomRoles.Wraith or CustomRoles.Chameleon or CustomRoles.Alchemist or CustomRoles.Ankylosaurus => false, + CustomRoles.Flash or CustomRoles.Giant when pc.GetCustomRole() is CustomRoles.Swooper or CustomRoles.Wraith or CustomRoles.Chameleon or CustomRoles.Alchemist or CustomRoles.Ankylosaurus => false, CustomRoles.Bait when pc.Is(CustomRoles.Disregarded) => false, CustomRoles.Busy when !pc.GetTaskState().HasTasks => false, CustomRoles.Truant when pc.Is(CustomRoles.SoulHunter) => false, diff --git a/Modules/ExtendedPlayerControl.cs b/Modules/ExtendedPlayerControl.cs index ee5e57484..c544317c8 100644 --- a/Modules/ExtendedPlayerControl.cs +++ b/Modules/ExtendedPlayerControl.cs @@ -1404,7 +1404,7 @@ internal static class ExtendedPlayerControl return pc.GetCustomRole() switch { // Solo PVP - CustomRoles.SoloPVP_Player => pc.SoloAlive(), + CustomRoles.Challenger => pc.SoloAlive(), // FFA CustomRoles.Killer => pc.IsAlive(), // Stop And Go @@ -1755,7 +1755,7 @@ internal static class ExtendedPlayerControl Main.AllPlayerKillCooldown[player.PlayerId] = player.GetCustomRole() switch { - CustomRoles.SoloPVP_Player => SoloPVP.SoloPVP_ATKCooldown.GetFloat(), + CustomRoles.Challenger => SoloPVP.SoloPVP_ATKCooldown.GetFloat(), CustomRoles.Killer => FreeForAll.FFAKcd.GetFloat(), CustomRoles.Runner => Speedrun.KCD, CustomRoles.CTFPlayer => CaptureTheFlag.KCD, diff --git a/Modules/GameOptionsSender/PlayerGameOptionsSender.cs b/Modules/GameOptionsSender/PlayerGameOptionsSender.cs index a40e712f2..3a4305ca5 100644 --- a/Modules/GameOptionsSender/PlayerGameOptionsSender.cs +++ b/Modules/GameOptionsSender/PlayerGameOptionsSender.cs @@ -263,9 +263,9 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS opt.SetBool(BoolOptionNames.AnonymousVotes, false); break; } - case CustomRoles.Flashman: + case CustomRoles.Flash: { - Main.AllPlayerSpeed[player.PlayerId] = Options.FlashmanSpeed.GetFloat(); + Main.AllPlayerSpeed[player.PlayerId] = Options.FlashSpeed.GetFloat(); break; } case CustomRoles.Giant: @@ -660,4 +660,5 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS { return base.AmValid() && player != null && player.Data != null && !player.Data.Disconnected && Main.RealOptionsData != null; } -} \ No newline at end of file + +} diff --git a/Modules/GameState.cs b/Modules/GameState.cs index 2bc43aee4..3ee86fa3e 100644 --- a/Modules/GameState.cs +++ b/Modules/GameState.cs @@ -337,7 +337,7 @@ public class PlayerState(byte playerId) { SubRoles.Remove(role); - if (role is CustomRoles.Flashman or CustomRoles.Dynamo or CustomRoles.Spurt) + if (role is CustomRoles.Flash or CustomRoles.Dynamo or CustomRoles.Spurt) { Main.AllPlayerSpeed[PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod); PlayerGameOptionsSender.SetDirty(PlayerId); @@ -597,4 +597,5 @@ public static class MeetingStates public static bool IsExistDeadBody => DeadBodies.Length > 0; public static NetworkedPlayerInfo ReportTarget { get; set; } -} \ No newline at end of file + +} diff --git a/Modules/GuessManager.cs b/Modules/GuessManager.cs index 7e8e77ddc..b39541739 100644 --- a/Modules/GuessManager.cs +++ b/Modules/GuessManager.cs @@ -335,7 +335,7 @@ public static class GuessManager case CustomRoles.Goose when !Goose.CanBeGuessed.GetBool(): case CustomRoles.BananaMan: case CustomRoles.Disco: - case CustomRoles.Flashman: + case CustomRoles.Flash: case CustomRoles.Giant: case CustomRoles.Glow: case CustomRoles.LastImpostor: @@ -1044,7 +1044,7 @@ public static class GuessManager CustomRoles.BananaMan or CustomRoles.Car or CustomRoles.Disco or - CustomRoles.Flashman or + CustomRoles.Flash or CustomRoles.Giant or CustomRoles.LastImpostor or CustomRoles.NotAssigned or @@ -1651,4 +1651,3 @@ public static class GuessManager } } - diff --git a/Modules/OptionHolder.cs b/Modules/OptionHolder.cs index 642960fa5..1bfc40e4a 100644 --- a/Modules/OptionHolder.cs +++ b/Modules/OptionHolder.cs @@ -826,7 +826,7 @@ public static class Options public static OptionItem PresidentCanBeMadmate; public static OptionItem MadSnitchTasks; - public static OptionItem FlashmanSpeed; + public static OptionItem FlashSpeed; public static OptionItem GiantSpeed; public static OptionItem ImpEgoistVisibalToAllies; public static OptionItem VotesPerKill; diff --git a/Patches/HudPatch.cs b/Patches/HudPatch.cs index b6910ae40..83d817162 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.SoloPVP_Player: + case CustomRoles.Challenger: case CustomRoles.BedWarsPlayer: __instance.KillButton?.OverrideText(GetString("DemonButtonText")); break; @@ -660,7 +660,7 @@ internal static class SetHudActivePatch __instance.ImpostorVentButton?.ToggleVisible(false); break; - case CustomRoles.SoloPVP_Player: + case CustomRoles.Challenger: __instance.SabotageButton?.ToggleVisible(false); __instance.AbilityButton?.ToggleVisible(false); __instance.ReportButton?.ToggleVisible(false); diff --git a/Patches/IntroPatch.cs b/Patches/IntroPatch.cs index 12db1e312..6067dc602 100644 --- a/Patches/IntroPatch.cs +++ b/Patches/IntroPatch.cs @@ -875,11 +875,11 @@ internal static class BeginCrewmatePatch { case CustomGameMode.SoloPVP: { - __instance.TeamTitle.text = GetString("SoloPVP_Player"); + __instance.TeamTitle.text = GetString("Challenger"); __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("SoloPVP_PlayerInfo"); + __instance.ImpostorText.text = GetString("ChallengerInfo"); break; } case CustomGameMode.FFA: diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index 988a5b4c9..e49e6a31e 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -346,7 +346,7 @@ "Stained": "Stained", "Clumsy": "Clumsy", "Mischievous": "Mischievous", - "Flashman": "Flash", + "Flash": "Flash", "Undead": "Undead", "Busy": "Busy", "Truant": "Truant", @@ -404,7 +404,7 @@ "Prefix.Stained": "Stained", "Prefix.Clumsy": "Clumsy", "Prefix.Mischievous": "Mischievous", - "Prefix.Flashman": "Flash", + "Prefix.Flash": "Flash", "Prefix.Undead": "Undead", "Prefix.Busy": "Busy", "Prefix.Truant": "Truant", @@ -577,7 +577,7 @@ "ExecutionerInfo": "Get your target voted out", "LawyerInfo": "Help your target win!", "VectorInfo": "Jump in, jump out, win!", - "JackalInfo": "Murder everyone", + "JackalInfo": "Convert & Murder Everyone", "GodInfo": "Everything is under your control", "InnocentInfo": "Get someone ejected by making them kill you", "PelicanInfo": "Eat all players", @@ -621,7 +621,7 @@ "NtrInfo": "Everyone sees you as their Lover", "WatcherInfo": "You see vote colors", "LastImpostorInfo": "Lower kill cooldown", - "FlashmanInfo": "You're faster", + "FlashInfo": "You're faster", "GiantInfo": "You're slower", "TruantInfo": "You freeze after meetings for some time", "TorchInfo": "You have a higher vision!", @@ -853,7 +853,7 @@ "StainedInfoLong": "(Add-ons):\\nYour killer gets a violet name for 3 seconds.", "ClumsyInfoLong": "(Add-ons):\\nWhile walking, you have a small chance of tripping, meaning you freeze for a few seconds.", "MischievousInfoLong": "(Add-ons):\\nYou can sabotage.", - "FlashmanInfoLong": "(Add-ons):\\nThe Flash is faster by default.", + "FlashInfoLong": "(Add-ons):\\nThe Flash is faster by default.", "GiantInfoLong": "(Add-ons):\\nThe Giant is slower by default.", "BusyInfoLong": "(Add-ons):\\nYou have more tasks.", "DiscoInfoLong": "(Add-ons):\\nYou change your skin color every few seconds.", @@ -1499,7 +1499,7 @@ "BewilderVision": "Bewilder Vision", "JesterVision": "Jester Vision", "LawyerVision": "Lawyer Vision", - "FlashmanSpeed": "Flash Speed", + "FlashSpeed": "Flash Speed", "GiantSpeed": "Giant Speed", "NeutralsKnowEachOther": "Neutrals know each other", "LoverDieConsequence": "Consequence for Second Lover, When First One Dies", @@ -4500,7 +4500,7 @@ "MagicianBombExlodesIn": "Bomb explodes in {0}s", "MagicianCardUsed": "Card used", "Necromancer": "Necromancer", - "NecromancerInfo": "Recruit Everyone", + "NecromancerInfo": "Recruit Everyone to the Undead", "NecromancerInfoLong": "(Neutrals):\\nThe Necromancer is the main recruiter for the Undead faction. The first person it kills will become a Deathknight. With the help of the Deathknight, they must work together to convert others to the Undead. If the Necromancer were to die, The Deathknight would turn into Necromancer.", "Deathknight": "Deathknight", "DeathknightInfo": "Help the Necromancer Recruit", @@ -4924,8 +4924,8 @@ "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", + "Challenger": "SOLO PVP", + "ChallengerInfo": "DEFEAT OPPONENTS TO WIN", "SoloPVP_GameTime": "Game duration", "SoloPVP_HPMax": "Default HP", "SoloPVP_ATK": "Default Attack", diff --git a/Roles/AddOns/Common/Flash.cs b/Roles/AddOns/Common/Flash.cs index 81a367a74..30197e83a 100644 --- a/Roles/AddOns/Common/Flash.cs +++ b/Roles/AddOns/Common/Flash.cs @@ -1,15 +1,15 @@ namespace EHR.AddOns.Common; -internal class Flashman : IAddon +internal class Flash : IAddon { public AddonTypes Type => AddonTypes.Helpful; public void SetupCustomOption() { - Options.SetupAdtRoleOptions(18700, CustomRoles.Flashman, canSetNum: true, tab: TabGroup.Addons, teamSpawnOptions: true); + Options.SetupAdtRoleOptions(18700, CustomRoles.Flash, canSetNum: true, tab: TabGroup.Addons, teamSpawnOptions: true); - Options.FlashmanSpeed = new FloatOptionItem(18708, "FlashmanSpeed", new(0.25f, 3f, 0.05f), 2.5f, TabGroup.Addons) - .SetParent(Options.CustomRoleSpawnChances[CustomRoles.Flashman]) + Options.FlashSpeed = new FloatOptionItem(18708, "FlashSpeed", new(0.25f, 3f, 0.05f), 2.5f, TabGroup.Addons) + .SetParent(Options.CustomRoleSpawnChances[CustomRoles.Flash]) .SetValueFormat(OptionFormat.Multiplier); } -} \ No newline at end of file +}