diff --git a/MiraAPI/Patches/HudManagerPatches.cs b/MiraAPI/Patches/HudManagerPatches.cs index 03657d0..adc0fc5 100644 --- a/MiraAPI/Patches/HudManagerPatches.cs +++ b/MiraAPI/Patches/HudManagerPatches.cs @@ -112,6 +112,8 @@ public static class HudManagerPatches Error($"Failed to create custom button {button.GetType().Name}: {e}"); } } + __instance.ImpostorVentButton.transform.SetParent(null); + __instance.ImpostorVentButton.transform.SetParent(BottomRight.transform); gridArrange.Start(); gridArrange.ArrangeChilds(); diff --git a/MiraAPI/Patches/PlayerControlPatches.cs b/MiraAPI/Patches/PlayerControlPatches.cs index 954fd45..659c52f 100644 --- a/MiraAPI/Patches/PlayerControlPatches.cs +++ b/MiraAPI/Patches/PlayerControlPatches.cs @@ -127,17 +127,19 @@ internal static class PlayerControlPatches return; } + var role = __instance.Data?.Role; foreach (var button in CustomButtonManager.CustomButtons) { - if (__instance.Data?.Role == null) + if (role == null) { continue; } try { - if (!button.Enabled(__instance.Data?.Role)) + if (!button.Enabled(role)) { + button.SetActive(false, role); continue; }