From 3aabc9cce59ad8823bf9c3dbd44f2e1add61bf71 Mon Sep 17 00:00:00 2001 From: Baumdc Date: Wed, 28 Aug 2024 21:57:26 +0200 Subject: [PATCH 1/5] normalizing the normal branch again --- src/MalumMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MalumMenu.cs b/src/MalumMenu.cs index 69a88bf..041503e 100644 --- a/src/MalumMenu.cs +++ b/src/MalumMenu.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using BepInEx.Configuration; using HarmonyLib; - +//update namespace MalumMenu; [BepInAutoPlugin] From debf4e6c9f7954c8a2a5236bd48b46ae21c0ceb9 Mon Sep 17 00:00:00 2001 From: Baumdc Date: Wed, 28 Aug 2024 21:59:36 +0200 Subject: [PATCH 2/5] normalizing --- src/MalumMenu.cs | 2 +- start.bat | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 start.bat diff --git a/src/MalumMenu.cs b/src/MalumMenu.cs index 041503e..69a88bf 100644 --- a/src/MalumMenu.cs +++ b/src/MalumMenu.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using BepInEx.Configuration; using HarmonyLib; -//update + namespace MalumMenu; [BepInAutoPlugin] diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..059baaa --- /dev/null +++ b/start.bat @@ -0,0 +1,17 @@ +@echo off +REM Step 1: Build the project +dotnet build + +REM Step 2: Navigate to the build output directory +cd src\bin\Debug\net6.0 + +REM Step 3: Move the DLL to the Among Us plugins directory +move /Y "MalumMenu.dll" "D:\SteamLibrary\steamapps\common\Among Us\BepInEx\plugins" + +REM Optional: Print a message if the operation was successful +if %errorlevel%==0 ( + echo DLL successfully moved to Among Us plugins directory. +) else ( + echo Failed to move the DLL. +) +Pause Nul \ No newline at end of file From 0d4ffc20389aa6dba8118512bd65238dab8ee521 Mon Sep 17 00:00:00 2001 From: Baumdc Date: Sun, 1 Sep 2024 18:11:04 +0200 Subject: [PATCH 3/5] Added zoom toggled by the C key (keybind can be modifyed in the config) --- src/Cheats/MalumESP.cs | 9 +++++++++ src/MalumMenu.cs | 6 ++++++ src/UI/MenuUI.cs | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/src/Cheats/MalumESP.cs b/src/Cheats/MalumESP.cs index 7292205..b49e0f1 100644 --- a/src/Cheats/MalumESP.cs +++ b/src/Cheats/MalumESP.cs @@ -28,6 +28,15 @@ public static bool fullBrightActive() return CheatToggles.fullBright || Camera.main.orthographicSize > 3f || Camera.main.gameObject.GetComponent().Target != PlayerControl.LocalPlayer; } + public static void zoomToggle(HudManager hudManager) + { + // Funktion to zoom out 2 times + Camera.main.orthographicSize++; + hudManager.UICamera.orthographicSize++; + Camera.main.orthographicSize++; + hudManager.UICamera.orthographicSize++; + } + public static void zoomOut(HudManager hudManager) { if(CheatToggles.zoomOut){ diff --git a/src/MalumMenu.cs b/src/MalumMenu.cs index 69a88bf..e235505 100644 --- a/src/MalumMenu.cs +++ b/src/MalumMenu.cs @@ -27,6 +27,7 @@ public partial class MalumMenu : BasePlugin public static ConfigEntry guestFriendCode; public static ConfigEntry guestMode; public static ConfigEntry noTelemetry; + public static ConfigEntry ToggleZoom; public override void Load() { @@ -72,6 +73,11 @@ public override void Load() true, "When enabled it will stop Among Us from collecting analytics of your games and sending them to Innersloth using Unity Analytics"); + ToggleZoom = Config.Bind("MalumMenu.Cheats", + "ToggleZoom", + "c", + "The keyboard key used to toggle the zoom hack on on press and off on release. List of supported keycodes: https://docs.unity3d.com/Packages/com.unity.tiny@0.16/api/Unity.Tiny.Input.KeyCode.html"); + Harmony.PatchAll(); diff --git a/src/UI/MenuUI.cs b/src/UI/MenuUI.cs index b89d79d..29766db 100644 --- a/src/UI/MenuUI.cs +++ b/src/UI/MenuUI.cs @@ -1,5 +1,7 @@ using UnityEngine; using System.Collections.Generic; +using System; +using JetBrains.Annotations; namespace MalumMenu; public class MenuUI : MonoBehaviour @@ -10,6 +12,7 @@ public class MenuUI : MonoBehaviour private Rect windowRect = new Rect(10, 10, 300, 500); private bool isGUIActive = false; private GUIStyle submenuButtonStyle; + // Create all groups (buttons) and their toggles on start private void Start() @@ -147,6 +150,19 @@ private void Update(){ windowRect.position = new Vector2(mousePosition.x, Screen.height - mousePosition.y); } + if (Input.GetKeyDown(Utils.stringToKeycode(MalumMenu.ToggleZoom.Value)) && DestroyableSingleton.Instance.Chat.IsClosedOrClosing) + { + // Toggle zoom hack with c key + CheatToggles.zoomOut = !CheatToggles.zoomOut; + + // Also zoom out 2 times for immediate use and easy usablity + MalumESP.zoomToggle(DestroyableSingleton.Instance); + } + else if (Input.GetKeyUp(Utils.stringToKeycode(MalumMenu.ToggleZoom.Value)) && DestroyableSingleton.Instance.Chat.IsClosedOrClosing) + { + CheatToggles.zoomOut = !CheatToggles.zoomOut; + } + //Passive cheats are always on to avoid problems CheatToggles.unlockFeatures = CheatToggles.freeCosmetics = CheatToggles.avoidBans = true; From 436b1fd8a7bad257c0c47dbb7f608bbd81d7dd1f Mon Sep 17 00:00:00 2001 From: Baumdc Date: Sun, 1 Sep 2024 18:16:47 +0200 Subject: [PATCH 4/5] Improvements --- src/UI/MenuUI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/MenuUI.cs b/src/UI/MenuUI.cs index 29766db..2ade1ec 100644 --- a/src/UI/MenuUI.cs +++ b/src/UI/MenuUI.cs @@ -153,14 +153,14 @@ private void Update(){ if (Input.GetKeyDown(Utils.stringToKeycode(MalumMenu.ToggleZoom.Value)) && DestroyableSingleton.Instance.Chat.IsClosedOrClosing) { // Toggle zoom hack with c key - CheatToggles.zoomOut = !CheatToggles.zoomOut; + CheatToggles.zoomOut = true; // Also zoom out 2 times for immediate use and easy usablity MalumESP.zoomToggle(DestroyableSingleton.Instance); } else if (Input.GetKeyUp(Utils.stringToKeycode(MalumMenu.ToggleZoom.Value)) && DestroyableSingleton.Instance.Chat.IsClosedOrClosing) { - CheatToggles.zoomOut = !CheatToggles.zoomOut; + CheatToggles.zoomOut = false; } //Passive cheats are always on to avoid problems From 534a69a4e6c5d585c15ba5f43094d7c310a4924e Mon Sep 17 00:00:00 2001 From: Arne Schultz <83294327+Baumdc@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:05:17 +0200 Subject: [PATCH 5/5] Delete start.bat --- start.bat | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 start.bat diff --git a/start.bat b/start.bat deleted file mode 100644 index 059baaa..0000000 --- a/start.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -REM Step 1: Build the project -dotnet build - -REM Step 2: Navigate to the build output directory -cd src\bin\Debug\net6.0 - -REM Step 3: Move the DLL to the Among Us plugins directory -move /Y "MalumMenu.dll" "D:\SteamLibrary\steamapps\common\Among Us\BepInEx\plugins" - -REM Optional: Print a message if the operation was successful -if %errorlevel%==0 ( - echo DLL successfully moved to Among Us plugins directory. -) else ( - echo Failed to move the DLL. -) -Pause Nul \ No newline at end of file