mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
adjust code
This commit is contained in:
1 parent
3aecd5a91c
commit
1bc0950acc
2 files changed
+5
-1
No files matched your search
@@ -90,7 +90,7 @@ public static class HudManagerPatches
|
||||
public static void SetHudActivePostfix(HudManager __instance, PlayerControl localPlayer, RoleBehaviour role, bool isActive)
|
||||
{
|
||||
__instance.AdminButton.ToggleVisible(isActive && role.IsImpostor && GameOptionsManager.Instance.CurrentGameOptions.GameMode == AmongUs.GameOptions.GameModes.HideNSeek);
|
||||
if (!localPlayer.Data)
|
||||
if (localPlayer.Data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ public static class HudManagerPatches
|
||||
/// <summary>
|
||||
/// Fixes Kill Button not showing for Neutral killing role.
|
||||
/// </summary>
|
||||
/// <param name="__instance">HudManager instance.</param>
|
||||
/// <param name="localPlayer">The local PlayerControl.</param>
|
||||
/// <param name="role">The player's RoleBehaviour.</param>
|
||||
/// <param name="isActive">Whether the Hud should be set active or not.</param>
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(nameof(HudManager.SetHudActive), typeof(PlayerControl), typeof(RoleBehaviour), typeof(bool))]
|
||||
public static void SetHudActivePostfix(
|
||||
|
||||
Reference in new issue
Block a user