Enable kick and ban in gameplay

This commit is contained in:
D1GQ committed 2024-08-08 23:42:55 -05:00
1 parent ce9915f215
commit bfdeb4d257
1 file changed
+18
+18
View File
@@ -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