}
return false;
}
- else {
- //
- }
- }
- private static void addGamemodeButton(CreateOptionsPicker __instance, string name, string spritePath, CustomGamemodes gamemode) {
- Vector3 position1 = __instance.MapButtons[3].transform.position;
- Vector3 position2 = __instance.transform.Find("Max Players").position;
- float p = -5.8f + (renderers.Count * 1.4f);
[HarmonyPatch(typeof(CreateOptionsPicker), nameof(CreateOptionsPicker.Refresh))]
public static void Postfix(CreateOptionsPicker __instance) {
return false;
}
- private static bool CheckAndEndGameForProsecutorWin(ShipStatus __instance) {
- if (Lawyer.triggerProsecutorWin) {
- __instance.enabled = false;
- ShipStatus.RpcEndGame((GameOverReason)CustomGameOverReason.ProsecutorWin, false);
- return true;
- }
- return false;
- }
-
private static bool CheckAndEndGameForLoverWin(ShipStatus __instance, PlayerStatistics statistics) {
if (statistics.TeamLoversAlive == 2 && statistics.TotalAlive <= 3) {
//__instance.enabled = false;
__instance.MapButton.HeldButtonSprite.color = Trapper.playersOnMap.Any() ? Trapper.color : Color.white;
}
- static void updateMapButton(HudManager __instance) {
- if (Trapper.trapper == null || !(CachedPlayer.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) || __instance == null || __instance.MapButton == null) return;
- __instance.MapButton.color = Trapper.playersOnMap.Any() ? Trapper.color : Color.white;
- }
-
static void Postfix(HudManager __instance)
{
if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) return;