From 7ed8519fb436a3b5a8221aa33d527678ce4b3fd8 Mon Sep 17 00:00:00 2001 From: Gurge44 Date: Thu, 13 Aug 2026 09:49:15 +0200 Subject: [PATCH] something --- Gamemodes/NaturalDisasters.cs | 2 +- Modules/CustomNetObject.cs | 4 +- Modules/Extensions/CollectionExtensions.cs | 47 +++++++++++----------- Modules/Utils.cs | 2 +- Resources/Lang/en_US.json | 1 + Resources/Lang/ko_KR.json | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Gamemodes/NaturalDisasters.cs b/Gamemodes/NaturalDisasters.cs index 49ecd1a81..048fb9530 100644 --- a/Gamemodes/NaturalDisasters.cs +++ b/Gamemodes/NaturalDisasters.cs @@ -69,7 +69,7 @@ public static class NaturalDisasters Color color = Utils.GetRoleColor(CustomRoles.NDPlayer); const CustomGameMode gameMode = CustomGameMode.NaturalDisasters; - DisasterFrequency = new FloatOptionItem(id++, "ND_DisasterFrequency", new(0f, 20f, 0.1f), 1f, TabGroup.GameSettings) + DisasterFrequency = new FloatOptionItem(id++, "ND_DisasterFrequency", new(0f, 20f, 0.1f), 2f, TabGroup.GameSettings) .SetHeader(true) .SetGameMode(gameMode) .SetColor(color) diff --git a/Modules/CustomNetObject.cs b/Modules/CustomNetObject.cs index 2408e72cd..5e489c149 100644 --- a/Modules/CustomNetObject.cs +++ b/Modules/CustomNetObject.cs @@ -31,7 +31,7 @@ namespace EHR private int SnapToSendFrameCount; - private bool IsPooled; + protected bool IsPooled; public void RpcChangeSprite(string sprite) { @@ -695,7 +695,7 @@ namespace EHR CreateNetObject(warning, position); } - protected override bool ConstantlyChangesPosition => !SpawnTimer.IsRunning && DisasterName is "Tsunami" or "Tornado"; + protected override bool ConstantlyChangesPosition => !SpawnTimer.IsRunning && DisasterName is "Tsunami" or "Tornado" && !IsPooled; public SystemTypes? Room { get; } public string DisasterName { get; } diff --git a/Modules/Extensions/CollectionExtensions.cs b/Modules/Extensions/CollectionExtensions.cs index f92a9a37e..b312472dd 100644 --- a/Modules/Extensions/CollectionExtensions.cs +++ b/Modules/Extensions/CollectionExtensions.cs @@ -190,30 +190,6 @@ public static class CollectionExtensions return (list1, list2); } - /// - /// Splits a collection into two integers based on a predicate - /// - /// The predicate to split the collection by - /// - /// A tuple containing two integers: one that is the number of elements that satisfy the predicate, and one that is the number of elements that - /// do not - /// - public (int TrueCount, int FalseCount) SplitCount(Func predicate) - { - var int1 = 0; - var int2 = 0; - - foreach (T element in collection) - { - if (predicate(element)) - int1++; - else - int2++; - } - - return (int1, int2); - } - /// /// Determines whether a collection contains any elements that satisfy a predicate and returns the first element that /// satisfies the predicate @@ -476,6 +452,29 @@ public static class CollectionExtensions return sb.ToString(); } + + /// + /// Splits a collection into two integers based on a predicate + /// + /// The predicate to split the collection by + /// + /// A tuple containing two integers: one that is the number of elements that satisfy the predicate, and one that is the number of elements that do not + /// + public (int TrueCount, int FalseCount) SplitCount(Func predicate) + { + var int1 = 0; + var int2 = 0; + + for (var i = 0; i < collection.Count; i++) + { + if (predicate(collection[i])) + int1++; + else + int2++; + } + + return (int1, int2); + } } /// diff --git a/Modules/Utils.cs b/Modules/Utils.cs index a43bd910b..d11637f31 100644 --- a/Modules/Utils.cs +++ b/Modules/Utils.cs @@ -2526,7 +2526,7 @@ public static class Utils name = $"{GetString("HostText")}{GetString("Icon")}{name}"; CustomGameMode gameMode = Options.CurrentGameMode; - var modeText = $"{GetString(gameMode == CustomGameMode.HideAndSeek && CustomHnS.SNS ? "HNS.ShiftAndSeek" : $"Mode{gameMode}")}"; + var modeText = $"{GetString(gameMode == CustomGameMode.HideAndSeek && CustomHnS.SNS ? "ModeShiftAndSeek" : $"Mode{gameMode}")}"; name = gameMode switch { diff --git a/Resources/Lang/en_US.json b/Resources/Lang/en_US.json index a2dbe4ae8..ccab55f01 100644 --- a/Resources/Lang/en_US.json +++ b/Resources/Lang/en_US.json @@ -4464,6 +4464,7 @@ "FFA_TeamNumber": "Number of Teams", "HideAndSeek": "HIDE AND SEEK", "ModeHideAndSeek": "Gamemode: Hide And Seek", + "ModeShiftAndSeek": "Gamemode: Shift And Seek", "ModeDescribe.HideAndSeek": "In the Hide And Seek gamemode, seekers have to kill all hiders, while hiders have to complete all tasks without being killed in order to win.\\nIf the time limit reaches 0, hiders win.\\nIf everyone apart from the Seekers die, the Seekers win.\\n\\nRoles: Hider, Seeker, Fox, Troll, Jumper, Detector, Jet, Dasher, Locator, Venter, Agent, Taskinator", "GameModeTutorial.HideAndSeek": "The current game mode is <#345eeb>Hide And Seek (Modded).\\nSeekers must kill all hiders to win,\\nhiders must complete tasks to lower the timer.\\nIf the time limit ends, hiders win.", "HNS.DangerMeter": "Show (Custom) Danger Meter", diff --git a/Resources/Lang/ko_KR.json b/Resources/Lang/ko_KR.json index 0b0b78bc6..a1f7e14b6 100644 --- a/Resources/Lang/ko_KR.json +++ b/Resources/Lang/ko_KR.json @@ -1,5 +1,5 @@ { - "LanguageID": "0", + "LanguageID": "4", "HostText": "EHR - 호스트", "HostColor": "#00ffa5", "HostIconInMeeting": "호스트: {0}",