From bde161ad87ddfe4772c457e59cd7ba8638001f72 Mon Sep 17 00:00:00 2001 From: D1GQ Date: Sat, 24 Aug 2024 08:22:20 -0500 Subject: [PATCH] clean up --- Modules/AntiCheat.cs | 3 --- Modules/BetterNotificationManager.cs | 2 +- Modules/ClientOptionItem.cs | 4 ++-- Modules/OptionItems/NoneOption/BetterOptionTitleItem.cs | 3 +-- Modules/RPC.cs | 1 - Patches/ClientOptionsPatch.cs | 3 +-- Patches/CommandsPatch.cs | 4 ++-- Patches/GamePlayManagerPatch.cs | 1 - Patches/MainMenuPatch.cs | 2 +- Patches/MeetingHudPatch.cs | 2 +- Patches/PlayerControlPatch.cs | 3 --- Patches/SplashIntroPatch.cs | 1 - Patches/VersionShowerPatch.cs | 2 +- 13 files changed, 10 insertions(+), 21 deletions(-) diff --git a/Modules/AntiCheat.cs b/Modules/AntiCheat.cs index a7aa17b..f7c2436 100644 --- a/Modules/AntiCheat.cs +++ b/Modules/AntiCheat.cs @@ -3,9 +3,6 @@ using BetterAmongUs.Patches; using HarmonyLib; using Hazel; using InnerNet; -using UnityEngine; -using UnityEngine.Purchasing; -using UnityEngine.Rendering; namespace BetterAmongUs; diff --git a/Modules/BetterNotificationManager.cs b/Modules/BetterNotificationManager.cs index 7c3ba8a..5dfc5f6 100644 --- a/Modules/BetterNotificationManager.cs +++ b/Modules/BetterNotificationManager.cs @@ -17,7 +17,7 @@ class BetterNotificationManager if (BAUNotificationManagerObj != null) { - if (Notifying) + if (Notifying) { if (text == BAUNotificationManagerObj.transform.Find("Sizer/ChatText (TMP)").GetComponent().text) return; diff --git a/Modules/ClientOptionItem.cs b/Modules/ClientOptionItem.cs index 52a1826..a64692e 100644 --- a/Modules/ClientOptionItem.cs +++ b/Modules/ClientOptionItem.cs @@ -84,8 +84,8 @@ public class ClientOptionItem // ボタン生成 ToggleButton = Object.Instantiate(mouseMoveToggle, CustomBackground.transform); - ToggleButton.transform.localPosition = new Vector3( - // 現在のオプション数を基に位置を計算 + ToggleButton.transform.localPosition = new Vector3( + // 現在のオプション数を基に位置を計算 numOptions % 2 == 0 ? -1.3f : 1.3f, 2.2f - (0.5f * (numOptions / 2)), -6f); diff --git a/Modules/OptionItems/NoneOption/BetterOptionTitleItem.cs b/Modules/OptionItems/NoneOption/BetterOptionTitleItem.cs index 3014c3f..5c712be 100644 --- a/Modules/OptionItems/NoneOption/BetterOptionTitleItem.cs +++ b/Modules/OptionItems/NoneOption/BetterOptionTitleItem.cs @@ -1,5 +1,4 @@ -using Rewired; -using UnityEngine; +using UnityEngine; namespace BetterAmongUs; diff --git a/Modules/RPC.cs b/Modules/RPC.cs index 623b40a..9642569 100644 --- a/Modules/RPC.cs +++ b/Modules/RPC.cs @@ -1,7 +1,6 @@ using BetterAmongUs.Patches; using HarmonyLib; using Hazel; -using InnerNet; namespace BetterAmongUs; diff --git a/Patches/ClientOptionsPatch.cs b/Patches/ClientOptionsPatch.cs index 7f44a19..f811f98 100644 --- a/Patches/ClientOptionsPatch.cs +++ b/Patches/ClientOptionsPatch.cs @@ -1,6 +1,5 @@ using HarmonyLib; using UnityEngine; -using static Rewired.Data.UserDataStore_PlayerPrefs.ControllerAssignmentSaveInfo; namespace BetterAmongUs.Patches; @@ -80,7 +79,7 @@ public static class OptionsMenuBehaviourPatch BetterNotificationManager.Notifying = false; } } - + if (ChatInGameplay == null || ChatInGameplay.ToggleButton == null) { ChatInGameplay = ClientOptionItem.Create("Chat In Gameplay", Main.ChatInGameplay, __instance); diff --git a/Patches/CommandsPatch.cs b/Patches/CommandsPatch.cs index 5712f37..faa81dc 100644 --- a/Patches/CommandsPatch.cs +++ b/Patches/CommandsPatch.cs @@ -175,7 +175,7 @@ class CommandsPatch sb.Append("\n\n"); } Utils.AddChatPrivate(sb.ToString()); - break; + break; case "whisper" or "w": if (HandlePlayerArgument(command, subArgs) == true) { @@ -410,7 +410,7 @@ class CommandsPatch RPC.SyncAllNames(force: true); Utils.AddChatPrivate("All player names have been updated and synced!"); } - break; + break; case "suicide": if (HandleIsHost(command) == true) { diff --git a/Patches/GamePlayManagerPatch.cs b/Patches/GamePlayManagerPatch.cs index 36a7b93..dde1357 100644 --- a/Patches/GamePlayManagerPatch.cs +++ b/Patches/GamePlayManagerPatch.cs @@ -1,5 +1,4 @@ using HarmonyLib; -using Newtonsoft.Json.Utilities; using System.Text; using TMPro; using UnityEngine; diff --git a/Patches/MainMenuPatch.cs b/Patches/MainMenuPatch.cs index d9d1e11..c54a34e 100644 --- a/Patches/MainMenuPatch.cs +++ b/Patches/MainMenuPatch.cs @@ -99,7 +99,7 @@ internal class MainMenuPatch bool Flag = __instance?.screenTint?.GetComponent() != null && !__instance.screenTint.GetComponent().enabled; - foreach (var item in buttonsObj) + foreach (var item in buttonsObj) { item.SetActive(Flag); } diff --git a/Patches/MeetingHudPatch.cs b/Patches/MeetingHudPatch.cs index b9a80f2..7ca3320 100644 --- a/Patches/MeetingHudPatch.cs +++ b/Patches/MeetingHudPatch.cs @@ -99,7 +99,7 @@ class MeetingHudUpdatePatch case DisconnectReasons.Hacking: DisconnectText = "Banned By Server"; break; - default: + default: DisconnectText = "Disconnected"; break; } diff --git a/Patches/PlayerControlPatch.cs b/Patches/PlayerControlPatch.cs index 18e0adc..dbf63fb 100644 --- a/Patches/PlayerControlPatch.cs +++ b/Patches/PlayerControlPatch.cs @@ -1,9 +1,6 @@ using AmongUs.Data; -using AmongUs.GameOptions; using HarmonyLib; -using Hazel; using Il2CppSystem.Linq; -using InnerNet; using LibCpp2IL; using System.Text; using System.Text.RegularExpressions; diff --git a/Patches/SplashIntroPatch.cs b/Patches/SplashIntroPatch.cs index 6f6d000..2e1482c 100644 --- a/Patches/SplashIntroPatch.cs +++ b/Patches/SplashIntroPatch.cs @@ -1,6 +1,5 @@ using HarmonyLib; using UnityEngine; -using UnityEngine.Rendering; namespace BetterAmongUs.Patches; diff --git a/Patches/VersionShowerPatch.cs b/Patches/VersionShowerPatch.cs index f952dfb..f3a489e 100644 --- a/Patches/VersionShowerPatch.cs +++ b/Patches/VersionShowerPatch.cs @@ -9,6 +9,6 @@ public class VersionShowerPatch [HarmonyPostfix] public static void Postfix(VersionShower __instance) { - __instance.text.text = $"♻BetterAmongUs♻ {Main.GetVersionText()} - " + __instance.text.text; + __instance.text.text = $"♻BetterAmongUs♻ {Main.GetVersionText()} - " + __instance.text.text; } }