Skip to content

Commit 33da492

Browse files
committed
feat: add doing tasks as impostor
1 parent 5d107b6 commit 33da492

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Make sure you are only having one version of MalumMenu installed at a time, as h
7676
#### New cheats
7777
- **Player**: Fake Revive, Invert Controls
7878
- **ESP**: Show Player Info, More Lobby Info, Show Task Arrows
79-
- **Roles**: Tasks Menu (to complete individual tasks and see other players' tasks), Track Reach, Interrogate Reach
79+
- **Roles**: Do Tasks as Impostor, Tasks Menu (to complete individual tasks and see other players' tasks), Track Reach, Interrogate Reach
8080
- **Ship**: Call Meeting, Open Sabotage Map, Trigger Spores ([#40](https://github.com/scp222thj/MalumMenu/pull/40)), Auto-Open Doors On Use, Doors Menu (to close / open individual doors)
8181
- **Host-Only**: No Options Limits, Protect Player PPM
8282
- **Meetings** (NEW!): Skip Meeting, VoteImmune, Eject Player

src/Patches/OtherPatches.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,19 @@ public static bool Prefix(MushroomDoorSabotageMinigame __instance)
285285
}
286286
}
287287

288+
[HarmonyPatch(typeof(Console), nameof(Console.CanUse))]
289+
public static class Console_CanUse
290+
{
291+
/// <summary>
292+
/// Prefix patch of Console.CanUse to allow impostors to do tasks
293+
/// </summary>
294+
/// <param name="__instance">The <c>Console</c> instance.</param>
295+
public static void Prefix(Console __instance)
296+
{
297+
__instance.AllowImpostor = CheatToggles.impostorTasks;
298+
}
299+
}
300+
288301
[HarmonyPatch(typeof(Vent), nameof(Vent.CanUse))]
289302
public static class Vent_CanUse
290303
{

src/UI/CheatToggles.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public struct CheatToggles
3030
public static bool zeroKillCd;
3131
public static bool showTasksMenu;
3232
public static bool completeMyTasks;
33+
public static bool impostorTasks;
3334
public static bool killReach;
3435
public static bool killAnyone;
3536
public static bool endlessSsDuration;

src/UI/MenuUI.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ private void Start()
7575
],
7676
[
7777
new SubmenuInfo("Impostor", false, [
78-
new ToggleInfo(" Kill Reach", () => CheatToggles.killReach, x => CheatToggles.killReach = x)
78+
new ToggleInfo(" Kill Reach", () => CheatToggles.killReach, x => CheatToggles.killReach = x),
79+
new ToggleInfo(" Do Tasks", () => CheatToggles.impostorTasks, x => CheatToggles.impostorTasks = x)
7980
]),
8081

8182
new SubmenuInfo("Shapeshifter", false, [

0 commit comments

Comments
 (0)