Exemple #1
0
            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);
            }
Exemple #2
0
        public static void Postfix(HudManager __instance)
        {
            HUD = __instance;

            KillButton = __instance.KillButton;

            PlayerController.Update();
            if (OOCJALPKPEP.Instance != null)
            {
                updateMeetingHUD(OOCJALPKPEP.Instance);
            }
        }
Exemple #3
0
        public static void Postfix(PIEFJFEOGOL __instance)
        {
            KillButton = __instance.KillButton;
            if (OOCJALPKPEP.Instance != null)
            {
                updateOOCJALPKPEP(OOCJALPKPEP.Instance);
            }

            UpdateGameSettingsText(__instance);

            if (FFGALNAPKCD.AllPlayerControls.Count > 1 & PlayerControlPatch.Sheriff != null)
            {
                if (PlayerControlPatch.isSheriff(FFGALNAPKCD.LocalPlayer))
                {
                    FFGALNAPKCD.LocalPlayer.nameText.Color = new Color(1, (float)(204.0 / 255.0), 0, 1);
                    if (FFGALNAPKCD.LocalPlayer.NDGFFHMFGIG.DLPCKPBIJOE)
                    {
                        KillButton.gameObject.SetActive(false);
                        KillButton.isActive = false;
                    }
                    else
                    {
                        KillButton.gameObject.SetActive(true);
                        KillButton.isActive = true;
                        KillButton.SetCoolDown(PlayerControlPatch.SheriffKillTimer(), FFGALNAPKCD.GameOptions.IGHCIKIDAMO + 15.0f);
                        PlayerControlPatch.closestPlayer = PlayerControlPatch.getClosestPlayer(FFGALNAPKCD.LocalPlayer);
                        double dist = PlayerControlPatch.getDistBetweenPlayers(FFGALNAPKCD.LocalPlayer, PlayerControlPatch.closestPlayer);
                        if (dist < KMOGFLPJLLK.JMLGACIOLIK[FFGALNAPKCD.GameOptions.DLIBONBKPKL])
                        {
                            KillButton.SetTarget(PlayerControlPatch.closestPlayer);
                        }
                        if (Input.GetKeyInt(KeyCode.Q))
                        {
                            KillButton.PerformKill();
                        }
                    }
                }
                else if (FFGALNAPKCD.LocalPlayer.NDGFFHMFGIG.DAPKNDBLKIA)
                {
                    if (FFGALNAPKCD.LocalPlayer.NDGFFHMFGIG.DLPCKPBIJOE)
                    {
                        KillButton.gameObject.SetActive(false);
                        KillButton.isActive = false;
                    }
                    else
                    {
                        KillButton.gameObject.SetActive(true);
                        KillButton.isActive = true;
                    }
                }
            }



            if (counter < 30)
            {
                counter++;
                return;
            }
            counter = 0;



            if (GameOptionMenuPatch.showSheriffOption != null && GameOptionMenuPatch.SheriffCooldown != null)
            {
                var isOptionsMenuActive = GameObject.FindObjectsOfType <PHCKLDDNJNP>().Count != 0;
                GameOptionMenuPatch.showSheriffOption.gameObject.SetActive(isOptionsMenuActive);
                GameOptionMenuPatch.SheriffCooldown.gameObject.SetActive(isOptionsMenuActive);
            }
        }