static bool Prefix(ref KillButtonManager __instance) { if (IsSheriff(PlayerControl.LocalPlayer.PlayerId) && __instance.isActiveAndEnabled && __instance.CurrentTarget && !__instance.isCoolingDown && !PlayerControl.LocalPlayer.Data.IsImpostor && PlayerControl.LocalPlayer.CanMove) { if (__instance.CurrentTarget.Data.IsImpostor) // target is an impostor { PlayerControl_FixedUpdate.RpcSheriffKill(PlayerControl.LocalPlayer, __instance.CurrentTarget.PlayerId); } else { if (CustomGameOptionsData.customGameOptions.doKillSheriffsTarget.value) { // TODO: uhm PlayerControl_FixedUpdate.RpcSheriffKill(__instance.CurrentTarget, __instance.CurrentTarget.PlayerId); } PlayerControl_FixedUpdate.RpcSheriffKill(PlayerControl.LocalPlayer, PlayerControl.LocalPlayer.PlayerId); } __instance.SetTarget(null); return(false); } return(true); }
static bool Prefix(ref KillButtonManager __instance) { if (IsSheriff(PlayerControl.LocalPlayer.PlayerId) && __instance.isActiveAndEnabled && __instance.CurrentTarget && !__instance.isCoolingDown && !PlayerControl.LocalPlayer.JLGGIOLCDFC.DLPCKPBIJOE && PlayerControl.LocalPlayer.GEBLLBHGHLD) { if (__instance.CurrentTarget.JLGGIOLCDFC.DAPKNDBLKIA) // target is an impostor { PlayerControl_FixedUpdate.RpcSheriffKill(PlayerControl.LocalPlayer, __instance.CurrentTarget.PlayerId); } else { if (OptionsPatches.doKillSheriffsTarget) { // TODO: uhm PlayerControl_FixedUpdate.RpcSheriffKill(__instance.CurrentTarget, __instance.CurrentTarget.PlayerId); } PlayerControl_FixedUpdate.RpcSheriffKill(PlayerControl.LocalPlayer, PlayerControl.LocalPlayer.PlayerId); } __instance.SetTarget(null); return(false); } return(true); }
static void Postfix(ref PlayerControl __instance) { __instance.Data.IsImpostor = trueImpost; if (IsSheriff(__instance.PlayerId)) { PlayerControl_FixedUpdate.SetSheriffKillTimer(__instance, CustomGameOptionsData.customGameOptions.sheriffKillCd.value); } }
static void Postfix() { if (DestroyableSingleton <TutorialManager> .InstanceExists || !ShipStatus.Instance.IsGameOverDueToDeath()) { if (IsSheriff(PlayerControl.LocalPlayer.PlayerId) && !PlayerControl.LocalPlayer.Data.IsDead) { PlayerControl_FixedUpdate.SetSheriffKillTimer(PlayerControl.LocalPlayer, CustomGameOptionsData.customGameOptions.sheriffKillCd.value); } } }
static bool Prefix(byte HKHMBLJFLMC, MessageReader ALMCIJKELCP) { switch ((CustomRpc)HKHMBLJFLMC) { case CustomRpc.SelectSheriffs: sheriffs = ALMCIJKELCP.ReadBytesAndSize().ToList(); break; case CustomRpc.SheriffKill: var sheriff = GameData.Instance.GetPlayerById(ALMCIJKELCP.ReadByte())?.Object; PlayerControl_FixedUpdate.SheriffKill(sheriff, ALMCIJKELCP.ReadByte()); break; default: return(true); } return(false); }
static void Postfix() { PlayerControl_FixedUpdate.SetSheriffKillTimer(PlayerControl.LocalPlayer, 10f); // FIXED: ability to kill on intro scene }