mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Enable kick and ban in gameplay
This commit is contained in:
1 parent
ce9915f215
commit
bfdeb4d257
1 file changed
+18
@@ -17,6 +17,24 @@ public class ClientPatch
|
||||
Logger.Log($"Client has left game for: {Enum.GetName(reason)}", "AmongUsClientPatch");
|
||||
}
|
||||
}
|
||||
[HarmonyPatch(typeof(InnerNetClient))]
|
||||
public class InnerNetClientPatch
|
||||
{
|
||||
[HarmonyPatch(nameof(InnerNetClient.CanBan))]
|
||||
[HarmonyPrefix]
|
||||
public static bool CanBan_Prefix(ref bool __result)
|
||||
{
|
||||
__result = GameStates.IsHost;
|
||||
return false;
|
||||
}
|
||||
[HarmonyPatch(nameof(InnerNetClient.CanKick))]
|
||||
[HarmonyPrefix]
|
||||
public static bool CanKick_Prefix(ref bool __result)
|
||||
{
|
||||
__result = GameStates.IsHost;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Set text color
|
||||
[HarmonyPatch(typeof(CosmeticsLayer))]
|
||||
public class CosmeticsLayerPatch
|
||||
|
||||
Reference in new issue
Block a user