Skip to content

Commit

Permalink
Fix for 2021.3.31.3s
Browse files Browse the repository at this point in the history
  • Loading branch information
Herysia committed Apr 3, 2021
1 parent 2067551 commit c15463b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
33 changes: 21 additions & 12 deletions CustomKeybinds/Patches/KeyboardJoystickPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using UnityEngine;

// DestroyableSingleton -> PPAEIPHJPDH;
// DestroyableSingleton.InstanceExists -> PPAEIPHJPDH.NDBGOOFMEPL
// DestroyableSingleton.Instance -> MHKLHAFLPJN
// DestroyableSingleton.InstanceExists -> PPAEIPHJPDH.JECNDKBIOFO
// DestroyableSingleton.Instance -> CMJOLNCMAPD
// MapBehaviour.Instance.IsOpen -> CBAGIJCCEGG.Instance.GELKOGPNIBJ (/!\ it's maybe IsOpenStopped
// PlayerControl.LocalPlayer.Data.IsImpostor -> PlayerControl.LocalPlayer.FKJEJKMBKDJ.DAPKNDBLKIA
// PlayerControl.LocalPlayer.Data.IsImpostor -> PlayerControl.LocalPlayer.IDOFAMCIJKE.DAPKNDBLKIA


namespace CustomKeyBinds.Patches
Expand All @@ -29,15 +29,15 @@ public static bool Prefix(KeyboardJoystick __instance)
if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(ConfigManager.keyBinds[KeyAction.Backward]))
del.y -= 1f;
del.Normalize();
__instance.CPJJFPNHGII = del;
__instance.GOJFEOOBJKI = del;

HandleHud();
if (Input.GetKeyDown(KeyCode.Escape))
{
if (Minigame.Instance)
Minigame.Instance.Close();
else if (DestroyableSingleton<HudManager>.NDBGOOFMEPL && MapBehaviour.Instance &&
MapBehaviour.Instance.MLFKKIHIMAI)
else if (DestroyableSingleton<HudManager>.JECNDKBIOFO && MapBehaviour.Instance &&
MapBehaviour.Instance.LFGAAGECFFO)
MapBehaviour.Instance.Close();
else if (CustomPlayerMenu.Instance) CustomPlayerMenu.Instance.Close(true);
}
Expand All @@ -47,17 +47,26 @@ public static bool Prefix(KeyboardJoystick __instance)

private static void HandleHud()
{
if (!DestroyableSingleton<HudManager>.NDBGOOFMEPL) return;
if (!DestroyableSingleton<HudManager>.JECNDKBIOFO) return;
if (Input.GetKeyDown(ConfigManager.keyBinds[KeyAction.Report]))
DestroyableSingleton<HudManager>.MHKLHAFLPJN.ReportButton.DoClick();
DestroyableSingleton<HudManager>.CMJOLNCMAPD.ReportButton.DoClick();
if (Input.GetKeyDown(ConfigManager.keyBinds[KeyAction.Use]))
DestroyableSingleton<HudManager>.MHKLHAFLPJN.UseButton.DoClick();
DestroyableSingleton<HudManager>.CMJOLNCMAPD.UseButton.DoClick();
if (Input.GetKeyDown(ConfigManager.keyBinds[KeyAction.Map]))
DestroyableSingleton<HudManager>.MHKLHAFLPJN.OpenMap();
DestroyableSingleton<HudManager>.CMJOLNCMAPD.OpenMap();
if (Input.GetKeyDown(ConfigManager.keyBinds[KeyAction.Tasks])) Utils.ToggleTab();
if (PlayerControl.LocalPlayer.FKJEJKMBKDJ != null && PlayerControl.LocalPlayer.FKJEJKMBKDJ.MBJGOEANAPF &&
/*
if((PlayerControl.LocalPlayer.IDOFAMCIJKE != null))
{
System.Console.WriteLine("1: {0}", PlayerControl.LocalPlayer.IDOFAMCIJKE.BGJOHABEFMJ);
System.Console.WriteLine("2: {0}", PlayerControl.LocalPlayer.IDOFAMCIJKE.GBPMEHJFECK);
System.Console.WriteLine("3: {0}", PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH);
System.Console.WriteLine("4: {0}", PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ);
}
*/
if (PlayerControl.LocalPlayer.IDOFAMCIJKE != null && PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH &&
Input.GetKeyDown(ConfigManager.keyBinds[KeyAction.Kill]))
DestroyableSingleton<HudManager>.MHKLHAFLPJN.KillButton.PerformKill();
DestroyableSingleton<HudManager>.CMJOLNCMAPD.KillButton.PerformKill();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion CustomKeybinds/Tools/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static T GetChildComponentByName<T>(GameObject parent, string name) where

internal static void ToggleTab()
{
var taskStuff = DestroyableSingleton<HudManager>.MHKLHAFLPJN?.TaskStuff;
var taskStuff = DestroyableSingleton<HudManager>.CMJOLNCMAPD?.TaskStuff;

if (taskStuff == null || !taskStuff.active)
return;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Among us mod that allow you to set custom keybinds for common actions through an
# Technical stuff
This mod is using BepInEx for patching the game at runtime, it **DOES NOT** modify any game files.

- Steam 2021.3.31s support ONLY (send me Itch obfuscated names if you want it)
- Steam 2021.3.31.3s support ONLY (send me Itch obfuscated names if you want it)
- Code with unobfuscated names is available in 2020.9.9s branch


Expand Down

0 comments on commit c15463b

Please sign in to comment.