diff --git a/GameMode/RoomRush.cs b/GameMode/RoomRush.cs index 1b8be5afd..98dc97987 100644 --- a/GameMode/RoomRush.cs +++ b/GameMode/RoomRush.cs @@ -353,7 +353,7 @@ public static class RoomRush : 6; if (SubmergedCompatibility.IsSubmerged()) decontaminationTime = 3; - time += decontaminationTime + 3; + time += decontaminationTime; } switch (map) diff --git a/Main.cs b/Main.cs index aaed04401..80465bb6e 100644 --- a/Main.cs +++ b/Main.cs @@ -824,6 +824,9 @@ public class Main : BasePlugin try { HandleRoleColorFiles(); } catch (Exception e) { Utils.ThrowException(e); } + if (AutoHaunt.Value) + Modules.AutoHaunt.Start(); + Logger.Msg("========= EHR loaded! =========", "Plugin Load"); Logger.Msg($"EHR Version: {PluginVersion}, Test Build: {TestBuild}", "Plugin Load"); }; diff --git a/Modules/Debugger.cs b/Modules/Debugger.cs index 51b4afe21..6ca993e3d 100644 --- a/Modules/Debugger.cs +++ b/Modules/Debugger.cs @@ -253,6 +253,8 @@ public class CustomLogger if (dump) append += HtmlFooter; File.AppendAllText(LOGFilePath, append); PrivateInstance = null; - if (dump) Main.Instance.StopCoroutine(InactivityCheck()); +#if DEBUG + Main.Instance.StopCoroutine(InactivityCheck()); +#endif } } \ No newline at end of file diff --git a/Modules/ExtendedPlayerControl.cs b/Modules/ExtendedPlayerControl.cs index c45dc828e..fa5a5356f 100644 --- a/Modules/ExtendedPlayerControl.cs +++ b/Modules/ExtendedPlayerControl.cs @@ -261,7 +261,7 @@ internal static class ExtendedPlayerControl if (init) Main.PlayerStates[player.PlayerId].InitTask(player); } - public static HashSet TempExiled = []; + public static readonly HashSet TempExiled = []; public static void ExileTemporarily(this PlayerControl pc) { diff --git a/Modules/GameState.cs b/Modules/GameState.cs index 842da29ef..8738933fe 100644 --- a/Modules/GameState.cs +++ b/Modules/GameState.cs @@ -208,7 +208,7 @@ public class PlayerState(byte playerId) case CustomRoles.Cleansed: replaceAll = true; break; - case CustomRoles.BananaMan when !SubRoles.Contains(CustomRoles.BananaMan): + case CustomRoles.BananaMan when Main.IntroDestroyed && !SubRoles.Contains(CustomRoles.BananaMan): LateTask.New(() => Utils.RpcChangeSkin(Player, new()), 0.2f, log: false); break; } diff --git a/Modules/Utils.cs b/Modules/Utils.cs index 459f493c2..4a1135ff0 100644 --- a/Modules/Utils.cs +++ b/Modules/Utils.cs @@ -2080,7 +2080,7 @@ public static class Utils if (Options.FormatNameMode.GetInt() == 1 && Main.NickName == string.Empty) { string notFormattedName = Palette.GetColorName(player.Data.DefaultOutfit.ColorId); - name = char.ToUpper(notFormattedName[0]) + notFormattedName.Substring(1).ToLower(); + name = char.ToUpper(notFormattedName[0]) + notFormattedName[1..].ToLower(); } } else diff --git a/Patches/DeconSystemPatch.cs b/Patches/DeconSystemPatch.cs index 00468121f..9e99e837e 100644 --- a/Patches/DeconSystemPatch.cs +++ b/Patches/DeconSystemPatch.cs @@ -9,12 +9,12 @@ public static class DeconSystemUpdateSystemPatch { if (!AmongUsClient.Instance.AmHost || SubmergedCompatibility.IsSubmerged()) return; - if (Options.ChangeDecontaminationTime.GetBool()) - { - bool bedwars = Options.CurrentGameMode == CustomGameMode.BedWars; - bool roomrush = Options.CurrentGameMode == CustomGameMode.RoomRush; + bool bedwars = Options.CurrentGameMode == CustomGameMode.BedWars; + bool roomrush = Options.CurrentGameMode == CustomGameMode.RoomRush; - __instance.DoorOpenTime = bedwars + if (bedwars || roomrush || Options.ChangeDecontaminationTime.GetBool()) + { + __instance.DoorOpenTime = bedwars || roomrush ? 2f : Main.CurrentMap switch { diff --git a/Patches/HudPatch.cs b/Patches/HudPatch.cs index ef5e96e5f..c20dcc6d7 100644 --- a/Patches/HudPatch.cs +++ b/Patches/HudPatch.cs @@ -827,15 +827,15 @@ internal static class TaskPanelBehaviourPatch { string[] splitted = roleInfo.Split(' '); - roleWithInfo = splitted.Length <= 3 + roleWithInfo = $"{GetString($"{Options.CurrentGameMode}")}\r\n" + (splitted.Length <= 3 ? $"{roleInfo}\r\n" - : $"{string.Join(' ', splitted[..3])}\r\n{string.Join(' ', splitted[3..])}\r\n"; + : $"{string.Join(' ', splitted[..3])}\r\n{string.Join(' ', splitted[3..])}\r\n"); } else if (roleInfo.RemoveHtmlTags().Length > 35) { string[] split = roleInfo.Split(' '); int half = split.Length / 2; - roleWithInfo = $"{GetString($"{Options.CurrentGameMode}")}\r\n{role.ToColoredString()}:\r\n{string.Join(' ', split[..half])}\r\n{string.Join(' ', split[half..])}"; + roleWithInfo = $"{role.ToColoredString()}:\r\n{string.Join(' ', split[..half])}\r\n{string.Join(' ', split[half..])}"; } string finalText = Utils.ColorString(player.GetRoleColor(), roleWithInfo); diff --git a/Patches/HudSpritePatch.cs b/Patches/HudSpritePatch.cs index 6d2e8bef6..334d0ce3c 100644 --- a/Patches/HudSpritePatch.cs +++ b/Patches/HudSpritePatch.cs @@ -195,11 +195,6 @@ public static class HudSpritePatch newAbilityButton = CustomButton.Get("JesterVent"); break; } - case CustomRoles.Mario: - { - newAbilityButton = CustomButton.Get("Happy"); - break; - } case CustomRoles.Transporter: case CustomRoles.Swapster: { diff --git a/Patches/OnGameStartedPatch.cs b/Patches/OnGameStartedPatch.cs index 505faa753..38b684863 100644 --- a/Patches/OnGameStartedPatch.cs +++ b/Patches/OnGameStartedPatch.cs @@ -292,6 +292,7 @@ internal static class ChangeRoleSettings AFKDetector.ShieldedPlayers.Clear(); Main.Invisible.Clear(); ChatCommands.MutedPlayers.Clear(); + ExtendedPlayerControl.TempExiled.Clear(); MeetingTimeManager.Init(); Main.DefaultCrewmateVision = Main.RealOptionsData.GetFloat(FloatOptionNames.CrewLightMod); diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index bd89f27f1..3d591fe61 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -1727,6 +1727,7 @@ "AssassinMarkCooldown": "Mark Cooldown", "AssassinAssassinateCooldown": "Assassinate Cooldown", "AssassinCanKillAfterAssassinate": "Can kill after Assassinating", + "AssassinInvisibilityTimeAfterAssassinate": "Invisibility Time After Assassination", "UndertakerMarkCooldown": "Mark Cooldown", "UndertakerAssassinateCooldown": "Assassinate Cooldown", "UndertakerCanKillAfterAssassinate": "Can kill after Assassinating",