From 18f009e861954fd2f60b75c01ef62553f13319d4 Mon Sep 17 00:00:00 2001 From: Gurge44 Date: Tue, 10 Mar 2026 09:35:54 +0100 Subject: [PATCH] changelog --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++-- Gamemodes/NaturalDisasters.cs | 2 +- Modules/ExtendedPlayerControl.cs | 8 ++++++-- Modules/OptionHolder.cs | 17 +++++++++++------ Modules/OptionShower.cs | 7 +++++-- Patches/ControlPatch.cs | 4 ++-- Patches/TextBoxPatch.cs | 6 +++--- README.md | 1 + 8 files changed, 59 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80654e8b5..7d9a556d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,37 @@ > [!CAUTION] > **Use commands with a `/cmd ` prefix, otherwise your message gets leaked.** So if you were to type `/bt 4 snitch`, you would now type `/cmd bt 4 snitch`. The system will NOT spam the chat after command usage even if it would be required. -- Fixed translations not loading +- **Fixed translations not loading** +- **Fixed players not dying after meetings** +- **Fixed kill buttons not working in FFA** +- **Fixed shapeshift abilities not working for non-host modded clients** - Widened the lines in the Preset Explorer so the text fits into the box +- There's now a button to show a preset's description in the Preset Explorer - Fixed add-on limit ignoring setting -- Meeting shapeshift settings are gone, it's no longer needed because of the foolproof /cmd way. +- Deaths due to disasters in Solo PVP, King Of The Zones, and Bed Wars are now temporary (when Natural Disasters is integrated) +- Optimized code for Capture The Flag, Hot Potato, King Of The Zones, and Snowdown +- Fixed incorrect kill cooldowns in Hot Potato, and Snowdown +- Improved role selection logic +- Fixed host being able to kill through walls in some game modes +- Flash, Giant, and Mare no longer bypass freezing abilites +- Auto Team Size adjustments no longer happen if there are no changes in settings +- Fixed Necronomicon hold not syncing for non-host modded clients +- Fixed Stained not syncing with non-host modded clients +- New commands: `/neutralinfo`, `/coveninfo`, does what you think it does +- Drafting options no longer re-send for a player if they've already drafted +- Schrödinger's Cat is now guessable (hopefully) +- Settings UI no longer scrolls while chat is open (by Tommy-XL) +- Search bar scrolls to top in settings UI on ENTER press (by Tommy-XL) +- Fixed player info not showing above the host in a non-host modded client POV +- Fixed missing strings +- Fixed punctuation mistakes in strings (by WaterPanda) +- Fixed devoured players losing their pet when using them as ability triggers +- Fixed Werewolf not getting a kill button as a non-host modded client +- New setting for Simon: `Ability Cooldown` +- New setting for Slenderman: `Blinding Affects Players Inside Vents` + +## Lobby Settings Viewer (by Tommy-XL) +- Modded clients can now use the `View` button in lobby to see all modded settings, roles, add-ons, and their current values +- Removed the manual option shower on the left side of the screen --- \ No newline at end of file diff --git a/Gamemodes/NaturalDisasters.cs b/Gamemodes/NaturalDisasters.cs index 19f180522..e2b3218fe 100644 --- a/Gamemodes/NaturalDisasters.cs +++ b/Gamemodes/NaturalDisasters.cs @@ -148,7 +148,7 @@ public static class NaturalDisasters { var allRooms = ShipStatus.Instance.AllRooms; var collapsedRooms = BuildingCollapse.CollapsedRooms; - string cb = allRooms.Count / 2 < collapsedRooms.Count + string cb = allRooms.Count / 2 <= collapsedRooms.Count ? (string.Format(Translator.GetString("AvailableBuildings"), allRooms.Count != collapsedRooms.Count ? allRooms.Select(x => x.RoomId).Where(x => x is not (SystemTypes.Hallway or SystemTypes.Outside) && !x.ToString().Contains("Decontamination")).Except(collapsedRooms.ConvertAll(x => x.RoomId)).Select(x => Translator.GetString($"{x}")).Distinct().Join() : $"<#ff0000>{Translator.GetString("None")}")) diff --git a/Modules/ExtendedPlayerControl.cs b/Modules/ExtendedPlayerControl.cs index c99643bf5..511ef431b 100644 --- a/Modules/ExtendedPlayerControl.cs +++ b/Modules/ExtendedPlayerControl.cs @@ -1840,6 +1840,10 @@ internal static class ExtendedPlayerControl return Main.PlayerStates[pc.PlayerId].SubRoles.Any(x => x.IsEvilAddon()); } + /// + /// Sets a players kill cooldown without syncing settings. + /// When using this method, ResetKillCooldown should set the player's kill cooldown to twice the value. + /// public static void SetKillCooldownNonSync(this PlayerControl pc, float kcd) { if (pc.AmOwner) @@ -1854,10 +1858,10 @@ internal static class ExtendedPlayerControl } else { - // ResetKillCooldown sets every player's kill cooldown to twice the value. + // When using this method, ResetKillCooldown should set the player's kill cooldown to twice the value. // MurderPlayer RPC with FailedProtected flag sets a player's kill cooldown to half the set value. // *2 /2 = the value we began with. This avoids syncing settings on every CheckMurder. - // This works because the kill cooldown is consistent throughout the entire game. + // This works if the kill cooldown is consistent throughout the entire game. MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(pc.NetId, (byte)RpcCalls.MurderPlayer, SendOption.Reliable, pc.OwnerId); writer.WriteNetObject(pc); writer.Write((int)MurderResultFlags.FailedProtected); diff --git a/Modules/OptionHolder.cs b/Modules/OptionHolder.cs index 1d5867872..cbe7f4962 100644 --- a/Modules/OptionHolder.cs +++ b/Modules/OptionHolder.cs @@ -962,7 +962,7 @@ public static class Options GroupAddons(); LoadUserData(); Achievements.LoadAllData(); - OptionShower.LastText = Translator.GetString("Loading"); + // OptionShower.LastText = Translator.GetString("Loading"); if (AllCrewRolesHaveVanillaColor.GetBool()) { @@ -1943,11 +1943,13 @@ public static class Options .SetParent(FungleChance) .SetValueFormat(OptionFormat.Players); - OverrideSpeedForEachMap = new BooleanOptionItem(20782, "OverrideSpeedForEachMap", false, TabGroup.GameSettings); + OverrideSpeedForEachMap = new BooleanOptionItem(20782, "OverrideSpeedForEachMap", false, TabGroup.GameSettings) + .SetColor(new Color32(19, 188, 233, byte.MaxValue)); MapSpeeds = Enum.GetValues().ToDictionary(x => x, x => new FloatOptionItem(20783 + (int)x, "SpeedForMap", new(0.05f, 3f, 0.05f), 1.25f, TabGroup.GameSettings) .SetParent(OverrideSpeedForEachMap) .SetValueFormat(OptionFormat.Multiplier) + .SetColor(new Color32(19, 188, 233, byte.MaxValue)) .AddReplacement(("{map}", Translator.GetString(x.ToString())))); LoadingPercentage = 69; @@ -3069,11 +3071,13 @@ public static class Options .SetColor(new Color32(193, 255, 209, byte.MaxValue)) .SetParent(EnableGameTimeLimit); - OverrideVisionInVents = new BooleanOptionItem(19436, "OverrideVisionInVents", false, TabGroup.GameSettings); + OverrideVisionInVents = new BooleanOptionItem(19436, "OverrideVisionInVents", false, TabGroup.GameSettings) + .SetColor(new Color32(193, 255, 209, byte.MaxValue)); InVentVision = Enum.GetValues()[1..].ToDictionary(x => x, x => new FloatOptionItem(19437 + (int)x, "InVentVisionForTeam", new(0f, 1.3f, 0.05f), x == Team.Crewmate ? 0f : 0.5f, TabGroup.GameSettings) .SetParent(OverrideVisionInVents) .SetValueFormat(OptionFormat.Multiplier) + .SetColor(new Color32(193, 255, 209, byte.MaxValue)) .AddReplacement(("{team}", Utils.ColorString(x.GetColor(), Translator.GetString($"Type{x}"))))); @@ -3290,10 +3294,11 @@ public static class Options if (!AmongUsClient.Instance.AmHost || !EnableAutoFactionMinMaxSettings.GetBool()) return; int playerCount = PlayerControl.AllPlayerControls.Count; - if (playerCount == LastUsedPlayerCount) return; var filtered = AutoFactionMinMaxSettings.FindAll(x => x.MinPlayersToActivate.GetInt() > 0 && x.MinPlayersToActivate.GetInt() <= playerCount); if (filtered.Count == 0) return; var usedValues = filtered.MaxBy(x => x.MinPlayersToActivate.GetInt()); + var usedPlayerCount = usedValues.MinPlayersToActivate.GetInt(); + if (usedPlayerCount == LastUsedPlayerCount) return; foreach ((Team team, (OptionItem minSetting, OptionItem maxSetting)) in FactionMinMaxSettings) { @@ -3308,9 +3313,9 @@ public static class Options OptionSaver.Save(); OptionItem.SyncAllOptions(); - Logger.SendInGame(string.Format(Translator.GetString("AutoFactionMinMaxSettings.Applied"), playerCount, usedValues.MinPlayersToActivate.GetInt(), string.Join(", ", new[] { Team.Impostor, Team.Coven, Team.Neutral }.Select(x => $"{Utils.ColorString(x.GetColor(), Translator.GetString($"ShortTeamName.{x}").ToUpper())}: <#ffffff>{usedValues.TeamSettings[x].MinSetting.GetInt()}-{usedValues.TeamSettings[x].MaxSetting.GetInt()}")), usedValues.MinNNKs.GetInt(), usedValues.MaxNNKs.GetInt())); + Logger.SendInGame(string.Format(Translator.GetString("AutoFactionMinMaxSettings.Applied"), playerCount, usedPlayerCount, string.Join(", ", new[] { Team.Impostor, Team.Coven, Team.Neutral }.Select(x => $"{Utils.ColorString(x.GetColor(), Translator.GetString($"ShortTeamName.{x}").ToUpper())}: <#ffffff>{usedValues.TeamSettings[x].MinSetting.GetInt()}-{usedValues.TeamSettings[x].MaxSetting.GetInt()}")), usedValues.MinNNKs.GetInt(), usedValues.MaxNNKs.GetInt())); - LastUsedPlayerCount = playerCount; + LastUsedPlayerCount = usedPlayerCount; } catch (Exception e) { Utils.ThrowException(e); } } diff --git a/Modules/OptionShower.cs b/Modules/OptionShower.cs index 060bc5cbf..b320bcde9 100644 --- a/Modules/OptionShower.cs +++ b/Modules/OptionShower.cs @@ -1,3 +1,6 @@ +// Now EHR uses LobbyViewSettingsPane instead of this + +/* using System.Collections; using System.Collections.Generic; using System.Linq; @@ -17,7 +20,7 @@ public static class OptionShower static OptionShower() { } - // Now EHR use LobbyViewSettingsPane instead of this + public static string GetTextNoFresh() { try @@ -155,5 +158,5 @@ public static class OptionShower if (opt.Value.GetBool()) ShowChildren(opt.Value, ref sb, color, deep + 1); } } - } +*/ \ No newline at end of file diff --git a/Patches/ControlPatch.cs b/Patches/ControlPatch.cs index c42bdbd3c..27bece159 100644 --- a/Patches/ControlPatch.cs +++ b/Patches/ControlPatch.cs @@ -48,13 +48,13 @@ internal static class ControllerManagerUpdatePatch if (GameStates.IsLobby && (!HudManager.Instance.Chat || !HudManager.Instance.Chat.IsOpenOrOpening)) { - //if (Input.GetKeyDown(KeyCode.Tab)) OptionShower.Next(); + /*if (Input.GetKeyDown(KeyCode.Tab)) OptionShower.Next(); for (var i = 0; i < 9; i++) { if (OrGetKeysDown(KeyCode.Alpha1 + i, KeyCode.Keypad1 + i) && OptionShower.Pages.Count >= i + 1) OptionShower.CurrentPage = i; - } + }*/ if (KeysDown(KeyCode.Return) && GameSettingMenu.Instance && GameSettingMenu.Instance.isActiveAndEnabled) GameSettingMenuPatch.SearchForOptionsAction?.Invoke(); diff --git a/Patches/TextBoxPatch.cs b/Patches/TextBoxPatch.cs index 3c667d288..1894606c5 100644 --- a/Patches/TextBoxPatch.cs +++ b/Patches/TextBoxPatch.cs @@ -274,7 +274,7 @@ public static class TextBoxPatch { Dictionary allIds = Main.EnumeratePlayerControls().ToDictionary(x => x.PlayerId, x => x.PlayerId.ColoredPlayerName()); additionalInfo = $"{Translator.GetString("PlayerIdList").TrimEnd(' ')}\n{string.Join('\n', allIds.Select(x => $"{x.Key} \uffeb {x.Value}"))}"; - OptionShower.CurrentPage = 0; + // OptionShower.CurrentPage = 0; } continue; @@ -362,8 +362,8 @@ public static class TextBoxPatch __instance.freeChatField.textArea.SetText(PlaceHolderText.text); __instance.freeChatField.textArea.compoText = ""; - if (AdditionalInfoText && AdditionalInfoText.text != "") - OptionShower.CurrentPage = 0; + /*if (AdditionalInfoText && AdditionalInfoText.text != "") + OptionShower.CurrentPage = 0;*/ } public static void CheckChatOpen() diff --git a/README.md b/README.md index 08c95be1c..5bc77d579 100644 --- a/README.md +++ b/README.md @@ -542,6 +542,7 @@ Click this badge to view our translation project: > > - Next button sprites (Inactive and Active) +> - Double task panel ### Endless Host Roles (EHR), with Endless Possibilities, brought to you by the Endless Network.