From 72bb52558841f38aa77a9147f004ebde3b7d3f12 Mon Sep 17 00:00:00 2001 From: Gurge44 Date: Tue, 25 Mar 2025 21:11:00 +0100 Subject: [PATCH] compatibility with v2025.3.25 --- EHR.csproj | 2 +- GameMode/CaptureTheFlag.cs | 8 +-- GameMode/CustomHnS.cs | 8 +-- GameMode/KingOfTheZones.cs | 6 +- GameMode/RoomRush.cs | 6 +- GameMode/Speedrun.cs | 8 +-- Main.cs | 8 +-- Modules/CustomRoleSelector.cs | 2 +- Modules/DisableDevice.cs | 2 +- Modules/Extensions/IGameManagerEx.cs | 10 +-- .../GameOptionsSender/GameOptionsSender.cs | 4 +- .../PlayerGameOptionsSender.cs | 2 +- Modules/Utils.cs | 2 +- Patches/ChatCommandPatch.cs | 2 +- Patches/CheckGameEndPatch.cs | 72 +++++++++---------- Patches/Crowded.cs | 4 +- Patches/DeconSystemPatch.cs | 2 +- Patches/DisconnectPenaltyPatch.cs | 7 +- Patches/DleksPatch.cs | 4 +- Patches/GameOptionsPatch.cs | 6 +- Patches/MapPickerMenuPatch.cs | 2 +- Patches/OnGameStartedPatch.cs | 71 +++++++++--------- Patches/RandomSpawnPatch.cs | 2 +- Resources/Lang/en_US.json | 10 +-- Resources/Lang/es_ES.json | 10 +-- Resources/Lang/fr_FR.json | 10 +-- Resources/Lang/hu_HU.json | 10 +-- Resources/Lang/id_ID.json | 10 +-- Resources/Lang/ja_JP.json | 10 +-- Resources/Lang/ko_KR.json | 10 +-- Resources/Lang/pl_PL.json | 10 +-- Resources/Lang/pt_BR.json | 10 +-- Resources/Lang/ru_RU.json | 10 +-- Resources/Lang/zh_CN.json | 10 +-- Resources/Lang/zh_TW.json | 10 +-- Roles/Crewmate/CameraMan.cs | 2 +- Roles/Crewmate/Farseer.cs | 2 +- Roles/Crewmate/SabotageMaster.cs | 2 +- Roles/Impostor/Deathpact.cs | 2 +- Roles/Impostor/Puppeteer.cs | 2 +- Roles/Neutral/Agitater.cs | 2 +- Roles/Neutral/Arsonist.cs | 2 +- Roles/Neutral/Revolutionist.cs | 2 +- Roles/Neutral/RoomRusher.cs | 4 +- Roles/Neutral/Samurai.cs | 2 +- Roles/Neutral/Technician.cs | 2 +- 46 files changed, 195 insertions(+), 189 deletions(-) diff --git a/EHR.csproj b/EHR.csproj index cef396825..e3016a562 100644 --- a/EHR.csproj +++ b/EHR.csproj @@ -24,7 +24,7 @@ - + diff --git a/GameMode/CaptureTheFlag.cs b/GameMode/CaptureTheFlag.cs index 3cce52a01..123b91740 100644 --- a/GameMode/CaptureTheFlag.cs +++ b/GameMode/CaptureTheFlag.cs @@ -66,7 +66,7 @@ public static class CaptureTheFlag private static (Vector2 Position, string RoomName) BlueFlagBase => Main.CurrentMap switch { MapNames.Skeld => (new(16.5f, -4.8f), Translator.GetString(SystemTypes.Nav.ToString())), - MapNames.Mira => (new(-4.5f, 2.0f), Translator.GetString(SystemTypes.Launchpad.ToString())), + MapNames.MiraHQ => (new(-4.5f, 2.0f), Translator.GetString(SystemTypes.Launchpad.ToString())), MapNames.Dleks => (new(-16.5f, -4.8f), Translator.GetString(SystemTypes.Nav.ToString())), MapNames.Polus => (new(9.5f, -12.5f), Translator.GetString(SystemTypes.Electrical.ToString())), MapNames.Airship => (new(-23.5f, -1.6f), Translator.GetString(SystemTypes.Cockpit.ToString())), @@ -77,7 +77,7 @@ public static class CaptureTheFlag private static (Vector2 Position, string RoomName) YellowFlagBase => Main.CurrentMap switch { MapNames.Skeld => (new(-20.5f, -5.5f), Translator.GetString(SystemTypes.Reactor.ToString())), - MapNames.Mira => (new(17.8f, 23.0f), Translator.GetString(SystemTypes.Greenhouse.ToString())), + MapNames.MiraHQ => (new(17.8f, 23.0f), Translator.GetString(SystemTypes.Greenhouse.ToString())), MapNames.Dleks => (new(20.5f, -5.5f), Translator.GetString(SystemTypes.Reactor.ToString())), MapNames.Polus => (new(36.5f, -7.5f), Translator.GetString(SystemTypes.Laboratory.ToString())), MapNames.Airship => (new(33.5f, -1.5f), Translator.GetString(SystemTypes.CargoBay.ToString())), @@ -226,7 +226,7 @@ public static class CaptureTheFlag public static bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; PlayerControl[] aapc = Main.AllAlivePlayerControls; if (!ValidTag) return false; @@ -237,7 +237,7 @@ public static class CaptureTheFlag ResetSkins(); CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Draw); CustomWinnerHolder.WinnerIds = Main.PlayerStates.Keys.ToHashSet(); - reason = GameOverReason.HumansDisconnect; + reason = GameOverReason.CrewmateDisconnect; return true; case 1: ResetSkins(); diff --git a/GameMode/CustomHnS.cs b/GameMode/CustomHnS.cs index a73742cc5..5297e255b 100644 --- a/GameMode/CustomHnS.cs +++ b/GameMode/CustomHnS.cs @@ -352,14 +352,14 @@ internal static class CustomHnS public static bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; PlayerControl[] alivePlayers = Main.AllAlivePlayerControls; // If there are 0 players alive, the game is over and only foxes win if (alivePlayers.Length == 0) { - reason = GameOverReason.HumansDisconnect; + reason = GameOverReason.CrewmateDisconnect; CustomWinnerHolder.ResetAndSetWinner(CustomWinner.None); AddFoxesToWinners(); return true; @@ -368,7 +368,7 @@ internal static class CustomHnS // If there are no crew roles left, the game is over and only impostors win if (alivePlayers.All(x => PlayerRoles[x.PlayerId].Interface.Team != Team.Crewmate)) { - reason = GameOverReason.HideAndSeek_ByKills; + reason = GameOverReason.HideAndSeek_ImpostorsByKills; SetWinners(CustomWinner.Seeker, Team.Impostor); return true; } @@ -376,7 +376,7 @@ internal static class CustomHnS // If time is up or there are no impostors in the game, the game is over and crewmates win if (TimeLeft <= 0 || PlayerRoles.Values.All(x => x.Interface.Team != Team.Impostor)) { - reason = TimeLeft <= 0 ? GameOverReason.HideAndSeek_ByTimer : GameOverReason.ImpostorDisconnect; + reason = TimeLeft <= 0 ? GameOverReason.HideAndSeek_CrewmatesByTimer : GameOverReason.ImpostorDisconnect; SetWinners(CustomWinner.Hider, Team.Crewmate); return true; } diff --git a/GameMode/KingOfTheZones.cs b/GameMode/KingOfTheZones.cs index cc4524b3d..ef8c6e250 100644 --- a/GameMode/KingOfTheZones.cs +++ b/GameMode/KingOfTheZones.cs @@ -39,7 +39,7 @@ public static class KingOfTheZones [SystemTypes.LowerEngine, SystemTypes.Admin, SystemTypes.Weapons], [SystemTypes.LowerEngine, SystemTypes.UpperEngine, SystemTypes.Weapons, SystemTypes.Shields] ], - [MapNames.Mira] = + [MapNames.MiraHQ] = [ [SystemTypes.LockerRoom], [SystemTypes.Launchpad, SystemTypes.Balcony], @@ -512,7 +512,7 @@ public static class KingOfTheZones public static bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; PlayerControl[] aapc = Main.AllAlivePlayerControls; if (!Main.IntroDestroyed) return false; @@ -523,7 +523,7 @@ public static class KingOfTheZones ResetSkins(); CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Draw); CustomWinnerHolder.WinnerIds = Main.PlayerStates.Keys.ToHashSet(); - reason = GameOverReason.HumansDisconnect; + reason = GameOverReason.CrewmateDisconnect; return true; case 1: ResetSkins(); diff --git a/GameMode/RoomRush.cs b/GameMode/RoomRush.cs index 5eb556785..913f4af03 100644 --- a/GameMode/RoomRush.cs +++ b/GameMode/RoomRush.cs @@ -58,7 +58,7 @@ public static class RoomRush [(SystemTypes.Storage, SystemTypes.Security)] = 2, [(SystemTypes.Storage, SystemTypes.MedBay)] = 2 }, - [MapNames.Mira] = new() + [MapNames.MiraHQ] = new() { [(SystemTypes.Launchpad, SystemTypes.Reactor)] = 2, [(SystemTypes.Greenhouse, SystemTypes.Laboratory)] = 2, @@ -345,7 +345,7 @@ public static class RoomRush : map switch { MapNames.Skeld => SystemTypes.Cafeteria, - MapNames.Mira => SystemTypes.Launchpad, + MapNames.MiraHQ => SystemTypes.Launchpad, MapNames.Dleks => SystemTypes.Cafeteria, MapNames.Polus => SystemTypes.Dropship, MapNames.Airship => SystemTypes.MainHall, @@ -366,7 +366,7 @@ public static class RoomRush bool involvesDecontamination = map switch { - MapNames.Mira => (previous is SystemTypes.Laboratory or SystemTypes.Reactor) ^ (RoomGoal is SystemTypes.Laboratory or SystemTypes.Reactor), + MapNames.MiraHQ => (previous is SystemTypes.Laboratory or SystemTypes.Reactor) ^ (RoomGoal is SystemTypes.Laboratory or SystemTypes.Reactor), MapNames.Polus => previous == SystemTypes.Specimens || RoomGoal == SystemTypes.Specimens, _ => false }; diff --git a/GameMode/Speedrun.cs b/GameMode/Speedrun.cs index 2224c0ede..2af88095e 100644 --- a/GameMode/Speedrun.cs +++ b/GameMode/Speedrun.cs @@ -119,7 +119,7 @@ public static class Speedrun if (player != null) { CustomWinnerHolder.WinnerIds = [player.PlayerId]; - reason = GameOverReason.HumansByTask; + reason = GameOverReason.CrewmatesByTask; return true; } } @@ -128,15 +128,15 @@ public static class Speedrun { case 1: CustomWinnerHolder.WinnerIds = [aapc[0].PlayerId]; - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return true; case 0: CustomWinnerHolder.WinnerIds = []; - reason = GameOverReason.HumansDisconnect; + reason = GameOverReason.CrewmateDisconnect; return true; } - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; KeyCode[] keys = [KeyCode.LeftShift, KeyCode.L, KeyCode.Return]; return keys.Any(Input.GetKeyDown) && keys.All(Input.GetKey); } diff --git a/Main.cs b/Main.cs index 6d2002b20..3cc0b703b 100644 --- a/Main.cs +++ b/Main.cs @@ -51,7 +51,7 @@ public class Main : BasePlugin public const string ModColor = "#00ffff"; public const bool AllowPublicRoom = true; public const string ForkId = "EHR"; - public const string SupportedAUVersion = "2024.8.13"; + public const string SupportedAUVersion = "2025.3.25"; public static readonly Version Version = Version.Parse(PluginVersion); @@ -155,7 +155,7 @@ public class Main : BasePlugin private Harmony Harmony { get; } = new(PluginGuid); - public static NormalGameOptionsV08 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null; + public static NormalGameOptionsV09 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null; // Client Options public static ConfigEntry HideName { get; private set; } @@ -744,8 +744,8 @@ public class Main : BasePlugin ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); - NormalGameOptionsV08.RecommendedImpostors = NormalGameOptionsV08.MaxImpostors = Enumerable.Repeat(127, 127).ToArray(); - NormalGameOptionsV08.MinPlayers = Enumerable.Repeat(4, 127).ToArray(); + NormalGameOptionsV09.RecommendedImpostors = NormalGameOptionsV09.MaxImpostors = Enumerable.Repeat(127, 127).ToArray(); + NormalGameOptionsV09.MinPlayers = Enumerable.Repeat(4, 127).ToArray(); HideNSeekGameOptionsV08.MinPlayers = Enumerable.Repeat(4, 127).ToArray(); CustomLogger.ClearLog(); diff --git a/Modules/CustomRoleSelector.cs b/Modules/CustomRoleSelector.cs index dc2299396..b452cf3cf 100644 --- a/Modules/CustomRoleSelector.cs +++ b/Modules/CustomRoleSelector.cs @@ -105,7 +105,7 @@ internal static class CustomRoleSelector case CustomRoles.Changeling when Changeling.GetAvailableRoles(true).Count == 0: case CustomRoles.Camouflager when Camouflager.DoesntSpawnOnFungle.GetBool() && Main.CurrentMap == MapNames.Fungle: case CustomRoles.DarkHide when Main.CurrentMap == MapNames.Fungle: - case CustomRoles.Doormaster when Main.CurrentMap == MapNames.Mira: + case CustomRoles.Doormaster when Main.CurrentMap == MapNames.MiraHQ: case CustomRoles.Pelican when Roles[RoleAssignType.Impostor].Any(x => x.Role == CustomRoles.Duellist): case CustomRoles.Duellist when Roles[RoleAssignType.NeutralKilling].Any(x => x.Role == CustomRoles.Pelican): case CustomRoles.VengefulRomantic: diff --git a/Modules/DisableDevice.cs b/Modules/DisableDevice.cs index 4dd708681..7aaa058c9 100644 --- a/Modules/DisableDevice.cs +++ b/Modules/DisableDevice.cs @@ -39,7 +39,7 @@ internal static class DisableDevice public static float UsableDistance => Main.CurrentMap switch { MapNames.Skeld => 1.8f, - MapNames.Mira => 2.4f, + MapNames.MiraHQ => 2.4f, MapNames.Polus => 1.8f, MapNames.Dleks => 1.5f, MapNames.Airship => 1.8f, diff --git a/Modules/Extensions/IGameManagerEx.cs b/Modules/Extensions/IGameManagerEx.cs index f0d4da371..c7a633668 100644 --- a/Modules/Extensions/IGameManagerEx.cs +++ b/Modules/Extensions/IGameManagerEx.cs @@ -9,7 +9,7 @@ public static class IGameManagerEx opt.SetBool(name, value); } - public static void Set(this BoolOptionNames name, bool value, NormalGameOptionsV08 opt) + public static void Set(this BoolOptionNames name, bool value, NormalGameOptionsV09 opt) { if (name != BoolOptionNames.GhostsDoTasks) opt.SetBool(name, value); } @@ -24,7 +24,7 @@ public static class IGameManagerEx opt.SetInt(name, value); } - public static void Set(this Int32OptionNames name, int value, NormalGameOptionsV08 opt) + public static void Set(this Int32OptionNames name, int value, NormalGameOptionsV09 opt) { opt.SetInt(name, value); } @@ -39,7 +39,7 @@ public static class IGameManagerEx opt.SetFloat(name, value); } - public static void Set(this FloatOptionNames name, float value, NormalGameOptionsV08 opt) + public static void Set(this FloatOptionNames name, float value, NormalGameOptionsV09 opt) { opt.SetFloat(name, value); } @@ -54,7 +54,7 @@ public static class IGameManagerEx opt.SetByte(name, value); } - public static void Set(this ByteOptionNames name, byte value, NormalGameOptionsV08 opt) + public static void Set(this ByteOptionNames name, byte value, NormalGameOptionsV09 opt) { opt.SetByte(name, value); } @@ -69,7 +69,7 @@ public static class IGameManagerEx opt.SetUInt(name, value); } - public static void Set(this UInt32OptionNames name, uint value, NormalGameOptionsV08 opt) + public static void Set(this UInt32OptionNames name, uint value, NormalGameOptionsV09 opt) { opt.SetUInt(name, value); } diff --git a/Modules/GameOptionsSender/GameOptionsSender.cs b/Modules/GameOptionsSender/GameOptionsSender.cs index 841bcb598..b77eb3fc9 100644 --- a/Modules/GameOptionsSender/GameOptionsSender.cs +++ b/Modules/GameOptionsSender/GameOptionsSender.cs @@ -24,8 +24,8 @@ public abstract class GameOptionsSender writer.StartMessage(0); writer.Write((byte)opt.GameMode); - if (opt.TryCast(out NormalGameOptionsV08 normalOpt)) - NormalGameOptionsV08.Serialize(writer, normalOpt); + if (opt.TryCast(out NormalGameOptionsV09 normalOpt)) + NormalGameOptionsV09.Serialize(writer, normalOpt); else if (opt.TryCast(out HideNSeekGameOptionsV08 hnsOpt)) HideNSeekGameOptionsV08.Serialize(writer, hnsOpt); else diff --git a/Modules/GameOptionsSender/PlayerGameOptionsSender.cs b/Modules/GameOptionsSender/PlayerGameOptionsSender.cs index 994c23b20..7150cd0b8 100644 --- a/Modules/GameOptionsSender/PlayerGameOptionsSender.cs +++ b/Modules/GameOptionsSender/PlayerGameOptionsSender.cs @@ -21,7 +21,7 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS private PlayerControl player = player; private static IGameOptions BasedGameOptions => - Main.RealOptionsData.Restore(new NormalGameOptionsV08(new UnityLogger().CastFast()).CastFast()); + Main.RealOptionsData.Restore(new NormalGameOptionsV09(new UnityLogger().CastFast()).CastFast()); protected override bool IsDirty { get; set; } diff --git a/Modules/Utils.cs b/Modules/Utils.cs index 7abb88aca..a723ce94e 100644 --- a/Modules/Utils.cs +++ b/Modules/Utils.cs @@ -1350,7 +1350,7 @@ public static class Utils switch (opt.Value.Name) { case "DisableSkeldDevices" when Main.CurrentMap is not MapNames.Skeld and not MapNames.Dleks: - case "DisableMiraHQDevices" when Main.CurrentMap != MapNames.Mira: + case "DisableMiraHQDevices" when Main.CurrentMap != MapNames.MiraHQ: case "DisablePolusDevices" when Main.CurrentMap != MapNames.Polus: case "DisableAirshipDevices" when Main.CurrentMap != MapNames.Airship: case "PolusReactorTimeLimit" when Main.CurrentMap != MapNames.Polus: diff --git a/Patches/ChatCommandPatch.cs b/Patches/ChatCommandPatch.cs index e9e880505..16b5021b0 100644 --- a/Patches/ChatCommandPatch.cs +++ b/Patches/ChatCommandPatch.cs @@ -2189,7 +2189,7 @@ internal static class ChatCommands { case "crew": GameManager.Instance.enabled = false; - GameManager.Instance.RpcEndGame(GameOverReason.HumansDisconnect, false); + GameManager.Instance.RpcEndGame(GameOverReason.CrewmateDisconnect, false); break; case "imp": diff --git a/Patches/CheckGameEndPatch.cs b/Patches/CheckGameEndPatch.cs index 1b6557f14..a562f580a 100644 --- a/Patches/CheckGameEndPatch.cs +++ b/Patches/CheckGameEndPatch.cs @@ -66,7 +66,7 @@ internal static class GameEndChecker int saboWinner = Options.WhoWinsBySabotageIfNoImpAlive.GetValue(); - if (reason == GameOverReason.ImpostorBySabotage && saboWinner != 0 && !Main.AllAlivePlayerControls.Any(x => x.Is(Team.Impostor))) + if (reason == GameOverReason.ImpostorsBySabotage && saboWinner != 0 && !Main.AllAlivePlayerControls.Any(x => x.Is(Team.Impostor))) { bool anyNKAlive = Main.AllAlivePlayerControls.Any(x => x.IsNeutralKiller()); bool anyCovenAlive = Main.AllPlayerControls.Any(x => x.Is(Team.Coven)); @@ -175,12 +175,12 @@ internal static class GameEndChecker switch (role) { - case CustomRoles.DarkHide when pc.IsAlive() && ((WinnerTeam == CustomWinner.Impostor && !reason.Equals(GameOverReason.ImpostorBySabotage)) || WinnerTeam == CustomWinner.DarkHide || (WinnerTeam == CustomWinner.Crewmate && !reason.Equals(GameOverReason.HumansByTask) && roleBase is DarkHide { IsWinKill: true } && DarkHide.SnatchesWin.GetBool())): + case CustomRoles.DarkHide when pc.IsAlive() && ((WinnerTeam == CustomWinner.Impostor && !reason.Equals(GameOverReason.ImpostorsBySabotage)) || WinnerTeam == CustomWinner.DarkHide || (WinnerTeam == CustomWinner.Crewmate && !reason.Equals(GameOverReason.CrewmatesByTask) && roleBase is DarkHide { IsWinKill: true } && DarkHide.SnatchesWin.GetBool())): ResetAndSetWinner(CustomWinner.DarkHide); WinnerIds.Add(pc.PlayerId); break; case CustomRoles.Phantasm when pc.GetTaskState().RemainingTasksCount <= 0 && !pc.IsAlive() && Options.PhantomSnatchesWin.GetBool(): - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; ResetAndSetWinner(CustomWinner.Phantom); WinnerIds.Add(pc.PlayerId); break; @@ -244,7 +244,7 @@ internal static class GameEndChecker // If there's only 1 impostor alive, and all living impostors are Egoists, the Egoist wins alone case 1 when imps.All(x => x.Is(CustomRoles.Egoist)): PlayerControl pc = imps[0]; - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; WinnerTeam = CustomWinner.Egoist; WinnerIds.RemoveWhere(x => Main.PlayerStates[x].MainRole.IsImpostor() || x.GetPlayer().IsMadmate()); WinnerIds.Add(pc.PlayerId); @@ -287,7 +287,7 @@ internal static class GameEndChecker }); } - if ((WinnerTeam == CustomWinner.Lovers || WinnerIds.Any(x => Main.PlayerStates[x].SubRoles.Contains(CustomRoles.Lovers))) && Main.LoversPlayers.TrueForAll(x => x.IsAlive()) && reason != GameOverReason.HumansByTask) + if ((WinnerTeam == CustomWinner.Lovers || WinnerIds.Any(x => Main.PlayerStates[x].SubRoles.Contains(CustomRoles.Lovers))) && Main.LoversPlayers.TrueForAll(x => x.IsAlive()) && reason != GameOverReason.CrewmatesByTask) { if (WinnerTeam != CustomWinner.Lovers) AdditionalWinnerTeams.Add(AdditionalWinners.Lovers); @@ -360,7 +360,7 @@ internal static class GameEndChecker } bool canWin = WinnerIds.Contains(pc.PlayerId) || WinnerRoles.Contains(pc.GetCustomRole()) || (winner == CustomWinner.Bloodlust && pc.Is(CustomRoles.Bloodlust)); - bool isCrewmateWin = reason.Equals(GameOverReason.HumansByVote) || reason.Equals(GameOverReason.HumansByTask); + bool isCrewmateWin = reason.Equals(GameOverReason.CrewmatesByVote) || reason.Equals(GameOverReason.CrewmatesByTask); SetGhostRole(canWin ^ isCrewmateWin); // XOR continue; @@ -474,7 +474,7 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (WinnerTeam != CustomWinner.Default) return false; return CheckGameEndBySabotage(out reason) || CheckGameEndByTask(out reason) || CheckGameEndByLivingPlayers(out reason); @@ -482,7 +482,7 @@ internal static class GameEndChecker private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (Main.HasJustStarted) return false; @@ -550,17 +550,17 @@ internal static class GameEndChecker { if (Crew == 0 && Imp == 0) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; winner = CustomWinner.None; } else if (Crew <= Imp && sheriffCount == 0) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; winner = CustomWinner.Impostor; } else if (Imp == 0) { - reason = GameOverReason.HumansByVote; + reason = GameOverReason.CrewmatesByVote; winner = CustomWinner.Crewmate; } else @@ -582,7 +582,7 @@ internal static class GameEndChecker if (sheriffCount > 0) return false; Logger.Info($"Crew: {Crew}, Imp: {Imp}, Coven: {Coven}", "CheckGameEndPatch.CheckGameEndByLivingPlayers"); - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; ResetAndSetWinner(CustomWinner.Coven); } @@ -610,7 +610,7 @@ internal static class GameEndChecker foreach (KeyValuePair<(CustomRoles? Role, CustomWinner Winner), int> keyValuePair in roleCounts.Where(keyValuePair => keyValuePair.Value == aliveCounts[0])) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; winner = keyValuePair.Key.Winner; rl = keyValuePair.Key.Role; break; @@ -637,13 +637,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (SoloPVP.RoundTime > 0) return false; @@ -663,13 +663,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (FreeForAll.RoundTime <= 0) { @@ -737,13 +737,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (MoveAndStop.RoundTime <= 0) { @@ -786,13 +786,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; switch (Main.AllAlivePlayerControls.Length) { @@ -816,7 +816,7 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } @@ -830,7 +830,7 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } @@ -844,7 +844,7 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } @@ -858,13 +858,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; switch (Main.AllAlivePlayerControls.Length) { @@ -888,13 +888,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; PlayerControl[] appc = Main.AllAlivePlayerControls; @@ -920,7 +920,7 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } @@ -934,13 +934,13 @@ internal static class GameEndChecker { public override bool CheckForGameEnd(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; return WinnerIds.Count <= 0 && CheckGameEndByLivingPlayers(out reason); } private static bool CheckGameEndByLivingPlayers(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; PlayerControl[] appc = Main.AllAlivePlayerControls; @@ -972,7 +972,7 @@ internal static class GameEndChecker /// Determine whether the task can be won based on GameData.TotalTasks and CompletedTasks. public virtual bool CheckGameEndByTask(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (Options.DisableTaskWin.GetBool() || TaskState.InitialTotalTasks == 0) return false; if ((GameData.Instance.TotalTasks == 0 && GameData.Instance.CompletedTasks == 0) || !Main.PlayerStates.Values.Any(x => x.TaskState.HasTasks)) return false; @@ -981,7 +981,7 @@ internal static class GameEndChecker if (GameData.Instance.TotalTasks <= GameData.Instance.CompletedTasks) { - reason = GameOverReason.HumansByTask; + reason = GameOverReason.CrewmatesByTask; ResetAndSetWinner(CustomWinner.Crewmate); return true; } @@ -992,7 +992,7 @@ internal static class GameEndChecker /// Determines whether sabotage victory is possible based on the elements in ShipStatus.Systems. public virtual bool CheckGameEndBySabotage(out GameOverReason reason) { - reason = GameOverReason.ImpostorByKill; + reason = GameOverReason.ImpostorsByKill; if (ShipStatus.Instance.Systems == null) return false; // TryGetValue is not available @@ -1005,7 +1005,7 @@ internal static class GameEndChecker { // oxygen sabotage ResetAndSetWinner(CustomWinner.Impostor); - reason = GameOverReason.ImpostorBySabotage; + reason = GameOverReason.ImpostorsBySabotage; LifeSupp.Countdown = 10000f; return true; } @@ -1026,7 +1026,7 @@ internal static class GameEndChecker { // reactor sabotage ResetAndSetWinner(CustomWinner.Impostor); - reason = GameOverReason.ImpostorBySabotage; + reason = GameOverReason.ImpostorsBySabotage; critical.ClearSabotage(); return true; } diff --git a/Patches/Crowded.cs b/Patches/Crowded.cs index 66316d62f..6c5bead45 100644 --- a/Patches/Crowded.cs +++ b/Patches/Crowded.cs @@ -259,11 +259,11 @@ internal static class Crowded } } - [HarmonyPatch(typeof(GameOptionsData), nameof(GameOptionsData.AreInvalid))] + [HarmonyPatch(typeof(NormalGameOptionsV09), nameof(NormalGameOptionsV09.AreInvalid))] public static class InvalidOptionsPatches { [SuppressMessage("ReSharper", "UnusedMember.Global")] - public static bool Prefix(GameOptionsData __instance, [HarmonyArgument(0)] int maxExpectedPlayers) + public static bool Prefix(NormalGameOptionsV09 __instance, [HarmonyArgument(0)] int maxExpectedPlayers) { return __instance.MaxPlayers > maxExpectedPlayers || __instance.NumImpostors < 1 || diff --git a/Patches/DeconSystemPatch.cs b/Patches/DeconSystemPatch.cs index be8cc013e..3b83ca8ee 100644 --- a/Patches/DeconSystemPatch.cs +++ b/Patches/DeconSystemPatch.cs @@ -13,7 +13,7 @@ public static class DeconSystemUpdateSystemPatch { float deconTime = Main.CurrentMap switch { - MapNames.Mira => Options.DecontaminationTimeOnMiraHQ.GetFloat(), + MapNames.MiraHQ => Options.DecontaminationTimeOnMiraHQ.GetFloat(), MapNames.Polus => Options.DecontaminationTimeOnPolus.GetFloat(), _ => 3f }; diff --git a/Patches/DisconnectPenaltyPatch.cs b/Patches/DisconnectPenaltyPatch.cs index 8098df2fe..cea2d1d20 100644 --- a/Patches/DisconnectPenaltyPatch.cs +++ b/Patches/DisconnectPenaltyPatch.cs @@ -1,11 +1,12 @@ -using HarmonyLib; +using AmongUs.Data.Player; +using HarmonyLib; namespace EHR.Patches; -[HarmonyPatch(typeof(StatsManager), nameof(StatsManager.BanMinutesLeft), MethodType.Getter)] +[HarmonyPatch(typeof(PlayerBanData), nameof(PlayerBanData.BanMinutesLeft), MethodType.Getter)] public static class DisconnectPenaltyPatch { - public static bool Prefix(StatsManager __instance, ref int __result) + public static bool Prefix(PlayerBanData __instance, ref int __result) { if (!DebugModeManager.AmDebugger) return true; diff --git a/Patches/DleksPatch.cs b/Patches/DleksPatch.cs index a41637209..c7b473021 100644 --- a/Patches/DleksPatch.cs +++ b/Patches/DleksPatch.cs @@ -40,10 +40,10 @@ internal static class AllMapIconsPatch } } -[HarmonyPatch(typeof(AmongUsClient._CoStartGameHost_d__32), nameof(AmongUsClient._CoStartGameHost_d__32.MoveNext))] +[HarmonyPatch(typeof(AmongUsClient._CoStartGameHost_d__37), nameof(AmongUsClient._CoStartGameHost_d__37.MoveNext))] public static class DleksPatch { - public static bool Prefix(AmongUsClient._CoStartGameHost_d__32 __instance, ref bool __result) + public static bool Prefix(AmongUsClient._CoStartGameHost_d__37 __instance, ref bool __result) { if (__instance.__1__state != 0) return true; diff --git a/Patches/GameOptionsPatch.cs b/Patches/GameOptionsPatch.cs index 4f5d48805..e2c2daadf 100644 --- a/Patches/GameOptionsPatch.cs +++ b/Patches/GameOptionsPatch.cs @@ -35,11 +35,11 @@ internal static class SwitchGameModePatch } } -[HarmonyPatch(typeof(NormalGameOptionsV08), nameof(NormalGameOptionsV08.SetRecommendations), typeof(int), typeof(bool), typeof(RulesPresets))] -[HarmonyPatch(typeof(NormalGameOptionsV08), nameof(NormalGameOptionsV08.SetRecommendations), typeof(int), typeof(bool))] +[HarmonyPatch(typeof(NormalGameOptionsV09), nameof(NormalGameOptionsV09.SetRecommendations), typeof(int), typeof(bool), typeof(RulesPresets))] +[HarmonyPatch(typeof(NormalGameOptionsV09), nameof(NormalGameOptionsV09.SetRecommendations), typeof(int), typeof(bool))] internal static class SetRecommendationsPatch { - public static void Postfix(NormalGameOptionsV08 __instance, + public static void Postfix(NormalGameOptionsV09 __instance, [HarmonyArgument(0)] int numPlayers, [HarmonyArgument(1)] bool isOnline) { diff --git a/Patches/MapPickerMenuPatch.cs b/Patches/MapPickerMenuPatch.cs index b4a8c8489..57ce3df03 100644 --- a/Patches/MapPickerMenuPatch.cs +++ b/Patches/MapPickerMenuPatch.cs @@ -29,7 +29,7 @@ internal static class CreateOptionsPickerPatch dlekS_ehT.transform.SetSiblingIndex(dleksPos + 2); var dlekS_ehT_MapButton = dlekS_ehT.GetComponent(); DleksButton = dlekS_ehT_MapButton; - dlekS_ehT_MapButton.MapIcon.transform.localScale = new(-1f, 1f, 1f); + //dlekS_ehT_MapButton.MapIcon.transform.localScale = new(-1f, 1f, 1f); dlekS_ehT_MapButton.Button.OnClick.RemoveAllListeners(); dlekS_ehT_MapButton.Button.OnClick.AddListener((Action)(() => diff --git a/Patches/OnGameStartedPatch.cs b/Patches/OnGameStartedPatch.cs index b89ef8c4f..adda4144d 100644 --- a/Patches/OnGameStartedPatch.cs +++ b/Patches/OnGameStartedPatch.cs @@ -41,31 +41,32 @@ internal static class ChangeRoleSettings IEnumerator CoStartGame() { AmongUsClient amongUsClient = __instance; - if (FastDestroyableSingleton.Instance.GameMenu.IsOpen) FastDestroyableSingleton.Instance.GameMenu.Close(); - + if (FastDestroyableSingleton.Instance.GameMenu.IsOpen) + FastDestroyableSingleton.Instance.GameMenu.Close(); FastDestroyableSingleton.Instance.Init(); - amongUsClient.logger.Info($"Received game start: {amongUsClient.AmHost}"); + amongUsClient.logger.Info("Received game start: " + amongUsClient.AmHost); yield return null; - while (!DestroyableSingleton.InstanceExists) yield return null; - - while (PlayerControl.LocalPlayer == null) yield return null; - + while (!DestroyableSingleton.InstanceExists) + yield return null; + while (!PlayerControl.LocalPlayer) + yield return null; PlayerControl.LocalPlayer.moveable = false; PlayerControl.LocalPlayer.MyPhysics.inputHandler.enabled = true; - var objectOfType1 = Object.FindObjectOfType(); - if (objectOfType1 != null) objectOfType1.Close(false); - - var objectOfType2 = Object.FindObjectOfType(); - if (objectOfType2 != null) objectOfType2.Close(); - + PlayerCustomizationMenu objectOfType1 = Object.FindObjectOfType(); + if (objectOfType1) + objectOfType1.Close(false); + GameSettingMenu objectOfType2 = Object.FindObjectOfType(); + if (objectOfType2) + objectOfType2.Close(); if (DestroyableSingleton.InstanceExists) { // amongUsClient.DisconnectHandlers.Remove((IDisconnectHandler) FastDestroyableSingleton.Instance); Object.Destroy(FastDestroyableSingleton.Instance.gameObject); } - - if (DestroyableSingleton.InstanceExists) Object.Destroy(FastDestroyableSingleton.Instance.gameObject); - if (DestroyableSingleton.InstanceExists) FastDestroyableSingleton.Instance.SetPlayingGame(); + if (DestroyableSingleton.InstanceExists) + Object.Destroy(FastDestroyableSingleton.Instance.gameObject); + if (DestroyableSingleton.InstanceExists) + FastDestroyableSingleton.Instance.SetPlayingGame(); if (!string.IsNullOrEmpty(DataManager.Player.Store.ActiveCosmicube)) AmongUsClient.Instance.SetActivePodType(FastDestroyableSingleton.Instance.GetCubeDataByID(DataManager.Player.Store.ActiveCosmicube).podId); @@ -78,24 +79,29 @@ internal static class ChangeRoleSettings FastDestroyableSingleton.Instance.ConfirmationScreen.Cancel(); FastDestroyableSingleton.Instance.Ui.Close(true); FastDestroyableSingleton.Instance.ReparentUI(); - // CosmeticsCache.ClearUnusedCosmetics(); - yield return FastDestroyableSingleton.Instance.CoFadeFullScreen(Color.clear, Color.black, showLoader: true); - ++StatsManager.Instance.BanPoints; - StatsManager.Instance.LastGameStarted = DateTime.UtcNow; + + try + { + CosmeticsCache.ClearUnusedCosmetics(); + } + catch (Exception e) { Utils.ThrowException(e); } + yield return FastDestroyableSingleton.Instance.CoFadeFullScreen(Color.clear, Color.black); + ++DataManager.Player.Ban.BanPoints; + DataManager.Player.Ban.PreviousGameStartDate = DateTime.UtcNow; + DataManager.Player.Save(); if (amongUsClient.AmHost) yield return amongUsClient.CoStartGameHost(); else { yield return amongUsClient.CoStartGameClient(); - if (amongUsClient.AmHost) yield return amongUsClient.CoStartGameHost(); + if (amongUsClient.AmHost) + yield return amongUsClient.CoStartGameHost(); } - - for (var index = 0; index < GameData.Instance.PlayerCount; ++index) + for (int index = 0; index < GameData.Instance.PlayerCount; ++index) { - PlayerControl player = GameData.Instance.AllPlayers.ToArray()[index].Object; - - if (player != null) + PlayerControl player = GameData.Instance.AllPlayers[index].Object; + if (player) { player.moveable = true; player.NetTransform.enabled = true; @@ -106,21 +112,20 @@ internal static class ChangeRoleSettings ShipStatus.Instance.SpawnPlayer(player, GameData.Instance.PlayerCount, true); } } - FastDestroyableSingleton.Instance.SetRecentlyPlayed(GameData.Instance.AllPlayers); GameData.TimeGameStarted = Time.realtimeSinceStartup; int map = Mathf.Clamp(GameOptionsManager.Instance.CurrentGameOptions.MapId, 0, Constants.MapNames.Length - 1); string gameName = GameCode.IntToGameName(AmongUsClient.Instance.GameId); - FastDestroyableSingleton.Instance.Analytics.StartGame(PlayerControl.LocalPlayer.Data, GameData.Instance.PlayerCount, GameOptionsManager.Instance.CurrentGameOptions.NumImpostors, AmongUsClient.Instance.NetworkMode, (MapNames)map, GameOptionsManager.Instance.CurrentGameOptions.GameMode, gameName, FastDestroyableSingleton.Instance.CurrentRegion.Name, GameOptionsManager.Instance.CurrentGameOptions, GameData.Instance.AllPlayers); - + FastDestroyableSingleton.Instance.Analytics.StartGame(PlayerControl.LocalPlayer.Data, GameData.Instance.PlayerCount, GameOptionsManager.Instance.CurrentGameOptions.NumImpostors, AmongUsClient.Instance.NetworkMode, (MapNames) map, GameOptionsManager.Instance.CurrentGameOptions.GameMode, gameName, FastDestroyableSingleton.Instance.CurrentRegion.Name, GameOptionsManager.Instance.CurrentGameOptions, GameData.Instance.AllPlayers); try { - FastDestroyableSingleton.Instance.StartGame(AmongUsClient.Instance.AmHost, GameData.Instance.PlayerCount, GameOptionsManager.Instance.CurrentGameOptions.NumImpostors, AmongUsClient.Instance.NetworkMode, StatsManager.Instance.GetStat(StringNames.StatsGamesImpostor), StatsManager.Instance.GetStat(StringNames.StatsGamesStarted), StatsManager.Instance.GetStat(StringNames.StatsCrewmateStreak)); + FastDestroyableSingleton.Instance.StartGame(AmongUsClient.Instance.AmHost, GameData.Instance.PlayerCount, GameOptionsManager.Instance.CurrentGameOptions.NumImpostors, AmongUsClient.Instance.NetworkMode, DataManager.Player.Stats.GetStat(StatID.GamesAsImpostor), DataManager.Player.Stats.GetStat(StatID.GamesStarted), DataManager.Player.Stats.GetStat(StatID.CrewmateStreak)); NetworkedPlayerInfo.PlayerOutfit defaultOutfit = PlayerControl.LocalPlayer.Data.DefaultOutfit; FastDestroyableSingleton.Instance.StartGameCosmetics(defaultOutfit.ColorId, defaultOutfit.HatId, defaultOutfit.SkinId, defaultOutfit.PetId, defaultOutfit.VisorId, defaultOutfit.NamePlateId); } - catch { } - + catch + { + } GameDebugCommands.AddCommands(); } } @@ -415,7 +420,7 @@ internal static class StartGameHostPatch public static readonly Dictionary DataDisconnected = []; - private static RoleOptionsCollectionV08 RoleOpt => Main.NormalOptions.roleOptions; + private static RoleOptionsCollectionV09 RoleOpt => Main.NormalOptions.roleOptions; private static void UpdateRoleTypeNums() { diff --git a/Patches/RandomSpawnPatch.cs b/Patches/RandomSpawnPatch.cs index 1d05c69e3..f5e5292ff 100644 --- a/Patches/RandomSpawnPatch.cs +++ b/Patches/RandomSpawnPatch.cs @@ -110,7 +110,7 @@ internal abstract class RandomSpawn return Main.CurrentMap switch { MapNames.Skeld => new SkeldSpawnMap(), - MapNames.Mira => new MiraHQSpawnMap(), + MapNames.MiraHQ => new MiraHQSpawnMap(), MapNames.Polus => new PolusSpawnMap(), MapNames.Dleks => new DleksSpawnMap(), MapNames.Airship => new AirshipSpawnMap(), diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index eef6e9403..af9ec36ac 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -3182,13 +3182,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/es_ES.json b/Resources/Lang/es_ES.json index acc21b2ea..b3889fed6 100644 --- a/Resources/Lang/es_ES.json +++ b/Resources/Lang/es_ES.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "¡GG! No quedan más asesinos. ¡Los <#8cffff>Tripulantes ganan!", "SubText.Bloodlust": "Con un secreto....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Tripulantes desconectados", - "GameOverReason.ImpostorByKill": "Los Impostores mataron a todos", - "GameOverReason.ImpostorBySabotage": "LosTripulantes fallaron al arreglar un sabotaje crítico", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Tripulantes desconectados", + "GameOverReason.ImpostorsByKill": "Los Impostores mataron a todos", + "GameOverReason.ImpostorsBySabotage": "LosTripulantes fallaron al arreglar un sabotaje crítico", "GameOverReason.ImpostorByVote": "Los Tripulantes fueron expulsados", "GameOverReason.ImpostorDisconnect": "Impostores desconectados", - "GameOverReason.HumansByTask": "Los Tripulantes completaron todas las tareas", + "GameOverReason.CrewmatesByTask": "Los Tripulantes completaron todas las tareas", "DivinatorCheck.HideMsg": "Parece que {0} oculta secretos.", "DivinatorCheck.Honest": "Parece que {0} está siendo honesto.", "DivinatorCheck.Impulse": "Parece que {0} está suprimiendo alguna clase de impulso.", diff --git a/Resources/Lang/fr_FR.json b/Resources/Lang/fr_FR.json index 94a8663ef..5972b7d0a 100644 --- a/Resources/Lang/fr_FR.json +++ b/Resources/Lang/fr_FR.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/hu_HU.json b/Resources/Lang/hu_HU.json index 18673282a..6023d05fe 100644 --- a/Resources/Lang/hu_HU.json +++ b/Resources/Lang/hu_HU.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/id_ID.json b/Resources/Lang/id_ID.json index 3da01c5fe..ced11cd44 100644 --- a/Resources/Lang/id_ID.json +++ b/Resources/Lang/id_ID.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! Tak ada lagi pembunuh yang tersisa. <#8cffff>Crewmate menang!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Sepertinya {0} menyimpan rahasia.", "DivinatorCheck.Honest": "Sepertinya {0} sedang jujur.", "DivinatorCheck.Impulse": "Sepertinya {0} sedang memendam suatu hasrat.", diff --git a/Resources/Lang/ja_JP.json b/Resources/Lang/ja_JP.json index 30579de71..e345ac125 100644 --- a/Resources/Lang/ja_JP.json +++ b/Resources/Lang/ja_JP.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/ko_KR.json b/Resources/Lang/ko_KR.json index ad55a9e2d..8ba12864f 100644 --- a/Resources/Lang/ko_KR.json +++ b/Resources/Lang/ko_KR.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/pl_PL.json b/Resources/Lang/pl_PL.json index 520c4a471..1f70ddd08 100644 --- a/Resources/Lang/pl_PL.json +++ b/Resources/Lang/pl_PL.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! No more killers remain. <#8cffff>Crewmates win!", "SubText.Bloodlust": "With a secret....", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "Crewmates disconnected", - "GameOverReason.ImpostorByKill": "The Impostors killed everyone", - "GameOverReason.ImpostorBySabotage": "Crewmates failed to fix a critical sabotage", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "Crewmates disconnected", + "GameOverReason.ImpostorsByKill": "The Impostors killed everyone", + "GameOverReason.ImpostorsBySabotage": "Crewmates failed to fix a critical sabotage", "GameOverReason.ImpostorByVote": "The Crewmates were ejected", "GameOverReason.ImpostorDisconnect": "Impostors disconnected", - "GameOverReason.HumansByTask": "The Crewmates completed all tasks", + "GameOverReason.CrewmatesByTask": "The Crewmates completed all tasks", "DivinatorCheck.HideMsg": "Looks like {0} hides secrets.", "DivinatorCheck.Honest": "Looks like {0} is being honest.", "DivinatorCheck.Impulse": "Looks like {0} is suppressing some kind of impulse.", diff --git a/Resources/Lang/pt_BR.json b/Resources/Lang/pt_BR.json index 7dc85e50f..ebcd1985c 100644 --- a/Resources/Lang/pt_BR.json +++ b/Resources/Lang/pt_BR.json @@ -3169,13 +3169,13 @@ "BelongTo": "O alinhamento de {0} era {1}", "GG": "GG! Não restam mais assassinos. Tripulantes vencem!", "SubText.Bloodlust": "Com um segredo....", - "GameOverReason.HumansByVote": "Todos os Jogadores do Mal foram ejetados ou eliminados", - "GameOverReason.HumansDisconnect": "Tripulantes Desconectados", - "GameOverReason.ImpostorByKill": "Os Impostores matam Todos.", - "GameOverReason.ImpostorBySabotage": "Os Tripulantes falharam em Consertar uma sabotagem Crítica.", + "GameOverReason.CrewmatesByVote": "Todos os Jogadores do Mal foram ejetados ou eliminados", + "GameOverReason.CrewmateDisconnect": "Tripulantes Desconectados", + "GameOverReason.ImpostorsByKill": "Os Impostores matam Todos.", + "GameOverReason.ImpostorsBySabotage": "Os Tripulantes falharam em Consertar uma sabotagem Crítica.", "GameOverReason.ImpostorByVote": "Os Tripulantes foram Ejetados", "GameOverReason.ImpostorDisconnect": "Impostores Desconectados", - "GameOverReason.HumansByTask": "Os Tripulantes completaram todas as Tarefas", + "GameOverReason.CrewmatesByTask": "Os Tripulantes completaram todas as Tarefas", "DivinatorCheck.HideMsg": "Parece que [{0}] esconde segredos.", "DivinatorCheck.Honest": "Parece [{0}] está sendo honesto.", "DivinatorCheck.Impulse": "Parece que [{0}] está suprimindo algum tipo de impulso.", diff --git a/Resources/Lang/ru_RU.json b/Resources/Lang/ru_RU.json index 937c26a6a..f0f62cd95 100644 --- a/Resources/Lang/ru_RU.json +++ b/Resources/Lang/ru_RU.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0} - {1}", "GG": "GG! Все убийцы мертвы. Члены Экипажа победили!", "SubText.Bloodlust": "Однако есть один нюанс...", - "GameOverReason.HumansByVote": "Все Убийцы были выкинуты или убиты", - "GameOverReason.HumansDisconnect": "Члены Экипажа отключились", - "GameOverReason.ImpostorByKill": "Предатели убили всех", - "GameOverReason.ImpostorBySabotage": "Члены Экипажа не починили критический саботаж", + "GameOverReason.CrewmatesByVote": "Все Убийцы были выкинуты или убиты", + "GameOverReason.CrewmateDisconnect": "Члены Экипажа отключились", + "GameOverReason.ImpostorsByKill": "Предатели убили всех", + "GameOverReason.ImpostorsBySabotage": "Члены Экипажа не починили критический саботаж", "GameOverReason.ImpostorByVote": "Члены Экипажа были выкинуты", "GameOverReason.ImpostorDisconnect": "Предатели отключились", - "GameOverReason.HumansByTask": "Члены Экипажа выполнили все таски", + "GameOverReason.CrewmatesByTask": "Члены Экипажа выполнили все таски", "DivinatorCheck.HideMsg": "Похоже, что {0} что-то скрывает", "DivinatorCheck.Honest": "Похоже, что {0} честен", "DivinatorCheck.Impulse": "Похоже, что {0} подавляет импульсы", diff --git a/Resources/Lang/zh_CN.json b/Resources/Lang/zh_CN.json index b45141eeb..9f2810bc8 100644 --- a/Resources/Lang/zh_CN.json +++ b/Resources/Lang/zh_CN.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}的对齐是 {1}", "GG": "GG!场上没有剩余的内鬼了.<#8cffff>船员们获胜!", "SubText.Bloodlust": "使用密钥...", - "GameOverReason.HumansByVote": "所有邪恶玩家 都被驱逐或杀死了", - "GameOverReason.HumansDisconnect": "船员断开连接", - "GameOverReason.ImpostorByKill": "内鬼杀死了所有人", - "GameOverReason.ImpostorBySabotage": "船员没有成功修复紧急破坏", + "GameOverReason.CrewmatesByVote": "所有邪恶玩家 都被驱逐或杀死了", + "GameOverReason.CrewmateDisconnect": "船员断开连接", + "GameOverReason.ImpostorsByKill": "内鬼杀死了所有人", + "GameOverReason.ImpostorsBySabotage": "船员没有成功修复紧急破坏", "GameOverReason.ImpostorByVote": "船员被逐出", "GameOverReason.ImpostorDisconnect": "内鬼断开连接", - "GameOverReason.HumansByTask": "船员完成了所有任务", + "GameOverReason.CrewmatesByTask": "船员完成了所有任务", "DivinatorCheck.HideMsg": "{0}似乎藏着不可告人的秘密.", "DivinatorCheck.Honest": "{0}是一个诚实的人.", "DivinatorCheck.Impulse": "{0}似乎正抑制着某种冲动.", diff --git a/Resources/Lang/zh_TW.json b/Resources/Lang/zh_TW.json index 246c72c1c..2176106a0 100644 --- a/Resources/Lang/zh_TW.json +++ b/Resources/Lang/zh_TW.json @@ -3169,13 +3169,13 @@ "BelongTo": "{0}'s alignment was {1}", "GG": "GG! 場上沒有剩餘的偽裝者及帶刀中立了 <#8cffff>船員陣營 獲勝!", "SubText.Bloodlust": "帶著一個秘密......", - "GameOverReason.HumansByVote": "All Evil Players were ejected or killed", - "GameOverReason.HumansDisconnect": "船員斷線", - "GameOverReason.ImpostorByKill": "偽裝者人數占優", - "GameOverReason.ImpostorBySabotage": "船員沒有成功修復破壞", + "GameOverReason.CrewmatesByVote": "All Evil Players were ejected or killed", + "GameOverReason.CrewmateDisconnect": "船員斷線", + "GameOverReason.ImpostorsByKill": "偽裝者人數占優", + "GameOverReason.ImpostorsBySabotage": "船員沒有成功修復破壞", "GameOverReason.ImpostorByVote": "船員被逐出", "GameOverReason.ImpostorDisconnect": "偽裝者斷線", - "GameOverReason.HumansByTask": "船員完成了所有任務", + "GameOverReason.CrewmatesByTask": "船員完成了所有任務", "DivinatorCheck.HideMsg": "【{0}】似乎藏著不可告人的祕密", "DivinatorCheck.Honest": "【{0}】似乎是個憨厚老實的人", "DivinatorCheck.Impulse": "【{0}】似乎正在抑制著某種衝動", diff --git a/Roles/Crewmate/CameraMan.cs b/Roles/Crewmate/CameraMan.cs index 83df11b38..9b0dc7426 100644 --- a/Roles/Crewmate/CameraMan.cs +++ b/Roles/Crewmate/CameraMan.cs @@ -54,7 +54,7 @@ public class CameraMan : RoleBase CameraPosition = Main.CurrentMap switch { MapNames.Skeld => new(-13.5f, -5.5f), - MapNames.Mira => new(15.3f, 3.8f), + MapNames.MiraHQ => new(15.3f, 3.8f), MapNames.Polus => new(3.0f, -12.0f), MapNames.Dleks => new(-13.5f, -5.5f), MapNames.Airship => new(5.8f, -10.8f), diff --git a/Roles/Crewmate/Farseer.cs b/Roles/Crewmate/Farseer.cs index ec255c77b..bc530f66f 100644 --- a/Roles/Crewmate/Farseer.cs +++ b/Roles/Crewmate/Farseer.cs @@ -128,7 +128,7 @@ public class Farseer : RoleBase } else { - float range = NormalGameOptionsV08.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; + float range = NormalGameOptionsV09.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; float dis = Vector2.Distance(player.transform.position, arTarget.transform.position); if (dis <= range) diff --git a/Roles/Crewmate/SabotageMaster.cs b/Roles/Crewmate/SabotageMaster.cs index 0d2356b6b..a06220927 100644 --- a/Roles/Crewmate/SabotageMaster.cs +++ b/Roles/Crewmate/SabotageMaster.cs @@ -222,7 +222,7 @@ public class SabotageMaster : RoleBase break; } - case SystemTypes.Comms when Main.CurrentMap == MapNames.Mira: + case SystemTypes.Comms when Main.CurrentMap == MapNames.MiraHQ: { if (!FixesComms.GetBool()) break; diff --git a/Roles/Impostor/Deathpact.cs b/Roles/Impostor/Deathpact.cs index d62d9deb8..3935dd0cc 100644 --- a/Roles/Impostor/Deathpact.cs +++ b/Roles/Impostor/Deathpact.cs @@ -191,7 +191,7 @@ public class Deathpact : RoleBase foreach (PlayerControl player in dp.PlayersInDeathpact) { - float range = NormalGameOptionsV08.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; + float range = NormalGameOptionsV09.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; cancelDeathpact = dp.PlayersInDeathpact.Where(a => a.PlayerId != player.PlayerId).Select(otherPlayerInPact => Vector2.Distance(player.transform.position, otherPlayerInPact.transform.position)).Aggregate(cancelDeathpact, (current, dis) => current && dis <= range); } diff --git a/Roles/Impostor/Puppeteer.cs b/Roles/Impostor/Puppeteer.cs index 8198cd087..05da0a6f5 100644 --- a/Roles/Impostor/Puppeteer.cs +++ b/Roles/Impostor/Puppeteer.cs @@ -204,7 +204,7 @@ internal class Puppeteer : RoleBase { KeyValuePair min = targetDistance.OrderBy(c => c.Value).FirstOrDefault(); PlayerControl target = Utils.GetPlayerById(min.Key); - float KillRange = NormalGameOptionsV08.KillDistances[Mathf.Clamp(Main.NormalOptions.KillDistance, 0, 2)]; + float KillRange = NormalGameOptionsV09.KillDistances[Mathf.Clamp(Main.NormalOptions.KillDistance, 0, 2)]; if (min.Value <= KillRange && player.CanMove && target.CanMove) { diff --git a/Roles/Neutral/Agitater.cs b/Roles/Neutral/Agitater.cs index 4a213a8c7..79e3a2ec5 100644 --- a/Roles/Neutral/Agitater.cs +++ b/Roles/Neutral/Agitater.cs @@ -196,7 +196,7 @@ public class Agitater : RoleBase { KeyValuePair min = targetDistance.OrderBy(c => c.Value).FirstOrDefault(); PlayerControl target = Utils.GetPlayerById(min.Key); - float KillRange = GameOptionsData.KillDistances[Mathf.Clamp(GameOptionsManager.Instance.currentNormalGameOptions.KillDistance, 0, 2)]; + float KillRange = NormalGameOptionsV09.KillDistances[Mathf.Clamp(GameOptionsManager.Instance.currentNormalGameOptions.KillDistance, 0, 2)]; if (min.Value <= KillRange && player.CanMove && target.CanMove) PassBomb(player, target); } } diff --git a/Roles/Neutral/Arsonist.cs b/Roles/Neutral/Arsonist.cs index ee617712f..ead6969a5 100644 --- a/Roles/Neutral/Arsonist.cs +++ b/Roles/Neutral/Arsonist.cs @@ -198,7 +198,7 @@ internal class Arsonist : RoleBase } else { - float range = NormalGameOptionsV08.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; + float range = NormalGameOptionsV09.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; float dis = Vector2.Distance(player.transform.position, ar_target.transform.position); if (dis <= range) diff --git a/Roles/Neutral/Revolutionist.cs b/Roles/Neutral/Revolutionist.cs index 2e0686ba5..a73679f11 100644 --- a/Roles/Neutral/Revolutionist.cs +++ b/Roles/Neutral/Revolutionist.cs @@ -177,7 +177,7 @@ internal class Revolutionist : RoleBase } else { - float range = NormalGameOptionsV08.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; + float range = NormalGameOptionsV09.KillDistances[Mathf.Clamp(player.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f; float dis = Vector2.Distance(player.transform.position, rv_target.transform.position); if (dis <= range) diff --git a/Roles/Neutral/RoomRusher.cs b/Roles/Neutral/RoomRusher.cs index 6f1e1c882..77ab92caa 100644 --- a/Roles/Neutral/RoomRusher.cs +++ b/Roles/Neutral/RoomRusher.cs @@ -88,7 +88,7 @@ public class RoomRusher : RoleBase : map switch { MapNames.Skeld => SystemTypes.Cafeteria, - MapNames.Mira => afterMeeting ? SystemTypes.Cafeteria : SystemTypes.Launchpad, + MapNames.MiraHQ => afterMeeting ? SystemTypes.Cafeteria : SystemTypes.Launchpad, MapNames.Dleks => SystemTypes.Cafeteria, MapNames.Polus => afterMeeting ? SystemTypes.Office : SystemTypes.Dropship, MapNames.Airship => SystemTypes.MainHall, @@ -109,7 +109,7 @@ public class RoomRusher : RoleBase bool involvesDecontamination = map switch { - MapNames.Mira => (previous is SystemTypes.Laboratory or SystemTypes.Reactor) ^ (RoomGoal is SystemTypes.Laboratory or SystemTypes.Reactor), + MapNames.MiraHQ => (previous is SystemTypes.Laboratory or SystemTypes.Reactor) ^ (RoomGoal is SystemTypes.Laboratory or SystemTypes.Reactor), MapNames.Polus => previous == SystemTypes.Specimens || RoomGoal == SystemTypes.Specimens, _ => false }; diff --git a/Roles/Neutral/Samurai.cs b/Roles/Neutral/Samurai.cs index bbf0a83e1..4a1031460 100644 --- a/Roles/Neutral/Samurai.cs +++ b/Roles/Neutral/Samurai.cs @@ -112,7 +112,7 @@ internal class Samurai : RoleBase PlayerControl target = Utils.GetPlayerById(Target.Id); if (target == null) return; - if (Vector2.Distance(target.Pos(), pc.Pos()) > NormalGameOptionsV08.KillDistances[Mathf.Clamp(pc.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f) + if (Vector2.Distance(target.Pos(), pc.Pos()) > NormalGameOptionsV09.KillDistances[Mathf.Clamp(pc.Is(CustomRoles.Reach) ? 2 : Main.NormalOptions.KillDistance, 0, 2)] + 0.5f) { Target = (byte.MaxValue, 0); pc.RpcCheckAndMurder(target); diff --git a/Roles/Neutral/Technician.cs b/Roles/Neutral/Technician.cs index 19378c165..d77760f55 100644 --- a/Roles/Neutral/Technician.cs +++ b/Roles/Neutral/Technician.cs @@ -163,7 +163,7 @@ public class Technician : RoleBase } case SystemTypes.Comms: { - if (Main.CurrentMap is MapNames.Mira or MapNames.Fungle) + if (Main.CurrentMap is MapNames.MiraHQ or MapNames.Fungle) { var tags = (HqHudSystemType.Tags)(amount & HqHudSystemType.TagMask); if (tags == HqHudSystemType.Tags.ActiveBit) technician.FixedSabotage = false;