diff --git a/FEATURES.md b/FEATURES.md index 20e283d..383fe1f 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -9,7 +9,9 @@ - [ESP](#esp) - [SeeGhosts](#seeghosts) - [SeeRoles](#seeroles) + - [AlwaysChat](#alwayschat) - [FullBright](#fullbright) + - [Camera](#camera) - [ZoomOut](#zoomout) - [Spectate](#spectate) - [Freecam](#freecam) @@ -45,7 +47,6 @@ - [EvilVote](#evilvote) - [VoteImmune](#voteimmune) - [Passive](#passive) - - [AlwaysChat](#alwayschat) - [FreeCosmetics](#freecosmetics) - [AvoidPenalties](#avoidpenalties) - [UnlockFeatures](#unlockfeatures) @@ -109,12 +110,20 @@ Type: **Toggle** ![SeeRoles](https://cdn.discordapp.com/attachments/1097928762324168744/1133144778272419840/image.png) +### AlwaysChat +Keeps the chat icon always enabled, even while you're not in a meeting or the lobby + +Type: **Toggle** +- Default: **OFF** + ### FullBright Removes all shadows, allowing you to see during blackouts and even through walls Type: **Toggle** - Default: **OFF** +## Camera + ### ZoomOut Allows you to zoom-out the player's camera using your mouse's scrollwheel @@ -329,13 +338,6 @@ Type: **Toggle** ## Passive These cheats are constantly running in the background and cannot be disabled to avoid problems -### AlwaysChat -Keeps the chat icon always enabled, even while you're not in a meeting or the lobby - -Type: **Toggle** -- Default: **ON** -- **CANNOT BE DISABLED** - ### FreeCosmetics Gives you access to all of the game's cosmetics for free, including: diff --git a/src/ESP/HudPatches.cs b/src/ESP/HudPatches.cs index 258d320..fe9da0a 100644 --- a/src/ESP/HudPatches.cs +++ b/src/ESP/HudPatches.cs @@ -7,17 +7,18 @@ namespace MalumMenu; public static class ESP_HudManagerPostfix { public static bool resolutionchangeNeeded; + public static bool chatActive; + public static bool fullBrightActive; //Postfix patch of HudManager.Update for several HUD modules public static void Postfix(HudManager __instance){ - //Remove ShadowQuad if CheatSettings.fullBright or camera is zoomed-out or spectating/freecam - if(CheatSettings.fullBright - || Camera.main.orthographicSize > 3f - || Camera.main.gameObject.GetComponent().Target != PlayerControl.LocalPlayer){ - __instance.ShadowQuad.gameObject.SetActive(false); - }else{ - __instance.ShadowQuad.gameObject.SetActive(true); - } + //Remove all shadows if CheatSettings.fullBright or camera is zoomed-out or spectating/freecam + fullBrightActive = CheatSettings.fullBright || Camera.main.orthographicSize > 3f || Camera.main.gameObject.GetComponent().Target != PlayerControl.LocalPlayer; + __instance.ShadowQuad.gameObject.SetActive(!fullBrightActive); + + //Allow seeing chat icon in-game even while you're not supposed to + chatActive = CheatSettings.alwaysChat || MeetingHud.Instance || !ShipStatus.Instance || PlayerControl.LocalPlayer.Data.IsDead; + __instance.Chat.gameObject.SetActive(chatActive); //Allow zooming-out through mouse wheel if CheatSettings.zoomOut is enabled if(CheatSettings.zoomOut){ diff --git a/src/MalumMenu.csproj b/src/MalumMenu.csproj index 8a63cdd..220f9f4 100644 --- a/src/MalumMenu.csproj +++ b/src/MalumMenu.csproj @@ -4,14 +4,14 @@ latest embedded - 1.1.0 + 1.1.1 all play and no cheats makes among us a dull game - + diff --git a/src/MalumMenuPlugin.cs b/src/MalumMenuPlugin.cs index 14c8cf4..1803b8a 100644 --- a/src/MalumMenuPlugin.cs +++ b/src/MalumMenuPlugin.cs @@ -13,7 +13,7 @@ namespace MalumMenu; public partial class MalumPlugin : BasePlugin { public Harmony Harmony { get; } = new(Id); - public static string malumVersion = "1.1.0"; + public static string malumVersion = "1.1.1"; public static List supportedAU = new List { "2023.7.12", "2023.7.11" }; private static MenuUI menuUI; diff --git a/src/Passive/HudChatPatch.cs b/src/Passive/HudChatPatch.cs deleted file mode 100644 index 05e3297..0000000 --- a/src/Passive/HudChatPatch.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HarmonyLib; - -namespace MalumMenu; - -[HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))] -public static class Passive_HudChatPostfix -{ - //Postfix patch of HudManager.Update to enable the chat icon in-game - //if CheatSettings.alwaysChat is turned on - public static void Postfix(HudManager __instance){ - __instance.Chat.gameObject.SetActive(CheatSettings.alwaysChat); - } -} \ No newline at end of file diff --git a/src/UI/CheatSettings.cs b/src/UI/CheatSettings.cs index d465579..4ff1fe8 100644 --- a/src/UI/CheatSettings.cs +++ b/src/UI/CheatSettings.cs @@ -13,11 +13,14 @@ public struct CheatSettings public static bool teleportPlayer; //ESP - public static bool zoomOut; + public static bool alwaysChat; public static bool fullBright; public static bool seeGhosts; public static bool seeRoles; + + //Camera public static bool spectate; + public static bool zoomOut; public static bool freeCam; //Minimap @@ -60,7 +63,6 @@ public struct CheatSettings public static bool voteImmune; //Passive - public static bool alwaysChat = true; public static bool unlockFeatures = true; public static bool freeCosmetics = true; public static bool avoidBans = true; diff --git a/src/UI/MenuUI.cs b/src/UI/MenuUI.cs index f7ec519..7d8dc00 100644 --- a/src/UI/MenuUI.cs +++ b/src/UI/MenuUI.cs @@ -25,7 +25,11 @@ private void Start() groups.Add(new GroupInfo("ESP", false, new List() { new ToggleInfo(" SeeGhosts", () => CheatSettings.seeGhosts, x => CheatSettings.seeGhosts = x), new ToggleInfo(" SeeRoles", () => CheatSettings.seeRoles, x => CheatSettings.seeRoles = x), - new ToggleInfo(" FullBright", () => CheatSettings.fullBright, x => CheatSettings.fullBright = x), + new ToggleInfo(" AlwaysChat", () => CheatSettings.alwaysChat, x => CheatSettings.alwaysChat = x), + new ToggleInfo(" FullBright", () => CheatSettings.fullBright, x => CheatSettings.fullBright = x) + })); + + groups.Add(new GroupInfo("Camera", false, new List() { new ToggleInfo(" ZoomOut", () => CheatSettings.zoomOut, x => CheatSettings.zoomOut = x), new ToggleInfo(" Spectate", () => CheatSettings.spectate, x => CheatSettings.spectate = x), new ToggleInfo(" Freecam", () => CheatSettings.freeCam, x => CheatSettings.freeCam = x) @@ -75,7 +79,6 @@ private void Start() })); groups.Add(new GroupInfo("Passive", false, new List() { - new ToggleInfo(" AlwaysChat", () => CheatSettings.alwaysChat, x => CheatSettings.alwaysChat = x), new ToggleInfo(" FreeCosmetics", () => CheatSettings.freeCosmetics, x => CheatSettings.freeCosmetics = x), new ToggleInfo(" AvoidPenalties", () => CheatSettings.avoidBans, x => CheatSettings.avoidBans = x), new ToggleInfo(" UnlockFeatures", () => CheatSettings.unlockFeatures, x => CheatSettings.unlockFeatures = x) @@ -94,7 +97,7 @@ private void Update(){ } //Passive cheats are always on to avoid problems - CheatSettings.alwaysChat = CheatSettings.unlockFeatures = CheatSettings.freeCosmetics = CheatSettings.avoidBans = true; + CheatSettings.unlockFeatures = CheatSettings.freeCosmetics = CheatSettings.avoidBans = true; //Host-only cheats are turned off if LocalPlayer is not the game's host if(!isHostCheck.isHost){