From 1250a1ef6c6cdf9a00a540420f0cdee924a071fe Mon Sep 17 00:00:00 2001 From: D1GQ Date: Thu, 18 Jun 2026 22:13:11 -0500 Subject: [PATCH] Helper clean up --- src/Attributes/RegisterInIl2Cpp.cs | 2 +- src/BAUPlugin.cs | 2 +- src/Commands/Arguments/PlayerArgument.cs | 2 +- src/Commands/BaseCommand.cs | 2 +- src/Commands/KickCommand.cs | 2 +- src/Commands/PlayerInfoCommand.cs | 2 +- src/Commands/PlayersInfoCommand.cs | 2 +- src/Commands/RemoveAllCommand.cs | 2 +- src/Commands/RemovePlayerCommand.cs | 2 +- src/Data/BetterDataManager.cs | 2 +- src/Data/Json/AbstractJsonFile.cs | 2 +- src/Data/Json/BetterDataFile.cs | 2 +- src/Data/Json/BetterGameSettingsFile.cs | 2 +- src/Data/Replay/Events/AppearReplayEvent.cs | 2 +- src/Data/Replay/Events/MurderReplayEvent.cs | 2 +- src/Data/Replay/Events/ProtectReplayEvent.cs | 2 +- .../Replay/Events/ProtectedReplayEvent.cs | 2 +- src/Data/Replay/Events/SetRoleEvent.cs | 2 +- .../Replay/Events/ShapeshiftReplayEvent.cs | 2 +- .../Replay/Events/UpdateSystemReplayEvent.cs | 2 +- src/Data/Replay/Events/VanishReplayEvent.cs | 2 +- src/Data/Replay/Events/VentReplayEvent.cs | 2 +- src/Data/SharedSecretExchange.cs | 2 +- src/Helpers/GamePrefabHelper.cs | 28 ------------------- src/Managers/AudioOverrideManager.cs | 2 +- src/Managers/BAUUpdateManager.cs | 3 +- src/Managers/BetterNotificationManager.cs | 2 +- src/Managers/NetworkManager.cs | 6 ++-- src/Modules/AntiCheat/BetterAntiCheat.cs | 2 +- src/Modules/AntiCheat/RPCHandler.cs | 1 - .../RPCHandlers/Cheats/AUMChatHandler.cs | 2 +- .../RPCHandlers/Cheats/AUMHandler.cs | 2 +- .../Cheats/KillNetworkChatHandler.cs | 2 +- .../RPCHandlers/Cheats/KillNetworkHandler.cs | 2 +- .../Cheats/ModMenuCrewChatHandler.cs | 2 +- .../RPCHandlers/Cheats/ModMenuCrewHandler.cs | 2 +- .../RPCHandlers/Cheats/SickoHandler.cs | 2 +- .../RPCHandlers/CheckAppearHandler.cs | 2 +- .../RPCHandlers/CheckMurderHandler.cs | 2 +- .../AntiCheat/RPCHandlers/CheckNameHandler.cs | 2 +- .../RPCHandlers/CheckProtectHandler.cs | 2 +- .../RPCHandlers/CheckShapeshiftHandler.cs | 2 +- .../RPCHandlers/CheckVanishHandler.cs | 2 +- .../RPCHandlers/CloseDoorsOfTypeHandler.cs | 2 +- .../RPCHandlers/CompleteTaskHandler.cs | 3 +- .../AntiCheat/RPCHandlers/EnterVentHandler.cs | 2 +- .../AntiCheat/RPCHandlers/ExitVentHandler.cs | 2 +- .../RPCHandlers/MurderPlayerHandler.cs | 2 +- .../NetObjectHandlers/UpdateSystemHandler.cs | 2 +- .../RPCHandlers/ProtectPlayerHandler.cs | 2 +- .../RPCHandlers/ReportDeadBodyHandler.cs | 2 +- .../AntiCheat/RPCHandlers/SendChatHandler.cs | 2 +- .../RPCHandlers/SendQuickChatHandler.cs | 2 +- .../AntiCheat/RPCHandlers/SetLevelHandler.cs | 2 +- .../AntiCheat/RPCHandlers/SetNameHandler.cs | 2 +- .../RPCHandlers/ShapeshiftHandler.cs | 2 +- .../RPCHandlers/StartAppearHandler.cs | 2 +- .../RPCHandlers/StartVanishHandler.cs | 2 +- src/Modules/ClientOptionItem.cs | 2 +- src/Modules/HandshakeHandler.cs | 2 +- src/{Helpers => Modules}/LateTask.cs | 2 +- src/{Helpers => Modules}/Logger.cs | 4 +-- src/Modules/ModNews.cs | 2 +- .../NoneOption/OptionDividerItem.cs | 2 +- .../OptionItems/NoneOption/OptionTitleItem.cs | 2 +- src/Modules/OptionItems/OptionCheckboxItem.cs | 3 +- src/Modules/OptionItems/OptionFloatItem.cs | 3 +- src/Modules/OptionItems/OptionIntItem.cs | 3 +- src/Modules/OptionItems/OptionItem.cs | 3 +- src/Modules/OptionItems/OptionPlayerItem.cs | 3 +- src/Modules/OptionItems/OptionStringItem.cs | 3 +- src/Modules/OptionItems/OptionTab.cs | 3 +- src/Modules/Support/BAUSupportEvent.cs | 1 - src/Modules/Translator.cs | 4 +-- src/Mono/BetterPingTracker.cs | 2 +- src/Mono/Extended/ExtendedPlayerInfo.cs | 2 +- src/Mono/MeetingInfoDisplay.cs | 2 +- src/Mono/PlayerInfoDisplay.cs | 2 +- src/Network/Configs/BAUUpdateData.cs | 2 +- src/Network/Configs/NewsData.cs | 3 +- src/Network/GitHubFile.cs | 4 +-- src/Network/Loaders/BAUUpdateLoader.cs | 2 +- src/Network/Loaders/NewsLoader.cs | 1 - src/Network/RPC.cs | 2 +- src/Patches/Client/AnnouncementPanelPatch.cs | 2 +- src/Patches/Client/ClientPatch.cs | 3 +- src/Patches/Client/InnerNetClientPatch.cs | 2 +- .../Client/Managers/MainMenuManagerPatch.cs | 4 +-- .../Client/Managers/ModManagerPatch.cs | 3 +- .../Client/OptionsMenuBehaviourPatch.cs | 3 +- src/Patches/Client/SplashIntroPatch.cs | 2 +- src/Patches/Client/VersionShowerPatch.cs | 2 +- .../Anticheat/CheckPlayerLevelPatch.cs | 2 +- .../Gameplay/Anticheat/PlatformSpoofPatch.cs | 2 +- .../Gameplay/Anticheat/VoteBanSystemPatch.cs | 2 +- src/Patches/Gameplay/LobbyPatch.cs | 2 +- .../FindAGameManagerPatch.cs | 2 +- .../FindGameMoreInfoPopupPatch.cs | 2 +- .../Gameplay/Managers/HudManagerPatch.cs | 2 +- .../Gameplay/Managers/RoleManagerPatch.cs | 3 +- .../Gameplay/Options/LogicOptionsPatch.cs | 2 +- .../Gameplay/Player/CosmeticsLayerPatch.cs | 2 +- .../Gameplay/Player/PlayerControlPatch.cs | 2 +- .../Gameplay/Player/PlayerJoinAndLeftPatch.cs | 2 +- .../Gameplay/UI/Chat/ChatCommandsPatch.cs | 2 +- src/Patches/Gameplay/UI/Chat/ChatPatch.cs | 3 +- .../Gameplay/UI/Chat/QuickChatPatch.cs | 2 +- src/Patches/Gameplay/UI/GameSummaryPatch.cs | 3 +- src/Patches/Gameplay/UI/IntroCutscenePatch.cs | 2 +- src/Patches/Gameplay/UI/KillOverlayPatch.cs | 2 +- src/Patches/Gameplay/UI/MeetingHudPatch.cs | 2 +- .../Gameplay/UI/MiniMapBehaviourPatch.cs | 3 +- src/Patches/Gameplay/UI/PlayerTabPatch.cs | 2 +- .../Gameplay/UI/ReportReasonScreenPatch.cs | 2 +- .../Gameplay/UI/ServerDropdownPatch.cs | 4 +-- src/Patches/Gameplay/ZoomPatch.cs | 2 +- src/Patches/Unity/UnityWebRequestPatch.cs | 4 +-- src/Structs/TempClientData.cs | 2 +- src/Structs/UserInfo.cs | 2 +- src/{Helpers => Utilities}/Colors.cs | 2 +- .../EnumHelper.cs => Utilities/EnumUtils.cs} | 4 +-- .../Extension}/ActionExtensions.cs | 2 +- .../Extension/CastExtensions.cs} | 4 +-- .../Extension/IEnumerableExtensions.cs} | 4 +-- .../Extension}/Il2CppExtensions.cs | 2 +- .../GameObjectUtils.cs} | 4 +-- .../InnerNetClientUtils.cs} | 11 ++++---- .../PlayerControlUtils.cs} | 4 +-- .../RoleHelper.cs => Utilities/RoleUtils.cs} | 4 +-- src/{Helpers => Utilities}/ShuffleHelper.cs | 4 +-- src/{Helpers => Utilities}/Utils.cs | 3 +- 131 files changed, 164 insertions(+), 178 deletions(-) delete mode 100644 src/Helpers/GamePrefabHelper.cs rename src/{Helpers => Modules}/LateTask.cs (99%) rename src/{Helpers => Modules}/Logger.cs (99%) rename src/{Helpers => Utilities}/Colors.cs (99%) rename src/{Helpers/EnumHelper.cs => Utilities/EnumUtils.cs} (96%) rename src/{Helpers => Utilities/Extension}/ActionExtensions.cs (98%) rename src/{Helpers/CastHelper.cs => Utilities/Extension/CastExtensions.cs} (93%) rename src/{Helpers/IEnumerableHelper.cs => Utilities/Extension/IEnumerableExtensions.cs} (97%) rename src/{Helpers => Utilities/Extension}/Il2CppExtensions.cs (99%) rename src/{Helpers/ObjectHelper.cs => Utilities/GameObjectUtils.cs} (98%) rename src/{Helpers/InnerNetClientHelper.cs => Utilities/InnerNetClientUtils.cs} (96%) rename src/{Helpers/PlayerControlHelper.cs => Utilities/PlayerControlUtils.cs} (99%) rename src/{Helpers/RoleHelper.cs => Utilities/RoleUtils.cs} (98%) rename src/{Helpers => Utilities}/ShuffleHelper.cs (91%) rename src/{Helpers => Utilities}/Utils.cs (99%) diff --git a/src/Attributes/RegisterInIl2Cpp.cs b/src/Attributes/RegisterInIl2Cpp.cs index 6673e47..799da76 100644 --- a/src/Attributes/RegisterInIl2Cpp.cs +++ b/src/Attributes/RegisterInIl2Cpp.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Modules; using Il2CppInterop.Runtime.Injection; using System.Reflection; diff --git a/src/BAUPlugin.cs b/src/BAUPlugin.cs index e58fe0f..7ab5900 100644 --- a/src/BAUPlugin.cs +++ b/src/BAUPlugin.cs @@ -8,12 +8,12 @@ using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Data.Json; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.OptionItems; using BetterAmongUs.Modules.Support; using BetterAmongUs.Network; using BetterAmongUs.Patches.Gameplay.UI.Settings; +using BetterAmongUs.Utilities; using HarmonyLib; using UnityEngine; using UnityEngine.SceneManagement; diff --git a/src/Commands/Arguments/PlayerArgument.cs b/src/Commands/Arguments/PlayerArgument.cs index 62d7f68..0f32627 100644 --- a/src/Commands/Arguments/PlayerArgument.cs +++ b/src/Commands/Arguments/PlayerArgument.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; namespace BetterAmongUs.Commands.Arguments; diff --git a/src/Commands/BaseCommand.cs b/src/Commands/BaseCommand.cs index aa9ff6f..b2643b1 100644 --- a/src/Commands/BaseCommand.cs +++ b/src/Commands/BaseCommand.cs @@ -1,7 +1,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Commands.Arguments; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules.Support; +using BetterAmongUs.Utilities; namespace BetterAmongUs.Commands; diff --git a/src/Commands/KickCommand.cs b/src/Commands/KickCommand.cs index 937f7c7..65da31f 100644 --- a/src/Commands/KickCommand.cs +++ b/src/Commands/KickCommand.cs @@ -1,7 +1,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Commands.Arguments; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules; +using BetterAmongUs.Utilities; namespace BetterAmongUs.Commands; diff --git a/src/Commands/PlayerInfoCommand.cs b/src/Commands/PlayerInfoCommand.cs index b4b1caf..3b0cd1c 100644 --- a/src/Commands/PlayerInfoCommand.cs +++ b/src/Commands/PlayerInfoCommand.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Commands.Arguments; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using System.Text; namespace BetterAmongUs.Commands; diff --git a/src/Commands/PlayersInfoCommand.cs b/src/Commands/PlayersInfoCommand.cs index 9aceb31..449cfe0 100644 --- a/src/Commands/PlayersInfoCommand.cs +++ b/src/Commands/PlayersInfoCommand.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using System.Text; namespace BetterAmongUs.Commands; diff --git a/src/Commands/RemoveAllCommand.cs b/src/Commands/RemoveAllCommand.cs index 6a0ce2b..38c3b38 100644 --- a/src/Commands/RemoveAllCommand.cs +++ b/src/Commands/RemoveAllCommand.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Attributes; namespace BetterAmongUs.Commands; diff --git a/src/Commands/RemovePlayerCommand.cs b/src/Commands/RemovePlayerCommand.cs index 2a53d3a..3db6518 100644 --- a/src/Commands/RemovePlayerCommand.cs +++ b/src/Commands/RemovePlayerCommand.cs @@ -1,7 +1,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Commands.Arguments; using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; namespace BetterAmongUs.Commands; diff --git a/src/Data/BetterDataManager.cs b/src/Data/BetterDataManager.cs index d809fdc..371645a 100644 --- a/src/Data/BetterDataManager.cs +++ b/src/Data/BetterDataManager.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Data.Config; using BetterAmongUs.Data.Json; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using UnityEngine; namespace BetterAmongUs.Data; diff --git a/src/Data/Json/AbstractJsonFile.cs b/src/Data/Json/AbstractJsonFile.cs index 6ff1a91..2a9db7c 100644 --- a/src/Data/Json/AbstractJsonFile.cs +++ b/src/Data/Json/AbstractJsonFile.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Modules; using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/src/Data/Json/BetterDataFile.cs b/src/Data/Json/BetterDataFile.cs index 62710b1..9643790 100644 --- a/src/Data/Json/BetterDataFile.cs +++ b/src/Data/Json/BetterDataFile.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Structs; using System.Text.Json.Serialization; diff --git a/src/Data/Json/BetterGameSettingsFile.cs b/src/Data/Json/BetterGameSettingsFile.cs index 643b218..c218c29 100644 --- a/src/Data/Json/BetterGameSettingsFile.cs +++ b/src/Data/Json/BetterGameSettingsFile.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Modules; using System.IO.Compression; using System.Text; using System.Text.Json; diff --git a/src/Data/Replay/Events/AppearReplayEvent.cs b/src/Data/Replay/Events/AppearReplayEvent.cs index e3f96b8..8e7c438 100644 --- a/src/Data/Replay/Events/AppearReplayEvent.cs +++ b/src/Data/Replay/Events/AppearReplayEvent.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/MurderReplayEvent.cs b/src/Data/Replay/Events/MurderReplayEvent.cs index 4564b59..52a92da 100644 --- a/src/Data/Replay/Events/MurderReplayEvent.cs +++ b/src/Data/Replay/Events/MurderReplayEvent.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/ProtectReplayEvent.cs b/src/Data/Replay/Events/ProtectReplayEvent.cs index b6a6f09..2f8a7e1 100644 --- a/src/Data/Replay/Events/ProtectReplayEvent.cs +++ b/src/Data/Replay/Events/ProtectReplayEvent.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/ProtectedReplayEvent.cs b/src/Data/Replay/Events/ProtectedReplayEvent.cs index 1896ddc..c169fa5 100644 --- a/src/Data/Replay/Events/ProtectedReplayEvent.cs +++ b/src/Data/Replay/Events/ProtectedReplayEvent.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/SetRoleEvent.cs b/src/Data/Replay/Events/SetRoleEvent.cs index 91e7fbd..32a5620 100644 --- a/src/Data/Replay/Events/SetRoleEvent.cs +++ b/src/Data/Replay/Events/SetRoleEvent.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/ShapeshiftReplayEvent.cs b/src/Data/Replay/Events/ShapeshiftReplayEvent.cs index 4bffdc3..57fe3b9 100644 --- a/src/Data/Replay/Events/ShapeshiftReplayEvent.cs +++ b/src/Data/Replay/Events/ShapeshiftReplayEvent.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/UpdateSystemReplayEvent.cs b/src/Data/Replay/Events/UpdateSystemReplayEvent.cs index 076dd24..a3ccf4f 100644 --- a/src/Data/Replay/Events/UpdateSystemReplayEvent.cs +++ b/src/Data/Replay/Events/UpdateSystemReplayEvent.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/VanishReplayEvent.cs b/src/Data/Replay/Events/VanishReplayEvent.cs index 127e485..fb87860 100644 --- a/src/Data/Replay/Events/VanishReplayEvent.cs +++ b/src/Data/Replay/Events/VanishReplayEvent.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/Replay/Events/VentReplayEvent.cs b/src/Data/Replay/Events/VentReplayEvent.cs index a9cbd2f..bd50e11 100644 --- a/src/Data/Replay/Events/VentReplayEvent.cs +++ b/src/Data/Replay/Events/VentReplayEvent.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Interfaces; using System.Text.Json.Serialization; diff --git a/src/Data/SharedSecretExchange.cs b/src/Data/SharedSecretExchange.cs index b92dc5c..a5099bc 100644 --- a/src/Data/SharedSecretExchange.cs +++ b/src/Data/SharedSecretExchange.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Modules; using System.Security.Cryptography; namespace BetterAmongUs.Data; diff --git a/src/Helpers/GamePrefabHelper.cs b/src/Helpers/GamePrefabHelper.cs deleted file mode 100644 index 78ae880..0000000 --- a/src/Helpers/GamePrefabHelper.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Il2CppInterop.Runtime; -using UnityEngine; - -namespace BetterAmongUs.Helpers; - -/// -/// Provides helper methods for working with Unity game prefabs in an Il2Cpp environment. -/// -internal static class GamePrefabHelper -{ - /// - /// Retrieves a Unity prefab by its name from the loaded resources. - /// - /// The name of the prefab to find. - /// The Unity Object if found, or null if not found. - internal static UnityEngine.Object? GetPrefabByName(string objectName) - { - UnityEngine.Object[] allObjects = Resources.FindObjectsOfTypeAll(Il2CppType.Of()); - - var obj = allObjects.FirstOrDefault(obj => obj.hideFlags == HideFlags.None && obj.name == objectName); - if (obj != null) - { - return obj; - } - - return null; - } -} \ No newline at end of file diff --git a/src/Managers/AudioOverrideManager.cs b/src/Managers/AudioOverrideManager.cs index e606f7d..a22f606 100644 --- a/src/Managers/AudioOverrideManager.cs +++ b/src/Managers/AudioOverrideManager.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using System.Reflection; using UnityEngine; diff --git a/src/Managers/BAUUpdateManager.cs b/src/Managers/BAUUpdateManager.cs index a45b3ad..9c78e09 100644 --- a/src/Managers/BAUUpdateManager.cs +++ b/src/Managers/BAUUpdateManager.cs @@ -1,12 +1,13 @@ using BepInEx.Unity.IL2CPP.Utils; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.Support; using BetterAmongUs.Network.Loaders; using Il2CppInterop.Runtime.Attributes; using System.Collections; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Managers; diff --git a/src/Managers/BetterNotificationManager.cs b/src/Managers/BetterNotificationManager.cs index 211d66e..074aabc 100644 --- a/src/Managers/BetterNotificationManager.cs +++ b/src/Managers/BetterNotificationManager.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Data; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Patches.Gameplay.UI.Settings; diff --git a/src/Managers/NetworkManager.cs b/src/Managers/NetworkManager.cs index 662902f..4b47bea 100644 --- a/src/Managers/NetworkManager.cs +++ b/src/Managers/NetworkManager.cs @@ -1,12 +1,12 @@ using AmongUs.InnerNet.GameDataMessages; using BepInEx.Unity.IL2CPP.Utils; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.AntiCheat; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Network; using BetterAmongUs.Structs; +using BetterAmongUs.Utilities; using HarmonyLib; using Hazel; using InnerNet; @@ -71,7 +71,7 @@ internal static class NetworkManager return; } - MessageReader[] allReaders = writer.ToReaders(); + MessageReader[] allReaders = writer.MessagesToReaders(); foreach (MessageReader reader in allReaders) { @@ -100,7 +100,7 @@ internal static class NetworkManager ClientId = reader.ReadPackedInt32(); } - MessageReader[] allDataReaders = reader.ToReadersNewBuffer(); + MessageReader[] allDataReaders = reader.MessagesToReadersNewBuffer(); foreach (MessageReader dataReader in allDataReaders) { diff --git a/src/Modules/AntiCheat/BetterAntiCheat.cs b/src/Modules/AntiCheat/BetterAntiCheat.cs index cbaf2ab..493ed3c 100644 --- a/src/Modules/AntiCheat/BetterAntiCheat.cs +++ b/src/Modules/AntiCheat/BetterAntiCheat.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.AntiCheat.RPCHandlers.NetObjectHandlers; using BetterAmongUs.Modules.Support; diff --git a/src/Modules/AntiCheat/RPCHandler.cs b/src/Modules/AntiCheat/RPCHandler.cs index e35e781..d9f3a64 100644 --- a/src/Modules/AntiCheat/RPCHandler.cs +++ b/src/Modules/AntiCheat/RPCHandler.cs @@ -1,6 +1,5 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMChatHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMChatHandler.cs index b1ae6bb..6ab1ed1 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMChatHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMChatHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMHandler.cs index 87f9b34..9e00168 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/AUMHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkChatHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkChatHandler.cs index eb29421..9174a71 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkChatHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkChatHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkHandler.cs index 74bd924..0917d36 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/KillNetworkHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewChatHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewChatHandler.cs index 6aaccd7..6b156c5 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewChatHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewChatHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewHandler.cs index 89009e8..593f29e 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/ModMenuCrewHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/Cheats/SickoHandler.cs b/src/Modules/AntiCheat/RPCHandlers/Cheats/SickoHandler.cs index b17e28f..1a34d0c 100644 --- a/src/Modules/AntiCheat/RPCHandlers/Cheats/SickoHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/Cheats/SickoHandler.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckAppearHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckAppearHandler.cs index fd4fe34..154ba25 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckAppearHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckAppearHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; namespace BetterAmongUs.Modules.AntiCheat.RPCHandlers; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckMurderHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckMurderHandler.cs index bbd846f..280bb88 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckMurderHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckMurderHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; using InnerNet; using UnityEngine; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckNameHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckNameHandler.cs index e422eb8..31bb81e 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckNameHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckNameHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Mono.Extended; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckProtectHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckProtectHandler.cs index 2cdc3dc..1673ee4 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckProtectHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckProtectHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; using InnerNet; using UnityEngine; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckShapeshiftHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckShapeshiftHandler.cs index 5d57960..7a50284 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckShapeshiftHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckShapeshiftHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; using InnerNet; diff --git a/src/Modules/AntiCheat/RPCHandlers/CheckVanishHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CheckVanishHandler.cs index 765b99e..47b2241 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CheckVanishHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CheckVanishHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; namespace BetterAmongUs.Modules.AntiCheat.RPCHandlers; diff --git a/src/Modules/AntiCheat/RPCHandlers/CloseDoorsOfTypeHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CloseDoorsOfTypeHandler.cs index 47328ac..44712fc 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CloseDoorsOfTypeHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CloseDoorsOfTypeHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/CompleteTaskHandler.cs b/src/Modules/AntiCheat/RPCHandlers/CompleteTaskHandler.cs index e23f801..06d804f 100644 --- a/src/Modules/AntiCheat/RPCHandlers/CompleteTaskHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/CompleteTaskHandler.cs @@ -1,8 +1,9 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Mono.Extended; using Hazel; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Modules.AntiCheat.RPCHandlers; diff --git a/src/Modules/AntiCheat/RPCHandlers/EnterVentHandler.cs b/src/Modules/AntiCheat/RPCHandlers/EnterVentHandler.cs index 6b88d79..da0fa36 100644 --- a/src/Modules/AntiCheat/RPCHandlers/EnterVentHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/EnterVentHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/ExitVentHandler.cs b/src/Modules/AntiCheat/RPCHandlers/ExitVentHandler.cs index 3c2c2ab..7223054 100644 --- a/src/Modules/AntiCheat/RPCHandlers/ExitVentHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/ExitVentHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/MurderPlayerHandler.cs b/src/Modules/AntiCheat/RPCHandlers/MurderPlayerHandler.cs index fee0a20..1cb0be0 100644 --- a/src/Modules/AntiCheat/RPCHandlers/MurderPlayerHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/MurderPlayerHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Mono.Extended; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/NetObjectHandlers/UpdateSystemHandler.cs b/src/Modules/AntiCheat/RPCHandlers/NetObjectHandlers/UpdateSystemHandler.cs index b0a1f46..b66d2ce 100644 --- a/src/Modules/AntiCheat/RPCHandlers/NetObjectHandlers/UpdateSystemHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/NetObjectHandlers/UpdateSystemHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Hazel; using UnityEngine; diff --git a/src/Modules/AntiCheat/RPCHandlers/ProtectPlayerHandler.cs b/src/Modules/AntiCheat/RPCHandlers/ProtectPlayerHandler.cs index 9a717d8..bc68ba3 100644 --- a/src/Modules/AntiCheat/RPCHandlers/ProtectPlayerHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/ProtectPlayerHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/ReportDeadBodyHandler.cs b/src/Modules/AntiCheat/RPCHandlers/ReportDeadBodyHandler.cs index b352f2e..a746fd9 100644 --- a/src/Modules/AntiCheat/RPCHandlers/ReportDeadBodyHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/ReportDeadBodyHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Patches.Gameplay.UI; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/SendChatHandler.cs b/src/Modules/AntiCheat/RPCHandlers/SendChatHandler.cs index f52db1b..720fd5b 100644 --- a/src/Modules/AntiCheat/RPCHandlers/SendChatHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/SendChatHandler.cs @@ -1,7 +1,7 @@ using AmongUs.Data; using BetterAmongUs.Attributes; using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Patches.Gameplay.UI.Settings; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/SendQuickChatHandler.cs b/src/Modules/AntiCheat/RPCHandlers/SendQuickChatHandler.cs index 6bfaac0..090d71a 100644 --- a/src/Modules/AntiCheat/RPCHandlers/SendQuickChatHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/SendQuickChatHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/SetLevelHandler.cs b/src/Modules/AntiCheat/RPCHandlers/SetLevelHandler.cs index 95005ad..9941742 100644 --- a/src/Modules/AntiCheat/RPCHandlers/SetLevelHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/SetLevelHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Patches.Gameplay.UI.Settings; diff --git a/src/Modules/AntiCheat/RPCHandlers/SetNameHandler.cs b/src/Modules/AntiCheat/RPCHandlers/SetNameHandler.cs index b76ada7..429afd2 100644 --- a/src/Modules/AntiCheat/RPCHandlers/SetNameHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/SetNameHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Mono.Extended; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/ShapeshiftHandler.cs b/src/Modules/AntiCheat/RPCHandlers/ShapeshiftHandler.cs index bd16d22..84cdb1f 100644 --- a/src/Modules/AntiCheat/RPCHandlers/ShapeshiftHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/ShapeshiftHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; using InnerNet; diff --git a/src/Modules/AntiCheat/RPCHandlers/StartAppearHandler.cs b/src/Modules/AntiCheat/RPCHandlers/StartAppearHandler.cs index f35a8af..477da0c 100644 --- a/src/Modules/AntiCheat/RPCHandlers/StartAppearHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/StartAppearHandler.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/AntiCheat/RPCHandlers/StartVanishHandler.cs b/src/Modules/AntiCheat/RPCHandlers/StartVanishHandler.cs index 917d216..4799e13 100644 --- a/src/Modules/AntiCheat/RPCHandlers/StartVanishHandler.cs +++ b/src/Modules/AntiCheat/RPCHandlers/StartVanishHandler.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using Hazel; diff --git a/src/Modules/ClientOptionItem.cs b/src/Modules/ClientOptionItem.cs index 4515ae9..6694bbb 100644 --- a/src/Modules/ClientOptionItem.cs +++ b/src/Modules/ClientOptionItem.cs @@ -1,7 +1,7 @@ using BepInEx.Configuration; -using BetterAmongUs.Helpers; using BetterAmongUs.Patches.Client; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Modules; diff --git a/src/Modules/HandshakeHandler.cs b/src/Modules/HandshakeHandler.cs index ee6b21d..c0cf389 100644 --- a/src/Modules/HandshakeHandler.cs +++ b/src/Modules/HandshakeHandler.cs @@ -2,7 +2,7 @@ using BepInEx.Unity.IL2CPP.Utils; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Network; using Hazel; diff --git a/src/Helpers/LateTask.cs b/src/Modules/LateTask.cs similarity index 99% rename from src/Helpers/LateTask.cs rename to src/Modules/LateTask.cs index 53a0389..c8df1b6 100644 --- a/src/Helpers/LateTask.cs +++ b/src/Modules/LateTask.cs @@ -1,4 +1,4 @@ -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Modules; /// /// Represents a delayed task that executes after a specified time interval. diff --git a/src/Helpers/Logger.cs b/src/Modules/Logger.cs similarity index 99% rename from src/Helpers/Logger.cs rename to src/Modules/Logger.cs index f776a29..5d3c722 100644 --- a/src/Helpers/Logger.cs +++ b/src/Modules/Logger.cs @@ -1,11 +1,11 @@ using BepInEx; using BepInEx.Logging; using BetterAmongUs.Data; -using BetterAmongUs.Modules; +using BetterAmongUs.Utilities; using System.Diagnostics; using System.Runtime.CompilerServices; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Modules; /// /// Provides logging utilities for BetterAmongUs with various log levels and destinations. diff --git a/src/Modules/ModNews.cs b/src/Modules/ModNews.cs index 1448b49..69c5dfb 100644 --- a/src/Modules/ModNews.cs +++ b/src/Modules/ModNews.cs @@ -1,7 +1,7 @@ using AmongUs.Data; using Assets.InnerNet; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Network.Configs; using UnityEngine; diff --git a/src/Modules/OptionItems/NoneOption/OptionDividerItem.cs b/src/Modules/OptionItems/NoneOption/OptionDividerItem.cs index 306ea39..e54b963 100644 --- a/src/Modules/OptionItems/NoneOption/OptionDividerItem.cs +++ b/src/Modules/OptionItems/NoneOption/OptionDividerItem.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems.NoneOption; diff --git a/src/Modules/OptionItems/NoneOption/OptionTitleItem.cs b/src/Modules/OptionItems/NoneOption/OptionTitleItem.cs index b428623..41af8ec 100644 --- a/src/Modules/OptionItems/NoneOption/OptionTitleItem.cs +++ b/src/Modules/OptionItems/NoneOption/OptionTitleItem.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems.NoneOption; diff --git a/src/Modules/OptionItems/OptionCheckboxItem.cs b/src/Modules/OptionItems/OptionCheckboxItem.cs index c79fa9e..42b0c12 100644 --- a/src/Modules/OptionItems/OptionCheckboxItem.cs +++ b/src/Modules/OptionItems/OptionCheckboxItem.cs @@ -1,4 +1,5 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities.Extension; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionFloatItem.cs b/src/Modules/OptionItems/OptionFloatItem.cs index bb0fdfc..3d08fad 100644 --- a/src/Modules/OptionItems/OptionFloatItem.cs +++ b/src/Modules/OptionItems/OptionFloatItem.cs @@ -1,4 +1,5 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities.Extension; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionIntItem.cs b/src/Modules/OptionItems/OptionIntItem.cs index e0caa95..e227c10 100644 --- a/src/Modules/OptionItems/OptionIntItem.cs +++ b/src/Modules/OptionItems/OptionIntItem.cs @@ -1,4 +1,5 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities.Extension; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionItem.cs b/src/Modules/OptionItems/OptionItem.cs index c282d6e..a147c49 100644 --- a/src/Modules/OptionItems/OptionItem.cs +++ b/src/Modules/OptionItems/OptionItem.cs @@ -1,9 +1,10 @@ using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.Support; using System.Text; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionPlayerItem.cs b/src/Modules/OptionItems/OptionPlayerItem.cs index d1ae5af..91bd2d2 100644 --- a/src/Modules/OptionItems/OptionPlayerItem.cs +++ b/src/Modules/OptionItems/OptionPlayerItem.cs @@ -1,4 +1,5 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities.Extension; using UnityEngine; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionStringItem.cs b/src/Modules/OptionItems/OptionStringItem.cs index cec505b..8e1a249 100644 --- a/src/Modules/OptionItems/OptionStringItem.cs +++ b/src/Modules/OptionItems/OptionStringItem.cs @@ -1,4 +1,5 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/OptionItems/OptionTab.cs b/src/Modules/OptionItems/OptionTab.cs index 80f456a..8c31dcc 100644 --- a/src/Modules/OptionItems/OptionTab.cs +++ b/src/Modules/OptionItems/OptionTab.cs @@ -1,7 +1,8 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.OptionItems.NoneOption; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Modules.OptionItems; diff --git a/src/Modules/Support/BAUSupportEvent.cs b/src/Modules/Support/BAUSupportEvent.cs index 3f9bbc7..ab9b462 100644 --- a/src/Modules/Support/BAUSupportEvent.cs +++ b/src/Modules/Support/BAUSupportEvent.cs @@ -1,6 +1,5 @@ using BepInEx; using BepInEx.Unity.IL2CPP; -using BetterAmongUs.Helpers; using System.ComponentModel; using System.Reflection; diff --git a/src/Modules/Translator.cs b/src/Modules/Translator.cs index 02bdd03..e03fecb 100644 --- a/src/Modules/Translator.cs +++ b/src/Modules/Translator.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using Il2CppInterop.Runtime.InteropTypes.Arrays; using System.Globalization; using System.Text.Json; @@ -263,7 +263,7 @@ internal static class Translator /// private static string GetVanillaStringFallback(string key, string fallbackText) { - var matchingStringNames = EnumHelper.GetAllValues() + var matchingStringNames = EnumUtils.GetAllValues() .Where(x => x.ToString() == key) .ToArray(); diff --git a/src/Mono/BetterPingTracker.cs b/src/Mono/BetterPingTracker.cs index 873b50a..4463943 100644 --- a/src/Mono/BetterPingTracker.cs +++ b/src/Mono/BetterPingTracker.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Attributes; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using System.Text; using TMPro; diff --git a/src/Mono/Extended/ExtendedPlayerInfo.cs b/src/Mono/Extended/ExtendedPlayerInfo.cs index 680592e..a2c896e 100644 --- a/src/Mono/Extended/ExtendedPlayerInfo.cs +++ b/src/Mono/Extended/ExtendedPlayerInfo.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; diff --git a/src/Mono/MeetingInfoDisplay.cs b/src/Mono/MeetingInfoDisplay.cs index 2712cb5..d42a44d 100644 --- a/src/Mono/MeetingInfoDisplay.cs +++ b/src/Mono/MeetingInfoDisplay.cs @@ -1,6 +1,6 @@ using AmongUs.GameOptions; using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Mono/PlayerInfoDisplay.cs b/src/Mono/PlayerInfoDisplay.cs index 762ba3e..09dfb1e 100644 --- a/src/Mono/PlayerInfoDisplay.cs +++ b/src/Mono/PlayerInfoDisplay.cs @@ -3,7 +3,7 @@ using AmongUs.GameOptions; using BetterAmongUs.Attributes; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Network/Configs/BAUUpdateData.cs b/src/Network/Configs/BAUUpdateData.cs index 39ca1a4..7cdd876 100644 --- a/src/Network/Configs/BAUUpdateData.cs +++ b/src/Network/Configs/BAUUpdateData.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Modules; using System.Collections; using System.Text.Json.Serialization; using UnityEngine; diff --git a/src/Network/Configs/NewsData.cs b/src/Network/Configs/NewsData.cs index 2427bda..2d5dcad 100644 --- a/src/Network/Configs/NewsData.cs +++ b/src/Network/Configs/NewsData.cs @@ -1,5 +1,4 @@ -using BetterAmongUs.Helpers; -using BetterAmongUs.Modules; +using BetterAmongUs.Modules; namespace BetterAmongUs.Network.Configs; diff --git a/src/Network/GitHubFile.cs b/src/Network/GitHubFile.cs index 5ce96bf..aa762d6 100644 --- a/src/Network/GitHubFile.cs +++ b/src/Network/GitHubFile.cs @@ -1,9 +1,9 @@ -using BetterAmongUs.Helpers; -using BetterAmongUs.Managers; +using BetterAmongUs.Managers; using Il2CppInterop.Runtime.Attributes; using System.Collections; using UnityEngine; using UnityEngine.Networking; +using BetterAmongUs.Modules; namespace BetterAmongUs.Network; diff --git a/src/Network/Loaders/BAUUpdateLoader.cs b/src/Network/Loaders/BAUUpdateLoader.cs index bf792c0..c7f21eb 100644 --- a/src/Network/Loaders/BAUUpdateLoader.cs +++ b/src/Network/Loaders/BAUUpdateLoader.cs @@ -1,11 +1,11 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; using BetterAmongUs.Managers; using BetterAmongUs.Network.Configs; using Il2CppInterop.Runtime.Attributes; using System.Collections; using System.Text.Json; using UnityEngine; +using BetterAmongUs.Modules; namespace BetterAmongUs.Network.Loaders; diff --git a/src/Network/Loaders/NewsLoader.cs b/src/Network/Loaders/NewsLoader.cs index a713ae6..ed71855 100644 --- a/src/Network/Loaders/NewsLoader.cs +++ b/src/Network/Loaders/NewsLoader.cs @@ -1,5 +1,4 @@ using BetterAmongUs.Attributes; -using BetterAmongUs.Helpers; using BetterAmongUs.Modules; using BetterAmongUs.Network.Configs; using Il2CppInterop.Runtime.Attributes; diff --git a/src/Network/RPC.cs b/src/Network/RPC.cs index c82d306..1890e10 100644 --- a/src/Network/RPC.cs +++ b/src/Network/RPC.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Mono.Extended; using Hazel; diff --git a/src/Patches/Client/AnnouncementPanelPatch.cs b/src/Patches/Client/AnnouncementPanelPatch.cs index e9ec75c..0079d2f 100644 --- a/src/Patches/Client/AnnouncementPanelPatch.cs +++ b/src/Patches/Client/AnnouncementPanelPatch.cs @@ -1,7 +1,7 @@ using AmongUs.Data.Player; using Assets.InnerNet; using BetterAmongUs.Enums; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; diff --git a/src/Patches/Client/ClientPatch.cs b/src/Patches/Client/ClientPatch.cs index 6e1c4cd..c36d851 100644 --- a/src/Patches/Client/ClientPatch.cs +++ b/src/Patches/Client/ClientPatch.cs @@ -1,5 +1,5 @@ using BepInEx.Unity.IL2CPP.Utils; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; @@ -9,6 +9,7 @@ using InnerNet; using System.Collections; using UnityEngine; using UnityEngine.SceneManagement; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Client; diff --git a/src/Patches/Client/InnerNetClientPatch.cs b/src/Patches/Client/InnerNetClientPatch.cs index 56d5901..9abac17 100644 --- a/src/Patches/Client/InnerNetClientPatch.cs +++ b/src/Patches/Client/InnerNetClientPatch.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Patches.Gameplay.UI.Settings; diff --git a/src/Patches/Client/Managers/MainMenuManagerPatch.cs b/src/Patches/Client/Managers/MainMenuManagerPatch.cs index c258f5f..c0d9702 100644 --- a/src/Patches/Client/Managers/MainMenuManagerPatch.cs +++ b/src/Patches/Client/Managers/MainMenuManagerPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.Support; using HarmonyLib; @@ -54,7 +54,7 @@ internal static class MainMenuManagerPatch } // Apply custom colors to main menu background - __instance.transform.Find("MainUI/AspectScaler/BackgroundTexture")?.gameObject?.SetSpriteColors(sprite => ObjectHelper.AddColor(sprite)); + __instance.transform.Find("MainUI/AspectScaler/BackgroundTexture")?.gameObject?.SetSpriteColors(sprite => GameObjectUtils.AddColor(sprite)); // Create a reusable button prefab if it doesn't exist yet if (ButtonPrefab == null) diff --git a/src/Patches/Client/Managers/ModManagerPatch.cs b/src/Patches/Client/Managers/ModManagerPatch.cs index 2cc9cfa..0462b51 100644 --- a/src/Patches/Client/Managers/ModManagerPatch.cs +++ b/src/Patches/Client/Managers/ModManagerPatch.cs @@ -1,9 +1,10 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules.AntiCheat; using BetterAmongUs.Modules.Support; using HarmonyLib; using UnityEngine; +using BetterAmongUs.Modules; namespace BetterAmongUs.Patches.Client.Managers; diff --git a/src/Patches/Client/OptionsMenuBehaviourPatch.cs b/src/Patches/Client/OptionsMenuBehaviourPatch.cs index 5b24789..23f1430 100644 --- a/src/Patches/Client/OptionsMenuBehaviourPatch.cs +++ b/src/Patches/Client/OptionsMenuBehaviourPatch.cs @@ -1,7 +1,7 @@ using BepInEx; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Mono.Extended; @@ -11,6 +11,7 @@ using HarmonyLib; using System.Diagnostics; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Client; diff --git a/src/Patches/Client/SplashIntroPatch.cs b/src/Patches/Client/SplashIntroPatch.cs index 4015d73..f67505f 100644 --- a/src/Patches/Client/SplashIntroPatch.cs +++ b/src/Patches/Client/SplashIntroPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.Support; using HarmonyLib; using UnityEngine; diff --git a/src/Patches/Client/VersionShowerPatch.cs b/src/Patches/Client/VersionShowerPatch.cs index 5d9792f..cb7a18f 100644 --- a/src/Patches/Client/VersionShowerPatch.cs +++ b/src/Patches/Client/VersionShowerPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using HarmonyLib; diff --git a/src/Patches/Gameplay/Anticheat/CheckPlayerLevelPatch.cs b/src/Patches/Gameplay/Anticheat/CheckPlayerLevelPatch.cs index 25cfa8d..ee3147f 100644 --- a/src/Patches/Gameplay/Anticheat/CheckPlayerLevelPatch.cs +++ b/src/Patches/Gameplay/Anticheat/CheckPlayerLevelPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Patches.Gameplay.UI.Settings; using HarmonyLib; diff --git a/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs b/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs index df11daf..cf9c478 100644 --- a/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs +++ b/src/Patches/Gameplay/Anticheat/PlatformSpoofPatch.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; diff --git a/src/Patches/Gameplay/Anticheat/VoteBanSystemPatch.cs b/src/Patches/Gameplay/Anticheat/VoteBanSystemPatch.cs index c078ec1..b6339b4 100644 --- a/src/Patches/Gameplay/Anticheat/VoteBanSystemPatch.cs +++ b/src/Patches/Gameplay/Anticheat/VoteBanSystemPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; diff --git a/src/Patches/Gameplay/LobbyPatch.cs b/src/Patches/Gameplay/LobbyPatch.cs index 9d87ebb..c564cc3 100644 --- a/src/Patches/Gameplay/LobbyPatch.cs +++ b/src/Patches/Gameplay/LobbyPatch.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.OptionItems; using BetterAmongUs.Modules.Support; diff --git a/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindAGameManagerPatch.cs b/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindAGameManagerPatch.cs index 2ae75fd..7ea9b42 100644 --- a/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindAGameManagerPatch.cs +++ b/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindAGameManagerPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; using InnerNet; using TMPro; diff --git a/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindGameMoreInfoPopupPatch.cs b/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindGameMoreInfoPopupPatch.cs index 2ef0d00..4ea3ec2 100644 --- a/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindGameMoreInfoPopupPatch.cs +++ b/src/Patches/Gameplay/Managers/FindAGameManagerClass/FindGameMoreInfoPopupPatch.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using HarmonyLib; using System.Text; diff --git a/src/Patches/Gameplay/Managers/HudManagerPatch.cs b/src/Patches/Gameplay/Managers/HudManagerPatch.cs index 255893f..de98024 100644 --- a/src/Patches/Gameplay/Managers/HudManagerPatch.cs +++ b/src/Patches/Gameplay/Managers/HudManagerPatch.cs @@ -1,5 +1,5 @@ using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using HarmonyLib; diff --git a/src/Patches/Gameplay/Managers/RoleManagerPatch.cs b/src/Patches/Gameplay/Managers/RoleManagerPatch.cs index 8f0ca65..d6e98d9 100644 --- a/src/Patches/Gameplay/Managers/RoleManagerPatch.cs +++ b/src/Patches/Gameplay/Managers/RoleManagerPatch.cs @@ -1,10 +1,11 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Patches.Gameplay.UI.Settings; using HarmonyLib; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Gameplay.Managers; diff --git a/src/Patches/Gameplay/Options/LogicOptionsPatch.cs b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs index 3ceede2..376e173 100644 --- a/src/Patches/Gameplay/Options/LogicOptionsPatch.cs +++ b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; namespace BetterAmongUs.Patches.Gameplay.Options; diff --git a/src/Patches/Gameplay/Player/CosmeticsLayerPatch.cs b/src/Patches/Gameplay/Player/CosmeticsLayerPatch.cs index 0d26890..3e2097f 100644 --- a/src/Patches/Gameplay/Player/CosmeticsLayerPatch.cs +++ b/src/Patches/Gameplay/Player/CosmeticsLayerPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.Support; using HarmonyLib; diff --git a/src/Patches/Gameplay/Player/PlayerControlPatch.cs b/src/Patches/Gameplay/Player/PlayerControlPatch.cs index 9152dde..713c2b5 100644 --- a/src/Patches/Gameplay/Player/PlayerControlPatch.cs +++ b/src/Patches/Gameplay/Player/PlayerControlPatch.cs @@ -1,7 +1,7 @@ using BepInEx.Unity.IL2CPP.Utils; using BepInEx.Unity.IL2CPP.Utils.Collections; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Managers; using BetterAmongUs.Modules; using BetterAmongUs.Modules.OptionItems; diff --git a/src/Patches/Gameplay/Player/PlayerJoinAndLeftPatch.cs b/src/Patches/Gameplay/Player/PlayerJoinAndLeftPatch.cs index 1da13cd..2eb10d2 100644 --- a/src/Patches/Gameplay/Player/PlayerJoinAndLeftPatch.cs +++ b/src/Patches/Gameplay/Player/PlayerJoinAndLeftPatch.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Data; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; diff --git a/src/Patches/Gameplay/UI/Chat/ChatCommandsPatch.cs b/src/Patches/Gameplay/UI/Chat/ChatCommandsPatch.cs index 26ad1f2..6d74d51 100644 --- a/src/Patches/Gameplay/UI/Chat/ChatCommandsPatch.cs +++ b/src/Patches/Gameplay/UI/Chat/ChatCommandsPatch.cs @@ -1,6 +1,6 @@ using BetterAmongUs.Commands; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using HarmonyLib; diff --git a/src/Patches/Gameplay/UI/Chat/ChatPatch.cs b/src/Patches/Gameplay/UI/Chat/ChatPatch.cs index 03b257a..29a2e63 100644 --- a/src/Patches/Gameplay/UI/Chat/ChatPatch.cs +++ b/src/Patches/Gameplay/UI/Chat/ChatPatch.cs @@ -1,7 +1,7 @@ using AmongUs.GameOptions; using BetterAmongUs.Data; using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; @@ -9,6 +9,7 @@ using HarmonyLib; using System.Text; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Gameplay.UI.Chat; diff --git a/src/Patches/Gameplay/UI/Chat/QuickChatPatch.cs b/src/Patches/Gameplay/UI/Chat/QuickChatPatch.cs index 2a4b8c6..c2e3e7a 100644 --- a/src/Patches/Gameplay/UI/Chat/QuickChatPatch.cs +++ b/src/Patches/Gameplay/UI/Chat/QuickChatPatch.cs @@ -1,5 +1,5 @@ using AmongUs.QuickChat; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; namespace BetterAmongUs.Patches.Gameplay.UI.Chat; diff --git a/src/Patches/Gameplay/UI/GameSummaryPatch.cs b/src/Patches/Gameplay/UI/GameSummaryPatch.cs index 179cb58..b2cb862 100644 --- a/src/Patches/Gameplay/UI/GameSummaryPatch.cs +++ b/src/Patches/Gameplay/UI/GameSummaryPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; @@ -6,6 +6,7 @@ using HarmonyLib; using System.Text; using TMPro; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Gameplay.Managers; diff --git a/src/Patches/Gameplay/UI/IntroCutscenePatch.cs b/src/Patches/Gameplay/UI/IntroCutscenePatch.cs index 58c8f3c..cf439cb 100644 --- a/src/Patches/Gameplay/UI/IntroCutscenePatch.cs +++ b/src/Patches/Gameplay/UI/IntroCutscenePatch.cs @@ -1,5 +1,5 @@ using BepInEx.Unity.IL2CPP.Utils; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; using System.Collections; using UnityEngine; diff --git a/src/Patches/Gameplay/UI/KillOverlayPatch.cs b/src/Patches/Gameplay/UI/KillOverlayPatch.cs index d851fbd..6def61c 100644 --- a/src/Patches/Gameplay/UI/KillOverlayPatch.cs +++ b/src/Patches/Gameplay/UI/KillOverlayPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; namespace BetterAmongUs.Patches.Gameplay.UI; diff --git a/src/Patches/Gameplay/UI/MeetingHudPatch.cs b/src/Patches/Gameplay/UI/MeetingHudPatch.cs index 3c1afb9..5f59047 100644 --- a/src/Patches/Gameplay/UI/MeetingHudPatch.cs +++ b/src/Patches/Gameplay/UI/MeetingHudPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Mono; using BetterAmongUs.Mono.Extended; diff --git a/src/Patches/Gameplay/UI/MiniMapBehaviourPatch.cs b/src/Patches/Gameplay/UI/MiniMapBehaviourPatch.cs index 6c5c93d..831dd17 100644 --- a/src/Patches/Gameplay/UI/MiniMapBehaviourPatch.cs +++ b/src/Patches/Gameplay/UI/MiniMapBehaviourPatch.cs @@ -1,10 +1,11 @@ using BetterAmongUs.Data.Config; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono; using HarmonyLib; using UnityEngine; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Gameplay.UI; diff --git a/src/Patches/Gameplay/UI/PlayerTabPatch.cs b/src/Patches/Gameplay/UI/PlayerTabPatch.cs index 456778f..fdebd40 100644 --- a/src/Patches/Gameplay/UI/PlayerTabPatch.cs +++ b/src/Patches/Gameplay/UI/PlayerTabPatch.cs @@ -2,7 +2,7 @@ using BetterAmongUs.Data; using BetterAmongUs.Data.Config; using BetterAmongUs.Data.Json; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules.Support; using BetterAmongUs.Mono.Extended; using BetterAmongUs.Patches.Client.Managers; diff --git a/src/Patches/Gameplay/UI/ReportReasonScreenPatch.cs b/src/Patches/Gameplay/UI/ReportReasonScreenPatch.cs index efd6ce2..5888aa0 100644 --- a/src/Patches/Gameplay/UI/ReportReasonScreenPatch.cs +++ b/src/Patches/Gameplay/UI/ReportReasonScreenPatch.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using HarmonyLib; namespace BetterAmongUs.Patches.Gameplay.UI; diff --git a/src/Patches/Gameplay/UI/ServerDropdownPatch.cs b/src/Patches/Gameplay/UI/ServerDropdownPatch.cs index 424930a..59e539e 100644 --- a/src/Patches/Gameplay/UI/ServerDropdownPatch.cs +++ b/src/Patches/Gameplay/UI/ServerDropdownPatch.cs @@ -1,9 +1,9 @@ -using BetterAmongUs.Helpers; -using BetterAmongUs.Modules.Support; +using BetterAmongUs.Modules.Support; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using UnityEngine; using UnityEngine.SceneManagement; +using BetterAmongUs.Utilities.Extension; namespace BetterAmongUs.Patches.Gameplay.UI; diff --git a/src/Patches/Gameplay/ZoomPatch.cs b/src/Patches/Gameplay/ZoomPatch.cs index d5cd26b..3835cc1 100644 --- a/src/Patches/Gameplay/ZoomPatch.cs +++ b/src/Patches/Gameplay/ZoomPatch.cs @@ -1,5 +1,5 @@ using AmongUs.GameOptions; -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using BetterAmongUs.Modules; using HarmonyLib; using UnityEngine; diff --git a/src/Patches/Unity/UnityWebRequestPatch.cs b/src/Patches/Unity/UnityWebRequestPatch.cs index da783b7..20686ec 100644 --- a/src/Patches/Unity/UnityWebRequestPatch.cs +++ b/src/Patches/Unity/UnityWebRequestPatch.cs @@ -1,9 +1,9 @@ -using BetterAmongUs.Helpers; -using BetterAmongUs.Modules.Support; +using BetterAmongUs.Modules.Support; using HarmonyLib; using System.Text; using UnityEngine; using UnityEngine.Networking; +using BetterAmongUs.Modules; namespace BetterAmongUs.Patches.Unity; diff --git a/src/Structs/TempClientData.cs b/src/Structs/TempClientData.cs index f5159da..85f2fd2 100644 --- a/src/Structs/TempClientData.cs +++ b/src/Structs/TempClientData.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using InnerNet; namespace BetterAmongUs.Structs; diff --git a/src/Structs/UserInfo.cs b/src/Structs/UserInfo.cs index 6f4f34e..1509911 100644 --- a/src/Structs/UserInfo.cs +++ b/src/Structs/UserInfo.cs @@ -1,4 +1,4 @@ -using BetterAmongUs.Helpers; +using BetterAmongUs.Utilities; using System.Text.Json.Serialization; namespace BetterAmongUs.Structs; diff --git a/src/Helpers/Colors.cs b/src/Utilities/Colors.cs similarity index 99% rename from src/Helpers/Colors.cs rename to src/Utilities/Colors.cs index db53287..6b91198 100644 --- a/src/Helpers/Colors.cs +++ b/src/Utilities/Colors.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides extension methods and utilities for working with colors in Unity. diff --git a/src/Helpers/EnumHelper.cs b/src/Utilities/EnumUtils.cs similarity index 96% rename from src/Helpers/EnumHelper.cs rename to src/Utilities/EnumUtils.cs index 87a73e2..99f71b5 100644 --- a/src/Helpers/EnumHelper.cs +++ b/src/Utilities/EnumUtils.cs @@ -1,9 +1,9 @@ -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides utility methods for working with enumerations. /// -internal static class EnumHelper +internal static class EnumUtils { /// /// Gets all values of an enumeration type. diff --git a/src/Helpers/ActionExtensions.cs b/src/Utilities/Extension/ActionExtensions.cs similarity index 98% rename from src/Helpers/ActionExtensions.cs rename to src/Utilities/Extension/ActionExtensions.cs index 05bc80d..5176072 100644 --- a/src/Helpers/ActionExtensions.cs +++ b/src/Utilities/Extension/ActionExtensions.cs @@ -1,6 +1,6 @@ using UnityEngine.Events; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities.Extension; /// /// Provides extension methods for UnityEvent classes to simplify adding listeners with Action delegates. diff --git a/src/Helpers/CastHelper.cs b/src/Utilities/Extension/CastExtensions.cs similarity index 93% rename from src/Helpers/CastHelper.cs rename to src/Utilities/Extension/CastExtensions.cs index 3ce9c0f..1c187ae 100644 --- a/src/Helpers/CastHelper.cs +++ b/src/Utilities/Extension/CastExtensions.cs @@ -1,9 +1,9 @@ -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities.Extension; /// /// Provides extension methods for safe type casting operations. /// -internal static class CastHelper +internal static class CastExtensions { /// /// Checks if an object can be cast to the specified type. diff --git a/src/Helpers/IEnumerableHelper.cs b/src/Utilities/Extension/IEnumerableExtensions.cs similarity index 97% rename from src/Helpers/IEnumerableHelper.cs rename to src/Utilities/Extension/IEnumerableExtensions.cs index 4505f4c..e10f6d0 100644 --- a/src/Helpers/IEnumerableHelper.cs +++ b/src/Utilities/Extension/IEnumerableExtensions.cs @@ -1,11 +1,11 @@ using Il2CppSystem.Linq; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities.Extension; /// /// Provides extension methods for IEnumerable collections, including shuffling, selecting a random element, and retrieving the middle element. /// -internal static class IEnumerableExtension +internal static class IEnumerableExtensions { private static readonly Random rng = new(); diff --git a/src/Helpers/Il2CppExtensions.cs b/src/Utilities/Extension/Il2CppExtensions.cs similarity index 99% rename from src/Helpers/Il2CppExtensions.cs rename to src/Utilities/Extension/Il2CppExtensions.cs index fbfc0f0..1d5b2b8 100644 --- a/src/Helpers/Il2CppExtensions.cs +++ b/src/Utilities/Extension/Il2CppExtensions.cs @@ -1,6 +1,6 @@ using Il2CppInterop.Runtime.InteropTypes; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities.Extension; /// /// Provides extension methods for working with Il2Cpp collections in a LINQ-like manner. diff --git a/src/Helpers/ObjectHelper.cs b/src/Utilities/GameObjectUtils.cs similarity index 98% rename from src/Helpers/ObjectHelper.cs rename to src/Utilities/GameObjectUtils.cs index 62debea..3573bd9 100644 --- a/src/Helpers/ObjectHelper.cs +++ b/src/Utilities/GameObjectUtils.cs @@ -1,12 +1,12 @@ using BetterAmongUs.Modules.Support; using UnityEngine; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides helper methods for working with Unity GameObjects, components, and visual elements. /// -internal static class ObjectHelper +internal static class GameObjectUtils { /// /// Destroys a GameObject if it is not null. diff --git a/src/Helpers/InnerNetClientHelper.cs b/src/Utilities/InnerNetClientUtils.cs similarity index 96% rename from src/Helpers/InnerNetClientHelper.cs rename to src/Utilities/InnerNetClientUtils.cs index ddfafa1..c067079 100644 --- a/src/Helpers/InnerNetClientHelper.cs +++ b/src/Utilities/InnerNetClientUtils.cs @@ -1,13 +1,14 @@ using AmongUs.InnerNet.GameDataMessages; +using BetterAmongUs.Utilities.Extension; using Hazel; using InnerNet; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides helper methods for working with InnerNet messaging, RPC handling, and message serialization. /// -internal static class InnerNetClientHelper +internal static class InnerNetClientUtils { /// /// Broadcasts an RPC message to all clients with optional reliability. @@ -130,7 +131,7 @@ internal static class InnerNetClientHelper /// /// The MessageWriter to convert. /// An array of MessageReaders. - internal static MessageReader[] ToReaders(this MessageWriter writer) + internal static MessageReader[] MessagesToReaders(this MessageWriter writer) { var reader = writer.ToReader(); List readers = []; @@ -148,7 +149,7 @@ internal static class InnerNetClientHelper /// /// The MessageReader to convert. /// An array of MessageReaders. - internal static MessageReader[] ToReaders(this MessageReader reader) + internal static MessageReader[] MessagesToReaders(this MessageReader reader) { List readers = []; @@ -165,7 +166,7 @@ internal static class InnerNetClientHelper /// /// The MessageReader to convert. /// An array of MessageReaders with new buffers. - internal static MessageReader[] ToReadersNewBuffer(this MessageReader reader) + internal static MessageReader[] MessagesToReadersNewBuffer(this MessageReader reader) { List readers = []; diff --git a/src/Helpers/PlayerControlHelper.cs b/src/Utilities/PlayerControlUtils.cs similarity index 99% rename from src/Helpers/PlayerControlHelper.cs rename to src/Utilities/PlayerControlUtils.cs index c2d23f3..0830327 100644 --- a/src/Helpers/PlayerControlHelper.cs +++ b/src/Utilities/PlayerControlUtils.cs @@ -7,12 +7,12 @@ using BetterAmongUs.Patches.Gameplay.UI.Settings; using InnerNet; using UnityEngine; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides extension methods and utilities for working with PlayerControl instances. /// -internal static class PlayerControlHelper +internal static class PlayerControlUtils { /// /// Gets the ClientData associated with a player. diff --git a/src/Helpers/RoleHelper.cs b/src/Utilities/RoleUtils.cs similarity index 98% rename from src/Helpers/RoleHelper.cs rename to src/Utilities/RoleUtils.cs index 777c4c0..a64cf6f 100644 --- a/src/Helpers/RoleHelper.cs +++ b/src/Utilities/RoleUtils.cs @@ -1,11 +1,11 @@ using AmongUs.GameOptions; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides helper methods for working with Among Us roles and their properties. /// -internal static class RoleHelper +internal static class RoleUtils { /// /// Provides a lazily initialized lookup dictionary that maps each role type to its corresponding role behavior. diff --git a/src/Helpers/ShuffleHelper.cs b/src/Utilities/ShuffleHelper.cs similarity index 91% rename from src/Helpers/ShuffleHelper.cs rename to src/Utilities/ShuffleHelper.cs index 6f88c51..ad0abc4 100644 --- a/src/Helpers/ShuffleHelper.cs +++ b/src/Utilities/ShuffleHelper.cs @@ -1,9 +1,9 @@ -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides extension methods for shuffling collections. /// -internal static class ShuffleListExtension +internal static class ShuffleExtensions { /// /// Shuffles all elements in a collection randomly using the Fisher-Yates algorithm. diff --git a/src/Helpers/Utils.cs b/src/Utilities/Utils.cs similarity index 99% rename from src/Helpers/Utils.cs rename to src/Utilities/Utils.cs index d511701..6de5c48 100644 --- a/src/Helpers/Utils.cs +++ b/src/Utilities/Utils.cs @@ -1,13 +1,14 @@ using AmongUs.Data; using BetterAmongUs.Modules; using BetterAmongUs.Patches.Gameplay.UI.Chat; +using BetterAmongUs.Utilities.Extension; using InnerNet; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using UnityEngine; -namespace BetterAmongUs.Helpers; +namespace BetterAmongUs.Utilities; /// /// Provides utility methods for string manipulation, network operations, player lookups, and game utilities.