Exemplo n.º 1
0
 public static void UpdateNightvision()
 {
     if ((Global.VisSettings.NightVision && Global.VisualsEnabled && !Global.AllOff) && !Hooks.askScreenshot.NeedingSpy)
     {
         if (LevelLighting.vision != ELightingVision.MILITARY)
         {
             LevelLighting.vision = ELightingVision.MILITARY;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             Global.LastUsedNight = true;
         }
     }
     else
     {
         if (Global.LastUsedNight)
         {
             LevelLighting.vision = ELightingVision.NONE;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             Global.LastUsedNight = false;
         }
     }
 }
Exemplo n.º 2
0
        // Token: 0x060038D2 RID: 14546 RVA: 0x0019FDC4 File Offset: 0x0019E1C4
        private static void onClickedResponseButton(SleekButton button)
        {
            byte             index            = (byte)PlayerNPCDialogueUI.responseBox.search(button);
            DialogueResponse dialogueResponse = PlayerNPCDialogueUI.responses[(int)index];
            DialogueAsset    dialogueAsset    = (DialogueAsset)Assets.find(EAssetType.NPC, dialogueResponse.dialogue);
            QuestAsset       questAsset       = (QuestAsset)Assets.find(EAssetType.NPC, dialogueResponse.quest);

            if (questAsset != null)
            {
                PlayerNPCDialogueUI.close();
                PlayerNPCQuestUI.open(questAsset, dialogueResponse, dialogueAsset, PlayerNPCDialogueUI.dialogue, (Player.player.quests.getQuestStatus(dialogueResponse.quest) != ENPCQuestStatus.READY) ? EQuestViewMode.BEGIN : EQuestViewMode.END);
            }
            else
            {
                VendorAsset vendorAsset = (VendorAsset)Assets.find(EAssetType.NPC, dialogueResponse.vendor);
                if (vendorAsset != null)
                {
                    PlayerNPCDialogueUI.close();
                    PlayerNPCVendorUI.open(vendorAsset, dialogueResponse, dialogueAsset, PlayerNPCDialogueUI.dialogue);
                }
                else
                {
                    PlayerNPCDialogueUI.registerResponse(PlayerNPCDialogueUI.dialogue, dialogueResponse);
                    if (dialogueAsset != null)
                    {
                        PlayerNPCDialogueUI.updateDialogue(dialogueAsset, PlayerNPCDialogueUI.dialogue);
                    }
                    else
                    {
                        PlayerNPCDialogueUI.close();
                        PlayerLifeUI.open();
                    }
                }
            }
        }
Exemplo n.º 3
0
 public void askBrowserRequest(CSteamID steamID, string msg, string url)
 {
     if (this.channel.checkServer(steamID))
     {
         PlayerBrowserRequestUI.open(msg, url);
         PlayerLifeUI.close();
     }
 }
Exemplo n.º 4
0
 // Token: 0x0600396B RID: 14699 RVA: 0x001AA11E File Offset: 0x001A851E
 private void startStrength()
 {
     PlayerLifeUI.close();
     if (this.castStrengthBox != null)
     {
         this.castStrengthBox.isVisible = true;
     }
 }
Exemplo n.º 5
0
 // Token: 0x0600396C RID: 14700 RVA: 0x001AA13C File Offset: 0x001A853C
 private void stopStrength()
 {
     PlayerLifeUI.open();
     if (this.castStrengthBox != null)
     {
         this.castStrengthBox.isVisible = false;
     }
 }
Exemplo n.º 6
0
 // Token: 0x060037DE RID: 14302 RVA: 0x0018C1A5 File Offset: 0x0018A5A5
 private static void onClickedYesButton(SleekButton button)
 {
     if (PlayerBarricadeSignUI.sign != null)
     {
         BarricadeManager.updateSign(PlayerBarricadeSignUI.sign.transform, PlayerBarricadeSignUI.textField.text);
     }
     PlayerLifeUI.open();
     PlayerBarricadeSignUI.close();
 }
 // Token: 0x060037D6 RID: 14294 RVA: 0x0018BC79 File Offset: 0x0018A079
 private static void onClickedSwapButton(SleekButton button)
 {
     if (PlayerBarricadeMannequinUI.mannequin != null)
     {
         BarricadeManager.updateMannequin(PlayerBarricadeMannequinUI.mannequin.transform, EMannequinUpdateMode.SWAP);
     }
     PlayerLifeUI.open();
     PlayerBarricadeMannequinUI.close();
 }
 public static void Enable()
 {
     if (!DrawUtilities.ShouldRun())
     {
         return;
     }
     MiscOptions.Compass = OV_PlayerLifeUI.WasCompassEnabled;
     PlayerLifeUI.updateCompass();
 }
 // Token: 0x060037ED RID: 14317 RVA: 0x0018CB50 File Offset: 0x0018AF50
 private static void onClickedYesButton(SleekButton button)
 {
     if (!string.IsNullOrEmpty(PlayerBrowserRequestUI.url) && Provider.provider.browserService.canOpenBrowser)
     {
         Provider.provider.browserService.open(PlayerBrowserRequestUI.url);
     }
     PlayerLifeUI.open();
     PlayerBrowserRequestUI.close();
 }
Exemplo n.º 10
0
    public static void Enable()
    {
        bool flag = !DrawUtilities.ShouldRun();

        if (!flag)
        {
            MiscOptions.Compass = OV_PlayerLifeUI.WasCompassEnabled;
            PlayerLifeUI.updateCompass();
        }
    }
Exemplo n.º 11
0
 public static void close()
 {
     if (!PlayerDeathUI.active)
     {
         return;
     }
     PlayerDeathUI.active = false;
     PlayerLifeUI.open();
     MainCamera.instance.GetComponent <AudioSource>().Stop();
     PlayerDeathUI.container.lerpPositionScale(0f, 1f, ESleekLerp.EXPONENTIAL, 20f);
 }
Exemplo n.º 12
0
 // Token: 0x06002170 RID: 8560 RVA: 0x000B6CB0 File Offset: 0x000B50B0
 public override void use()
 {
     PlayerBarricadeSignUI.open(base.objectAsset.interactabilityText);
     PlayerLifeUI.close();
     ObjectManager.useObjectQuest(base.transform);
     if (!Provider.isServer)
     {
         base.objectAsset.applyInteractabilityConditions(Player.player, false);
         base.objectAsset.grantInteractabilityRewards(Player.player, false);
     }
 }
Exemplo n.º 13
0
        public static void Disable()
        {
            bool flag  = !DrawUtilities.ShouldRun();
            bool flag2 = !flag;

            if (flag2)
            {
                OV_PlayerLifeUI.WasCompassEnabled = MiscOptions.Compass;
                MiscOptions.Compass = false;
                PlayerLifeUI.updateCompass();
            }
        }
Exemplo n.º 14
0
        public static void Disable()
        {
            if (!DrawUtilities.ShouldRun())
            {
                return;
            }

            WasCompassEnabled   = MiscOptions.Compass;
            MiscOptions.Compass = false;

            PlayerLifeUI.updateCompass();
        }
Exemplo n.º 15
0
 private void onClickedKickButton(SleekButton button)
 {
     if (this.context == SleekPlayer.ESleekPlayerDisplayContext.GROUP_ROSTER)
     {
         Player.player.quests.sendKickFromGroup(this.player.playerID.steamID);
     }
     else if (this.context == SleekPlayer.ESleekPlayerDisplayContext.PLAYER_LIST)
     {
         ChatManager.sendCallVote(this.player.playerID.steamID);
         PlayerDashboardUI.close();
         PlayerLifeUI.open();
     }
 }
Exemplo n.º 16
0
        void MiscPage()
        {
            GUI.Label(new Rect(415, 91, 100, 30), "<size=20>Misc:</size>");

            if (GUI.Button(new Rect(240, 153, 140, 30), "<size=13>No Rain</size>"))
            {
                LevelLighting.rainyness = ELightingRain.NONE;
            }
            if (GUI.Button(new Rect(240, 186, 140, 30), "<size=13>No Fog</size>"))
            {
                RenderSettings.fog = (!RenderSettings.fog);
            }
            if (GUI.Button(new Rect(240, 219, 140, 30), "<size=13>No Water</size>"))
            {
                if (Altitude == 0f)
                {
                    Altitude = LevelLighting.seaLevel;
                }

                LevelLighting.seaLevel = LevelLighting.seaLevel == 0f ? Altitude : 0f;
            }

            GUI.Label(new Rect(383, 120, 140, 35), $"<size=14>Night Vision: {Nv}</size>");
            if (GUI.Button(new Rect(383, 153, 140, 30), "<size=13>Military</size>"))
            {
                Nv = NvType.Military;

                LevelLighting.vision = ELightingVision.MILITARY;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUI.Button(new Rect(383, 186, 140, 30), "<size=13>Civilian</size>"))
            {
                Nv = NvType.Civilian;

                LevelLighting.vision = ELightingVision.CIVILIAN;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUI.Button(new Rect(383, 219, 140, 30), "<size=13>None</size>"))
            {
                Nv = NvType.None;

                LevelLighting.vision = ELightingVision.NONE;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
        }
Exemplo n.º 17
0
    // Start is called before the first frame update
    void Start()
    {
        int i = 1;

        foreach (var player in Players)
        {
            PlayerLifeUI life = Instantiate(PlayerLifeUIPrefab, ListOfPlayersLife.transform);
            PlayerLifeUIList.Add(player, life);
            life.Setup(player, i);
            ++i;
        }

        PlayerLifeUIPrefab.gameObject.SetActive(false);
    }
Exemplo n.º 18
0
        public override void use()
        {
            DialogueAsset dialogueAsset = Assets.find(EAssetType.NPC, this.npcAsset.dialogue) as DialogueAsset;

            if (dialogueAsset == null)
            {
                return;
            }
            ObjectManager.useObjectNPC(base.transform);
            Player.player.quests.checkNPC = this;
            PlayerLifeUI.close();
            PlayerLifeUI.npc       = this;
            this.isLookingAtPlayer = true;
            PlayerNPCDialogueUI.open(dialogueAsset, null);
        }
 // Token: 0x0600387E RID: 14462 RVA: 0x00198F38 File Offset: 0x00197338
 private static void onClickedInformationButton(SleekButton button)
 {
     PlayerDashboardInventoryUI.close();
     PlayerDashboardCraftingUI.close();
     PlayerDashboardSkillsUI.close();
     if (PlayerDashboardInformationUI.active)
     {
         PlayerDashboardUI.close();
         PlayerLifeUI.open();
     }
     else
     {
         PlayerDashboardInformationUI.open();
     }
 }
Exemplo n.º 20
0
 // Token: 0x06003974 RID: 14708 RVA: 0x001AA76C File Offset: 0x001A8B6C
 public override void dequip()
 {
     if (base.channel.isOwner)
     {
         if (this.bob != null)
         {
             UnityEngine.Object.Destroy(this.bob.gameObject);
         }
         if (this.castStrengthBox != null)
         {
             PlayerUI.container.remove(this.castStrengthBox);
         }
         if (this.isStrengthening)
         {
             PlayerLifeUI.open();
         }
     }
 }
 // Token: 0x0600213E RID: 8510 RVA: 0x000B544C File Offset: 0x000B384C
 public override void use()
 {
     if (Input.GetKey(ControlsSettings.other))
     {
         if (Player.player.equipment.useable is UseableClothing)
         {
             BarricadeManager.updateMannequin(base.transform, EMannequinUpdateMode.ADD);
         }
         else
         {
             BarricadeManager.updateMannequin(base.transform, EMannequinUpdateMode.REMOVE);
         }
     }
     else
     {
         PlayerBarricadeMannequinUI.open(this);
         PlayerLifeUI.close();
     }
 }
Exemplo n.º 22
0
        public void Update()
        {
            if (Injections.Overrides.PL.tmp_screen)
            {
                Information.beingScreened = true;
                if (dManager.highlights.Count > 0)
                {
                    foreach (HighlightType g in dManager.highlights)
                    {
                        if (g.h != null)
                        {
                            GameObject.Destroy(g.h);
                        }
                        dManager.highlights.Remove(g);
                    }
                }
                LevelLighting.vision = ELightingVision.NONE;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
                ComponentManager.hack_Weapons.hideSpread();

                Player.player.StartCoroutine("takeScreenshot");
                lastScreenshot = DateTime.Now;
                Injections.Overrides.PL.tmp_screen = false;
            }

            if (Information.beingScreened && !Injections.Overrides.PL.tmp_screen && ((DateTime.Now - lastScreenshot).TotalMilliseconds > 3000))
            {
                Information.beingScreened = false;
                string say = "";
                if (Injections.Overrides.PL.tmp_calls > 5)
                {
                    say = "Someone has used Observetory on you!";
                }
                else
                {
                    say = "Someone has used Spy on you!";
                }
                ChatManager.list(Provider.client, EChatMode.SAY, Color.magenta, say);
                Injections.Overrides.PL.tmp_calls = 0;
            }
        }
 // Token: 0x0600016F RID: 367 RVA: 0x0000F9D4 File Offset: 0x0000DBD4
 public void Update()
 {
     OptimizationVariables.MainCam = Camera.main;
     if (!DrawUtilities.ShouldRun())
     {
         return;
     }
     if (!MenuComponent.IsInMenu && !MiscOptions.PanicMode)
     {
         foreach (KeyValuePair <string, Hotkey> keyValuePair in HotkeyOptions.ChatKeys)
         {
             KeyCode[] keys = keyValuePair.Value.Keys;
             if (keys.Any(new Func <KeyCode, bool>(Input.GetKeyDown)) && keys.All(new Func <KeyCode, bool>(Input.GetKey)))
             {
                 ChatManager.sendChat(EChatMode.GLOBAL, keyValuePair.Key);
             }
         }
     }
     if (MiscComponent.fall != MiscOptions.SlowFall)
     {
         MiscComponent.fall = MiscOptions.SlowFall;
         Player.player.movement.pluginGravityMultiplier = (MiscComponent.fall ? 0f : 1f);
     }
     if (!MiscOptions.NightVision)
     {
         if (MiscOptions.WasNightVision)
         {
             LevelLighting.vision = ELightingVision.NONE;
             LevelLighting.updateLighting();
             PlayerLifeUI.updateGrayscale();
             MiscOptions.WasNightVision = false;
         }
         return;
     }
     LevelLighting.vision = ELightingVision.MILITARY;
     LevelLighting.updateLighting();
     PlayerLifeUI.updateGrayscale();
     MiscOptions.WasNightVision = true;
 }
Exemplo n.º 24
0
        public void OnGUI()
        {
            if (isOn && ctrl_Connector.isOn)
            {
                window_Main = GUILayout.Window(ctrl_Connector.id_Player, window_Main, onWindow, "Player Hack Menu");
            }

            if (Event.current.type == EventType.Repaint)
            {
                if (nightvision_military)
                {
                    LevelLighting.vision = ELightingVision.MILITARY;
                    LevelLighting.updateLighting();
                    LevelLighting.updateLocal();
                    PlayerLifeUI.updateGrayscale();
                    prev_night = true;
                }
                else if (nightvision_civilian)
                {
                    LevelLighting.vision = ELightingVision.CIVILIAN;
                    LevelLighting.updateLighting();
                    LevelLighting.updateLocal();
                    PlayerLifeUI.updateGrayscale();
                    prev_night = true;
                }
                else
                {
                    if (prev_night)
                    {
                        LevelLighting.vision = ELightingVision.NONE;
                        LevelLighting.updateLighting();
                        LevelLighting.updateLocal();
                        PlayerLifeUI.updateGrayscale();
                        prev_night = false;
                    }
                }
            }
        }
Exemplo n.º 25
0
 // Token: 0x060037CE RID: 14286 RVA: 0x0018B424 File Offset: 0x00189824
 private static void onClickedYesButton(SleekButton button)
 {
     if (PlayerBarricadeLibraryUI.library != null)
     {
         if (PlayerBarricadeLibraryUI.transactionButton.state == 0)
         {
             if (PlayerBarricadeLibraryUI.amountField.state > Player.player.skills.experience || PlayerBarricadeLibraryUI.net + PlayerBarricadeLibraryUI.library.amount > PlayerBarricadeLibraryUI.library.capacity)
             {
                 return;
             }
         }
         else if (PlayerBarricadeLibraryUI.net > PlayerBarricadeLibraryUI.library.amount)
         {
             return;
         }
         if (PlayerBarricadeLibraryUI.net > 0u)
         {
             BarricadeManager.transferLibrary(PlayerBarricadeLibraryUI.library.transform, (byte)PlayerBarricadeLibraryUI.transactionButton.state, PlayerBarricadeLibraryUI.amountField.state);
         }
     }
     PlayerLifeUI.open();
     PlayerBarricadeLibraryUI.close();
 }
Exemplo n.º 26
0
 public void OnGUI()
 {
     if (Information.beingScreened)
     {
         return;
     }
     if (Event.current.type == EventType.Repaint)
     {
         if (nightvision_military)
         {
             LevelLighting.vision = ELightingVision.MILITARY;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             prev_night = true;
         }
         else if (nightvision_civilian)
         {
             LevelLighting.vision = ELightingVision.CIVILIAN;
             LevelLighting.updateLighting();
             LevelLighting.updateLocal();
             PlayerLifeUI.updateGrayscale();
             prev_night = true;
         }
         else
         {
             if (prev_night)
             {
                 LevelLighting.vision = ELightingVision.NONE;
                 LevelLighting.updateLighting();
                 LevelLighting.updateLocal();
                 PlayerLifeUI.updateGrayscale();
                 prev_night = false;
             }
         }
     }
 }
Exemplo n.º 27
0
        public void OV_Update()
        {
            bool flag = !DrawUtilities.ShouldRun();

            if (!flag)
            {
                bool flag2 = OptimizationVariables.MainPlayer.stance.stance != EPlayerStance.DRIVING && OptimizationVariables.MainPlayer.stance.stance != EPlayerStance.SITTING && !OptimizationVariables.MainPlayer.life.isDead && !OptimizationVariables.MainPlayer.workzone.isBuilding;
                if (flag2)
                {
                    bool flag3 = Time.realtimeSinceStartup - OV_PlayerInteract.lastInteract > 0.1f;
                    if (flag3)
                    {
                        int  num   = 0;
                        bool flag4 = InteractionOptions.InteractThroughWalls && !PlayerCoroutines.IsSpying;
                        if (flag4)
                        {
                            bool flag5 = !InteractionOptions.NoHitBarricades;
                            if (flag5)
                            {
                                num |= RayMasks.BARRICADE;
                            }
                            bool flag6 = !InteractionOptions.NoHitItems;
                            if (flag6)
                            {
                                num |= RayMasks.ITEM;
                            }
                            bool flag7 = !InteractionOptions.NoHitResources;
                            if (flag7)
                            {
                                num |= RayMasks.RESOURCE;
                            }
                            bool flag8 = !InteractionOptions.NoHitStructures;
                            if (flag8)
                            {
                                num |= RayMasks.STRUCTURE;
                            }
                            bool flag9 = !InteractionOptions.NoHitVehicles;
                            if (flag9)
                            {
                                num |= RayMasks.VEHICLE;
                            }
                            bool flag10 = !InteractionOptions.NoHitEnvironment;
                            if (flag10)
                            {
                                num |= (RayMasks.LARGE | RayMasks.MEDIUM | RayMasks.ENVIRONMENT | RayMasks.GROUND);
                            }
                        }
                        else
                        {
                            num = RayMasks.PLAYER_INTERACT;
                        }
                        OV_PlayerInteract.lastInteract = Time.realtimeSinceStartup;
                        float num2 = (InteractionOptions.InteractThroughWalls && !PlayerCoroutines.IsSpying) ? 20f : 4f;
                        PhysicsUtility.raycast(new Ray(Camera.main.transform.position, Camera.main.transform.forward), out OV_PlayerInteract.hit, (OptimizationVariables.MainPlayer.look.perspective == EPlayerPerspective.THIRD) ? (num2 + 2f) : num2, num, QueryTriggerInteraction.UseGlobal);
                    }
                    Transform transform = (!(OV_PlayerInteract.hit.collider != null)) ? null : OV_PlayerInteract.hit.collider.transform;
                    bool      flag11    = transform != OV_PlayerInteract.focus;
                    if (flag11)
                    {
                        bool flag12 = OV_PlayerInteract.focus != null && PlayerInteract.interactable != null;
                        if (flag12)
                        {
                            InteractableDoorHinge componentInParent = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>();
                            bool flag13 = componentInParent != null;
                            if (flag13)
                            {
                                HighlighterTool.unhighlight(componentInParent.door.transform);
                            }
                            else
                            {
                                HighlighterTool.unhighlight(PlayerInteract.interactable.transform);
                            }
                        }
                        OV_PlayerInteract.focus         = null;
                        OV_PlayerInteract.target        = null;
                        OV_PlayerInteract.interactable  = null;
                        OV_PlayerInteract.interactable2 = null;
                        bool flag14 = transform != null;
                        if (flag14)
                        {
                            OV_PlayerInteract.focus         = transform;
                            OV_PlayerInteract.interactable  = OV_PlayerInteract.focus.GetComponentInParent <Interactable>();
                            OV_PlayerInteract.interactable2 = OV_PlayerInteract.focus.GetComponentInParent <Interactable2>();
                            bool flag15 = PlayerInteract.interactable != null;
                            if (flag15)
                            {
                                OV_PlayerInteract.target = PlayerInteract.interactable.transform.FindChildRecursive("Target");
                                bool flag16 = PlayerInteract.interactable.checkInteractable();
                                if (flag16)
                                {
                                    bool isEnabled = PlayerUI.window.isEnabled;
                                    if (isEnabled)
                                    {
                                        bool flag17 = PlayerInteract.interactable.checkUseable();
                                        if (flag17)
                                        {
                                            Color green;
                                            bool  flag18 = !PlayerInteract.interactable.checkHighlight(out green);
                                            if (flag18)
                                            {
                                                green = Color.green;
                                            }
                                            InteractableDoorHinge componentInParent2 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>();
                                            bool flag19 = componentInParent2 != null;
                                            if (flag19)
                                            {
                                                HighlighterTool.highlight(componentInParent2.door.transform, green);
                                            }
                                            else
                                            {
                                                HighlighterTool.highlight(PlayerInteract.interactable.transform, green);
                                            }
                                        }
                                        else
                                        {
                                            Color red = Color.red;
                                            InteractableDoorHinge componentInParent3 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>();
                                            bool flag20 = componentInParent3 != null;
                                            if (flag20)
                                            {
                                                HighlighterTool.highlight(componentInParent3.door.transform, red);
                                            }
                                            else
                                            {
                                                HighlighterTool.highlight(PlayerInteract.interactable.transform, red);
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    OV_PlayerInteract.target       = null;
                                    OV_PlayerInteract.interactable = null;
                                }
                            }
                        }
                    }
                }
                else
                {
                    bool flag21 = OV_PlayerInteract.focus != null && PlayerInteract.interactable != null;
                    if (flag21)
                    {
                        InteractableDoorHinge componentInParent4 = OV_PlayerInteract.focus.GetComponentInParent <InteractableDoorHinge>();
                        bool flag22 = componentInParent4 != null;
                        if (flag22)
                        {
                            HighlighterTool.unhighlight(componentInParent4.door.transform);
                        }
                        else
                        {
                            HighlighterTool.unhighlight(PlayerInteract.interactable.transform);
                        }
                    }
                    OV_PlayerInteract.focus         = null;
                    OV_PlayerInteract.target        = null;
                    OV_PlayerInteract.interactable  = null;
                    OV_PlayerInteract.interactable2 = null;
                }
                bool isDead = OptimizationVariables.MainPlayer.life.isDead;
                if (!isDead)
                {
                    bool flag23 = PlayerInteract.interactable != null;
                    if (flag23)
                    {
                        EPlayerMessage message;
                        string         text;
                        Color          color;
                        bool           flag24 = PlayerInteract.interactable.checkHint(out message, out text, out color) && !PlayerUI.window.showCursor;
                        if (flag24)
                        {
                            bool flag25 = PlayerInteract.interactable.CompareTag("Item");
                            if (flag25)
                            {
                                PlayerUI.hint((!(OV_PlayerInteract.target != null)) ? OV_PlayerInteract.focus : OV_PlayerInteract.target, message, text, color, new object[]
                                {
                                    ((InteractableItem)PlayerInteract.interactable).item,
                                    ((InteractableItem)PlayerInteract.interactable).asset
                                });
                            }
                            else
                            {
                                PlayerUI.hint((!(OV_PlayerInteract.target != null)) ? OV_PlayerInteract.focus : OV_PlayerInteract.target, message, text, color, new object[0]);
                            }
                        }
                    }
                    else
                    {
                        bool flag26 = OV_PlayerInteract.purchaseAsset != null && OptimizationVariables.MainPlayer.movement.purchaseNode != null && !PlayerUI.window.showCursor;
                        if (flag26)
                        {
                            PlayerUI.hint(null, EPlayerMessage.PURCHASE, string.Empty, Color.white, new object[]
                            {
                                OV_PlayerInteract.purchaseAsset.itemName,
                                OptimizationVariables.MainPlayer.movement.purchaseNode.cost
                            });
                        }
                        else
                        {
                            bool flag27 = OV_PlayerInteract.focus != null && OV_PlayerInteract.focus.CompareTag("Enemy");
                            if (flag27)
                            {
                                Player player = DamageTool.getPlayer(OV_PlayerInteract.focus);
                                bool   flag28 = player != null && player != Player.player && !PlayerUI.window.showCursor;
                                if (flag28)
                                {
                                    PlayerUI.hint(null, EPlayerMessage.ENEMY, string.Empty, Color.white, new object[]
                                    {
                                        player.channel.owner
                                    });
                                }
                            }
                        }
                    }
                    EPlayerMessage message2;
                    float          data;
                    bool           flag29 = PlayerInteract.interactable2 != null && PlayerInteract.interactable2.checkHint(out message2, out data) && !PlayerUI.window.showCursor;
                    if (flag29)
                    {
                        PlayerUI.hint2(EPlayerMessage.ENEMY, (!OV_PlayerInteract.isHoldingKey) ? 0f : ((Time.realtimeSinceStartup - OV_PlayerInteract.lastKeyDown) / this.salvageTime), 1f);
                    }
                    bool flag30 = (OptimizationVariables.MainPlayer.stance.stance == EPlayerStance.DRIVING || OptimizationVariables.MainPlayer.stance.stance == EPlayerStance.SITTING) && !Input.GetKey(KeyCode.LeftShift);
                    if (flag30)
                    {
                        bool keyDown = Input.GetKeyDown(KeyCode.F1);
                        if (keyDown)
                        {
                            this.hotkey(0);
                        }
                        bool keyDown2 = Input.GetKeyDown(KeyCode.F2);
                        if (keyDown2)
                        {
                            this.hotkey(1);
                        }
                        bool keyDown3 = Input.GetKeyDown(KeyCode.F3);
                        if (keyDown3)
                        {
                            this.hotkey(2);
                        }
                        bool keyDown4 = Input.GetKeyDown(KeyCode.F4);
                        if (keyDown4)
                        {
                            this.hotkey(3);
                        }
                        bool keyDown5 = Input.GetKeyDown(KeyCode.F5);
                        if (keyDown5)
                        {
                            this.hotkey(4);
                        }
                        bool keyDown6 = Input.GetKeyDown(KeyCode.F6);
                        if (keyDown6)
                        {
                            this.hotkey(5);
                        }
                        bool keyDown7 = Input.GetKeyDown(KeyCode.F7);
                        if (keyDown7)
                        {
                            this.hotkey(6);
                        }
                        bool keyDown8 = Input.GetKeyDown(KeyCode.F8);
                        if (keyDown8)
                        {
                            this.hotkey(7);
                        }
                        bool keyDown9 = Input.GetKeyDown(KeyCode.F9);
                        if (keyDown9)
                        {
                            this.hotkey(8);
                        }
                        bool keyDown10 = Input.GetKeyDown(KeyCode.F10);
                        if (keyDown10)
                        {
                            this.hotkey(9);
                        }
                    }
                    bool keyDown11 = Input.GetKeyDown(ControlsSettings.interact);
                    if (keyDown11)
                    {
                        OV_PlayerInteract.lastKeyDown  = Time.realtimeSinceStartup;
                        OV_PlayerInteract.isHoldingKey = true;
                    }
                    bool flag31 = Input.GetKeyDown(ControlsSettings.inspect) && ControlsSettings.inspect != ControlsSettings.interact && OptimizationVariables.MainPlayer.equipment.canInspect;
                    if (flag31)
                    {
                        OptimizationVariables.MainPlayer.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[0]);
                    }
                    bool flag32 = OV_PlayerInteract.isHoldingKey;
                    if (flag32)
                    {
                        bool keyUp = Input.GetKeyUp(ControlsSettings.interact);
                        if (keyUp)
                        {
                            OV_PlayerInteract.isHoldingKey = false;
                            bool showCursor = PlayerUI.window.showCursor;
                            if (showCursor)
                            {
                                bool flag33 = OptimizationVariables.MainPlayer.inventory.isStoring && OptimizationVariables.MainPlayer.inventory.shouldInteractCloseStorage;
                                if (flag33)
                                {
                                    PlayerDashboardUI.close();
                                    PlayerLifeUI.open();
                                }
                                else
                                {
                                    bool active = PlayerBarricadeSignUI.active;
                                    if (active)
                                    {
                                        PlayerBarricadeSignUI.close();
                                        PlayerLifeUI.open();
                                    }
                                    else
                                    {
                                        bool active2 = PlayerBarricadeStereoUI.active;
                                        if (active2)
                                        {
                                            PlayerBarricadeStereoUI.close();
                                            PlayerLifeUI.open();
                                        }
                                        else
                                        {
                                            bool active3 = PlayerBarricadeLibraryUI.active;
                                            if (active3)
                                            {
                                                PlayerBarricadeLibraryUI.close();
                                                PlayerLifeUI.open();
                                            }
                                            else
                                            {
                                                bool active4 = PlayerBarricadeMannequinUI.active;
                                                if (active4)
                                                {
                                                    PlayerBarricadeMannequinUI.close();
                                                    PlayerLifeUI.open();
                                                }
                                                else
                                                {
                                                    bool active5 = PlayerNPCDialogueUI.active;
                                                    if (active5)
                                                    {
                                                        bool dialogueAnimating = PlayerNPCDialogueUI.dialogueAnimating;
                                                        if (dialogueAnimating)
                                                        {
                                                            PlayerNPCDialogueUI.skipText();
                                                        }
                                                        else
                                                        {
                                                            bool dialogueHasNextPage = PlayerNPCDialogueUI.dialogueHasNextPage;
                                                            if (dialogueHasNextPage)
                                                            {
                                                                PlayerNPCDialogueUI.nextPage();
                                                            }
                                                            else
                                                            {
                                                                PlayerNPCDialogueUI.close();
                                                                PlayerLifeUI.open();
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        bool active6 = PlayerNPCQuestUI.active;
                                                        if (active6)
                                                        {
                                                            PlayerNPCQuestUI.closeNicely();
                                                        }
                                                        else
                                                        {
                                                            bool active7 = PlayerNPCVendorUI.active;
                                                            if (active7)
                                                            {
                                                                PlayerNPCVendorUI.closeNicely();
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            else
                            {
                                bool flag34 = OptimizationVariables.MainPlayer.stance.stance == EPlayerStance.DRIVING || OptimizationVariables.MainPlayer.stance.stance == EPlayerStance.SITTING;
                                if (flag34)
                                {
                                    VehicleManager.exitVehicle();
                                }
                                else
                                {
                                    bool flag35 = OV_PlayerInteract.focus != null && PlayerInteract.interactable != null;
                                    if (flag35)
                                    {
                                        bool flag36 = PlayerInteract.interactable.checkUseable();
                                        if (flag36)
                                        {
                                            PlayerInteract.interactable.use();
                                        }
                                    }
                                    else
                                    {
                                        bool flag37 = OV_PlayerInteract.purchaseAsset != null;
                                        if (flag37)
                                        {
                                            bool flag38 = OptimizationVariables.MainPlayer.skills.experience >= OptimizationVariables.MainPlayer.movement.purchaseNode.cost;
                                            if (flag38)
                                            {
                                                OptimizationVariables.MainPlayer.skills.sendPurchase(OptimizationVariables.MainPlayer.movement.purchaseNode);
                                            }
                                        }
                                        else
                                        {
                                            bool flag39 = ControlsSettings.inspect == ControlsSettings.interact && OptimizationVariables.MainPlayer.equipment.canInspect;
                                            if (flag39)
                                            {
                                                OptimizationVariables.MainPlayer.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[0]);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            bool flag40 = Time.realtimeSinceStartup - OV_PlayerInteract.lastKeyDown > this.salvageTime;
                            if (flag40)
                            {
                                OV_PlayerInteract.isHoldingKey = false;
                                bool flag41 = !PlayerUI.window.showCursor && PlayerInteract.interactable2 != null;
                                if (flag41)
                                {
                                    PlayerInteract.interactable2.use();
                                }
                            }
                        }
                    }
                }
            }
        }
 // Token: 0x060021F1 RID: 8689 RVA: 0x000BB67E File Offset: 0x000B9A7E
 public override void use()
 {
     PlayerBarricadeStereoUI.open(this);
     PlayerLifeUI.close();
 }
Exemplo n.º 29
0
        // Token: 0x06000011 RID: 17 RVA: 0x00002CB4 File Offset: 0x00000EB4
        private void OnGUI()
        {
            if (Menu.MenuOpened != 1)
            {
                return;
            }
            GUI.skin = Menu.Skin;
            GUILayout.BeginArea(new Rect((float)(UnityEngine.Screen.width / 2 - 250), (float)(UnityEngine.Screen.height / 2 - 250), 700f, 700f), "Hake", GUI.skin.GetStyle("window"));
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            MainMenu.NoRecoil = GUILayout.Toggle(MainMenu.NoRecoil, "No recoil", new GUILayoutOption[0]);
            MainMenu.NoShake  = GUILayout.Toggle(MainMenu.NoShake, "No shake", new GUILayoutOption[0]);
            MainMenu.NoSpread = GUILayout.Toggle(MainMenu.NoSpread, "No spread", new GUILayoutOption[0]);
            this._zoom        = GUILayout.Toggle(this._zoom, "Enable FOV", new GUILayoutOption[0]);
            GUILayout.Space(50f);
            MainMenu.Aimbot_Enable  = GUILayout.Toggle(MainMenu.Aimbot_Enable, "Enable Aimbot", new GUILayoutOption[0]);
            MainMenu.Aimbot_Players = GUILayout.Toggle(MainMenu.Aimbot_Players, "At Players", new GUILayoutOption[0]);
            MainMenu.Aimbot_Zombies = GUILayout.Toggle(MainMenu.Aimbot_Zombies, "At Zombies", new GUILayoutOption[0]);
            MainMenu.Aimbot_Animals = GUILayout.Toggle(MainMenu.Aimbot_Animals, "At Animals", new GUILayoutOption[0]);

            GUILayout.Label(MainMenu.WebText, new GUILayoutOption[0]);
            GUILayout.Label("Unturned Hake", new GUILayoutOption[0]);
            GUILayout.EndVertical();
            GUILayout.BeginVertical(new GUILayoutOption[0]);

            if (GUILayout.Button("Ballistic Force off", new GUILayoutOption[0]))
            {
                DisableBallistic();
            }
            if (GUILayout.Button("Set day", new GUILayoutOption[0]))
            {
                LightingManager.time = (uint)(LightingManager.cycle * LevelLighting.transition);
            }
            if (GUILayout.Button("Night vision: " + this._nightVision, new GUILayoutOption[0]))
            {
                this._nightVision++;
                if (this._nightVision > 3)
                {
                    this._nightVision = 0;
                }
                LevelLighting.vision = (ELightingVision)this._nightVision;
                LevelLighting.updateLighting();
                LevelLighting.updateLocal();
                PlayerLifeUI.updateGrayscale();
            }
            if (GUILayout.Button("No Respawn Timer", new GUILayoutOption[0]))
            {
                this.DisableTimers();
            }
            if (GUILayout.Button("No Fog" + Menu.GetToggleText(RenderSettings.fog), new GUILayoutOption[0]))
            {
                RenderSettings.fog = !RenderSettings.fog;
            }
            if (GUILayout.Button("No Rain", new GUILayoutOption[0]))
            {
                LevelLighting.rainyness = 0;
            }
            if (GUILayout.Button("Kill All Zombies", new GUILayoutOption[0]))
            {
                foreach (Zombie zombie in FindObjectsOfType <Zombie>())
                {
                    ZombieManager.sendZombieDead(zombie, new Vector3(0, 0, 0));
                }
            }

            GUILayout.Space(50f);


            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
            GUILayout.EndArea();

            GUILayout.BeginArea(new Rect((float)((UnityEngine.Screen.width / 2 - 250) + 720), (float)(UnityEngine.Screen.height / 2 - 250), 200f, 800f), "Friend Menu", GUI.skin.GetStyle("window"));
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[0]);

            GUILayout.Label(FriendList, new GUILayoutOption[0]);
            if (GUILayout.Button("Refresh Friends List", new GUILayoutOption[0]))
            {
                CreateFriendButtons();
            }
            GUILayout.EndVertical();

            GUILayout.EndHorizontal();
            GUILayout.EndArea();
        }
 // Token: 0x060037D9 RID: 14297 RVA: 0x0018BD3F File Offset: 0x0018A13F
 private static void onClickedCancelButton(SleekButton button)
 {
     PlayerLifeUI.open();
     PlayerBarricadeMannequinUI.close();
 }