// Token: 0x060038CA RID: 14538 RVA: 0x0019F658 File Offset: 0x0019DA58 private static void updatePage() { PlayerNPCDialogueUI.messageLabel.text = string.Empty; PlayerNPCDialogueUI.pageLabel.isVisible = false; PlayerNPCDialogueUI.dialogueTime = 0f; PlayerNPCDialogueUI.dialoguePause = 0f; PlayerNPCDialogueUI.dialogueBuilder.Length = 0; PlayerNPCDialogueUI.dialogueAppend = string.Empty; PlayerNPCDialogueUI.dialogueIndex = 0; PlayerNPCDialogueUI.dialogueOffset = 0; PlayerNPCDialogueUI.responseTime = 0f; PlayerNPCDialogueUI.responseIndex = 0; PlayerNPCDialogueUI.dialogueAnimating = true; PlayerNPCDialogueUI.dialogueHasNextPage = false; if (PlayerNPCDialogueUI.message != null && PlayerNPCDialogueUI.message.pages != null && (int)PlayerNPCDialogueUI.dialoguePage < PlayerNPCDialogueUI.message.pages.Length) { PlayerNPCDialogueUI.dialogueText = PlayerNPCDialogueUI.message.pages[(int)PlayerNPCDialogueUI.dialoguePage].text; PlayerNPCDialogueUI.dialogueText = PlayerNPCDialogueUI.dialogueText.Replace("<br>", "\n"); PlayerNPCDialogueUI.dialogueText = PlayerNPCDialogueUI.dialogueText.Replace("<name_npc>", (!(PlayerLifeUI.npc != null)) ? "?" : PlayerLifeUI.npc.npcAsset.npcName); PlayerNPCDialogueUI.dialogueText = PlayerNPCDialogueUI.dialogueText.Replace("<name_char>", Player.player.channel.owner.playerID.characterName); } else { PlayerNPCDialogueUI.dialogueText = "?"; } PlayerNPCDialogueUI.dialogueCharacters = PlayerNPCDialogueUI.dialogueText.ToCharArray(); if (OptionsSettings.talk) { PlayerNPCDialogueUI.skipText(); } }
// 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(); } } } }
// Token: 0x060038CF RID: 14543 RVA: 0x0019F9C0 File Offset: 0x0019DDC0 public static void skipText() { PlayerNPCDialogueUI.messageLabel.text = PlayerNPCDialogueUI.dialogueText.Replace("<pause>", string.Empty); PlayerNPCDialogueUI.responseIndex = PlayerNPCDialogueUI.responses.Count; for (int i = 0; i < PlayerNPCDialogueUI.responses.Count; i++) { PlayerNPCDialogueUI.responseBox.children[i].isVisible = true; } PlayerNPCDialogueUI.responseBox.area = new Rect(0f, 0f, 5f, (float)(PlayerNPCDialogueUI.responses.Count * 30)); PlayerNPCDialogueUI.finishPage(); }
// Token: 0x060038CD RID: 14541 RVA: 0x0019F872 File Offset: 0x0019DC72 public static void nextPage() { if ((int)PlayerNPCDialogueUI.dialoguePage == PlayerNPCDialogueUI.message.pages.Length - 1) { PlayerNPCDialogueUI.updateDialogue(PlayerNPCDialogueUI.prevDialogue, null); } else { PlayerNPCDialogueUI.dialoguePage += 1; PlayerNPCDialogueUI.updatePage(); } }
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: 0x060038C7 RID: 14535 RVA: 0x0019F15C File Offset: 0x0019D55C public static void open(DialogueAsset newDialogue, DialogueAsset newPrevDialogue) { if (PlayerNPCDialogueUI.active) { return; } PlayerNPCDialogueUI.active = true; if (PlayerLifeUI.npc != null && PlayerLifeUI.npc.npcAsset != null) { PlayerNPCDialogueUI.characterLabel.text = PlayerLifeUI.npc.npcAsset.npcName; } else { PlayerNPCDialogueUI.characterLabel.text = "?"; } PlayerNPCDialogueUI.updateDialogue(newDialogue, newPrevDialogue); PlayerNPCDialogueUI.container.lerpPositionScale(0f, 0f, ESleekLerp.EXPONENTIAL, 20f); }
// Token: 0x060038D7 RID: 14551 RVA: 0x001A0808 File Offset: 0x0019EC08 public static void closeNicely() { PlayerNPCQuestUI.close(); if (PlayerNPCQuestUI.mode == EQuestViewMode.BEGIN) { PlayerNPCDialogueUI.open(PlayerNPCQuestUI.declineDialogue, null); } else if (PlayerNPCQuestUI.mode == EQuestViewMode.END) { PlayerNPCDialogueUI.registerResponse(PlayerNPCQuestUI.declineDialogue, PlayerNPCQuestUI.response); PlayerNPCDialogueUI.open(PlayerNPCQuestUI.acceptDialogue, PlayerNPCQuestUI.declineDialogue); } else if (PlayerNPCQuestUI.mode == EQuestViewMode.DETAILS) { PlayerDashboardInventoryUI.active = false; PlayerDashboardCraftingUI.active = false; PlayerDashboardSkillsUI.active = false; PlayerDashboardInformationUI.active = true; PlayerDashboardUI.open(); } }
// Token: 0x060038D0 RID: 14544 RVA: 0x0019FA5C File Offset: 0x0019DE5C public static void updateText() { if (PlayerNPCDialogueUI.dialogue == null) { return; } if (PlayerNPCDialogueUI.dialogueAnimating) { if (PlayerNPCDialogueUI.dialoguePause > 0f) { PlayerNPCDialogueUI.dialoguePause -= Time.deltaTime; } else { PlayerNPCDialogueUI.dialogueTime += Time.deltaTime; } int num = Mathf.Min(PlayerNPCDialogueUI.dialogueCharacters.Length, Mathf.CeilToInt(PlayerNPCDialogueUI.dialogueTime * 30f) + PlayerNPCDialogueUI.dialogueOffset); if (PlayerNPCDialogueUI.dialogueIndex != num) { while (PlayerNPCDialogueUI.dialogueIndex < PlayerNPCDialogueUI.dialogueCharacters.Length && PlayerNPCDialogueUI.dialogueIndex < num) { char c = PlayerNPCDialogueUI.dialogueCharacters[PlayerNPCDialogueUI.dialogueIndex]; if (c == '<') { int num2; int num3; if (PlayerNPCDialogueUI.dialogueAppend.Length > 0) { num += PlayerNPCDialogueUI.dialogueAppend.Length; PlayerNPCDialogueUI.dialogueIndex += PlayerNPCDialogueUI.dialogueAppend.Length; PlayerNPCDialogueUI.dialogueOffset += PlayerNPCDialogueUI.dialogueAppend.Length; PlayerNPCDialogueUI.dialogueBuilder.Append(PlayerNPCDialogueUI.dialogueAppend); PlayerNPCDialogueUI.dialogueAppend = string.Empty; } else if (PlayerNPCDialogueUI.findKeyword(PlayerNPCDialogueUI.dialogueCharacters, PlayerNPCDialogueUI.dialogueIndex, PlayerNPCDialogueUI.KEYWORD_PAUSE)) { PlayerNPCDialogueUI.dialoguePause += 0.5f; num = PlayerNPCDialogueUI.dialogueIndex + PlayerNPCDialogueUI.KEYWORD_PAUSE.Length; PlayerNPCDialogueUI.dialogueIndex = num; PlayerNPCDialogueUI.dialogueOffset += PlayerNPCDialogueUI.KEYWORD_PAUSE.Length - 1; } else if (PlayerNPCDialogueUI.findTags(PlayerNPCDialogueUI.dialogueCharacters, PlayerNPCDialogueUI.dialogueIndex, out num2, out num3)) { int num4 = num3 - num2 + 1; num += num4; PlayerNPCDialogueUI.dialogueIndex += num4; PlayerNPCDialogueUI.dialogueOffset += num4; PlayerNPCDialogueUI.dialogueBuilder.Append(PlayerNPCDialogueUI.dialogueText.Substring(num2, num4)); if (PlayerNPCDialogueUI.findTags(PlayerNPCDialogueUI.dialogueCharacters, num3 + 1, out num2, out num3)) { num4 = num3 - num2 + 1; PlayerNPCDialogueUI.dialogueAppend = PlayerNPCDialogueUI.dialogueText.Substring(num2, num4); } } } else { PlayerNPCDialogueUI.dialogueBuilder.Append(c); PlayerNPCDialogueUI.dialogueIndex++; } } PlayerNPCDialogueUI.messageLabel.text = PlayerNPCDialogueUI.dialogueBuilder.ToString() + PlayerNPCDialogueUI.dialogueAppend; if (PlayerNPCDialogueUI.dialogueIndex == PlayerNPCDialogueUI.dialogueCharacters.Length) { PlayerNPCDialogueUI.finishPage(); } } } else { PlayerNPCDialogueUI.responseTime += Time.deltaTime; int num5 = Mathf.Min(PlayerNPCDialogueUI.responses.Count, Mathf.FloorToInt(PlayerNPCDialogueUI.responseTime * 10f)); if (PlayerNPCDialogueUI.responseIndex != num5) { while (PlayerNPCDialogueUI.responseIndex < num5) { PlayerNPCDialogueUI.responseBox.children[PlayerNPCDialogueUI.responseIndex].isVisible = true; PlayerNPCDialogueUI.responseBox.area = new Rect(0f, 0f, 5f, (float)(num5 * 30)); PlayerNPCDialogueUI.responseIndex++; } } } }
// Token: 0x060038C9 RID: 14537 RVA: 0x0019F214 File Offset: 0x0019D614 private static void updateDialogue(DialogueAsset newDialogue, DialogueAsset newPrevDialogue) { PlayerNPCDialogueUI.dialogue = newDialogue; PlayerNPCDialogueUI.prevDialogue = newPrevDialogue; if (PlayerNPCDialogueUI.dialogue == null) { return; } PlayerNPCDialogueUI.responseBox.isVisible = false; int availableMessage = PlayerNPCDialogueUI.dialogue.getAvailableMessage(Player.player); if (availableMessage == -1) { return; } PlayerNPCDialogueUI.message = PlayerNPCDialogueUI.dialogue.messages[availableMessage]; if ((PlayerNPCDialogueUI.message.conditions != null && PlayerNPCDialogueUI.message.conditions.Length > 0) || (PlayerNPCDialogueUI.message.rewards != null && PlayerNPCDialogueUI.message.rewards.Length > 0)) { Player.player.quests.sendRegisterMessage(PlayerNPCDialogueUI.dialogue.id); if (!Provider.isServer) { Player.player.quests.registerMessage(PlayerNPCDialogueUI.dialogue.id); } } PlayerNPCDialogueUI.responses.Clear(); if (PlayerNPCDialogueUI.message.responses != null && PlayerNPCDialogueUI.message.responses.Length > 0) { for (int i = 0; i < PlayerNPCDialogueUI.message.responses.Length; i++) { DialogueResponse dialogueResponse = PlayerNPCDialogueUI.dialogue.responses[(int)PlayerNPCDialogueUI.message.responses[i]]; if (dialogueResponse.areConditionsMet(Player.player)) { PlayerNPCDialogueUI.responses.Add(dialogueResponse); } } } else { int j = 0; while (j < PlayerNPCDialogueUI.dialogue.responses.Length) { DialogueResponse dialogueResponse2 = PlayerNPCDialogueUI.dialogue.responses[j]; if (dialogueResponse2.messages == null || dialogueResponse2.messages.Length <= 0) { goto IL_1BE; } bool flag = false; for (int k = 0; k < dialogueResponse2.messages.Length; k++) { if ((int)dialogueResponse2.messages[k] == availableMessage) { flag = true; break; } } if (flag) { goto IL_1BE; } IL_1DB: j++; continue; IL_1BE: if (dialogueResponse2.areConditionsMet(Player.player)) { PlayerNPCDialogueUI.responses.Add(dialogueResponse2); goto IL_1DB; } goto IL_1DB; } } if (PlayerNPCDialogueUI.message.prev != 0) { PlayerNPCDialogueUI.prevDialogue = (Assets.find(EAssetType.NPC, PlayerNPCDialogueUI.message.prev) as DialogueAsset); } if (PlayerNPCDialogueUI.responses.Count == 0) { if (PlayerNPCDialogueUI.prevDialogue == null) { PlayerNPCDialogueUI.responses.Add(new DialogueResponse(0, null, 0, 0, 0, PlayerNPCDialogueUI.localization.format("Goodbye"), null, null)); } } else { PlayerNPCDialogueUI.prevDialogue = null; } PlayerNPCDialogueUI.responseBox.remove(); for (int l = 0; l < PlayerNPCDialogueUI.responses.Count; l++) { DialogueResponse dialogueResponse3 = PlayerNPCDialogueUI.responses[l]; string text = dialogueResponse3.text; text = text.Replace("<name_npc>", (!(PlayerLifeUI.npc != null)) ? "?" : PlayerLifeUI.npc.npcAsset.npcName); text = text.Replace("<name_char>", Player.player.channel.owner.playerID.characterName); Texture2D newIcon = null; if (dialogueResponse3.quest != 0) { if (Player.player.quests.getQuestStatus(dialogueResponse3.quest) == ENPCQuestStatus.READY) { newIcon = (Texture2D)PlayerNPCDialogueUI.icons.load("Quest_End"); } else { newIcon = (Texture2D)PlayerNPCDialogueUI.icons.load("Quest_Begin"); } } else if (dialogueResponse3.vendor != 0) { newIcon = (Texture2D)PlayerNPCDialogueUI.icons.load("Vendor"); } SleekButtonIcon sleekButtonIcon = new SleekButtonIcon(newIcon); sleekButtonIcon.positionOffset_Y = l * 30; sleekButtonIcon.sizeOffset_X = -30; sleekButtonIcon.sizeOffset_Y = 30; sleekButtonIcon.sizeScale_X = 1f; sleekButtonIcon.foregroundTint = ESleekTint.NONE; sleekButtonIcon.isRich = true; sleekButtonIcon.text = text; SleekButton sleekButton = sleekButtonIcon; if (PlayerNPCDialogueUI.< > f__mg$cache0 == null) { PlayerNPCDialogueUI.< > f__mg$cache0 = new ClickedButton(PlayerNPCDialogueUI.onClickedResponseButton); } sleekButton.onClickedButton = PlayerNPCDialogueUI.< > f__mg$cache0; PlayerNPCDialogueUI.responseBox.add(sleekButtonIcon); sleekButtonIcon.isVisible = false; } PlayerNPCDialogueUI.responseBox.area = new Rect(0f, 0f, 5f, 0f); PlayerNPCDialogueUI.dialoguePage = 0; PlayerNPCDialogueUI.updatePage(); }
// Token: 0x060038E7 RID: 14567 RVA: 0x001A17AA File Offset: 0x0019FBAA private static void onClickedReturnButton(SleekButton button) { PlayerNPCVendorUI.close(); PlayerNPCDialogueUI.registerResponse(PlayerNPCVendorUI.dialogue, PlayerNPCVendorUI.response); PlayerNPCDialogueUI.open(PlayerNPCVendorUI.dialogue, PlayerNPCVendorUI.prevDialogue); }
// Token: 0x060038E2 RID: 14562 RVA: 0x001A1384 File Offset: 0x0019F784 public static void closeNicely() { PlayerNPCVendorUI.close(); PlayerNPCDialogueUI.open(PlayerNPCVendorUI.prevDialogue, null); }
// Token: 0x060038DB RID: 14555 RVA: 0x001A0CCE File Offset: 0x0019F0CE private static void onClickedContinueButton(SleekButton button) { PlayerNPCQuestUI.close(); PlayerNPCDialogueUI.registerResponse(PlayerNPCQuestUI.declineDialogue, PlayerNPCQuestUI.response); PlayerNPCDialogueUI.open(PlayerNPCQuestUI.acceptDialogue, PlayerNPCQuestUI.declineDialogue); }
// Token: 0x060038DA RID: 14554 RVA: 0x001A0CBC File Offset: 0x0019F0BC private static void onClickedDeclineButton(SleekButton button) { PlayerNPCQuestUI.close(); PlayerNPCDialogueUI.open(PlayerNPCQuestUI.declineDialogue, null); }
// Token: 0x06002C0E RID: 11278 RVA: 0x00117EA4 File Offset: 0x001162A4 private void Update() { if (base.channel.isOwner) { if (base.player.stance.stance != EPlayerStance.DRIVING && base.player.stance.stance != EPlayerStance.SITTING && !base.player.life.isDead && !base.player.workzone.isBuilding) { if (Time.realtimeSinceStartup - PlayerInteract.lastInteract > 0.1f) { PlayerInteract.lastInteract = Time.realtimeSinceStartup; if (base.player.look.isCam) { PhysicsUtility.raycast(new Ray(base.player.look.aim.position, base.player.look.aim.forward), out PlayerInteract.hit, 4f, RayMasks.PLAYER_INTERACT, QueryTriggerInteraction.UseGlobal); } else { PhysicsUtility.raycast(new Ray(MainCamera.instance.transform.position, MainCamera.instance.transform.forward), out PlayerInteract.hit, (float)((base.player.look.perspective != EPlayerPerspective.THIRD) ? 4 : 6), RayMasks.PLAYER_INTERACT, QueryTriggerInteraction.UseGlobal); } } if (PlayerInteract.hit.transform != PlayerInteract.focus) { if (PlayerInteract.focus != null && PlayerInteract.interactable != null) { InteractableDoorHinge component = PlayerInteract.focus.GetComponent <InteractableDoorHinge>(); if (component != null) { HighlighterTool.unhighlight(PlayerInteract.focus.parent.parent); } else { HighlighterTool.unhighlight(PlayerInteract.focus); } } PlayerInteract.focus = null; PlayerInteract.target = null; PlayerInteract._interactable = null; PlayerInteract._interactable2 = null; if (PlayerInteract.hit.transform != null) { PlayerInteract.focus = PlayerInteract.hit.transform; PlayerInteract._interactable = PlayerInteract.focus.GetComponent <Interactable>(); PlayerInteract._interactable2 = PlayerInteract.focus.GetComponent <Interactable2>(); if (PlayerInteract.interactable != null) { PlayerInteract.target = PlayerInteract.focus.FindChildRecursive("Target"); if (PlayerInteract.interactable.checkInteractable()) { if (PlayerUI.window.isEnabled) { if (PlayerInteract.interactable.checkUseable()) { Color color; if (!PlayerInteract.interactable.checkHighlight(out color)) { color = Color.green; } InteractableDoorHinge component2 = PlayerInteract.focus.GetComponent <InteractableDoorHinge>(); if (component2 != null) { HighlighterTool.highlight(PlayerInteract.focus.parent.parent, color); } else { HighlighterTool.highlight(PlayerInteract.focus, color); } } else { Color color = Color.red; InteractableDoorHinge component3 = PlayerInteract.focus.GetComponent <InteractableDoorHinge>(); if (component3 != null) { HighlighterTool.highlight(PlayerInteract.focus.parent.parent, color); } else { HighlighterTool.highlight(PlayerInteract.focus, color); } } } } else { PlayerInteract.target = null; PlayerInteract._interactable = null; } } } } } else { if (PlayerInteract.focus != null && PlayerInteract.interactable != null) { InteractableDoorHinge component4 = PlayerInteract.focus.GetComponent <InteractableDoorHinge>(); if (component4 != null) { HighlighterTool.unhighlight(PlayerInteract.focus.parent.parent); } else { HighlighterTool.unhighlight(PlayerInteract.focus); } } PlayerInteract.focus = null; PlayerInteract.target = null; PlayerInteract._interactable = null; PlayerInteract._interactable2 = null; } } if (base.channel.isOwner && !base.player.life.isDead) { if (PlayerInteract.interactable != null) { EPlayerMessage message; string text; Color color2; if (PlayerInteract.interactable.checkHint(out message, out text, out color2) && !PlayerUI.window.showCursor) { if (PlayerInteract.interactable.CompareTag("Item")) { PlayerUI.hint((!(PlayerInteract.target != null)) ? PlayerInteract.focus : PlayerInteract.target, message, text, color2, new object[] { ((InteractableItem)PlayerInteract.interactable).item, ((InteractableItem)PlayerInteract.interactable).asset }); } else { PlayerUI.hint((!(PlayerInteract.target != null)) ? PlayerInteract.focus : PlayerInteract.target, message, text, color2, new object[0]); } } } else if (PlayerInteract.purchaseAsset != null && base.player.movement.purchaseNode != null && !PlayerUI.window.showCursor) { PlayerUI.hint(null, EPlayerMessage.PURCHASE, string.Empty, Color.white, new object[] { PlayerInteract.purchaseAsset.itemName, base.player.movement.purchaseNode.cost }); } else if (PlayerInteract.focus != null && PlayerInteract.focus.CompareTag("Enemy")) { Player player = DamageTool.getPlayer(PlayerInteract.focus); if (player != null && player != Player.player && !PlayerUI.window.showCursor) { PlayerUI.hint(null, EPlayerMessage.ENEMY, string.Empty, Color.white, new object[] { player.channel.owner }); } } EPlayerMessage message2; float data; if (PlayerInteract.interactable2 != null && PlayerInteract.interactable2.checkHint(out message2, out data) && !PlayerUI.window.showCursor) { PlayerUI.hint2(message2, (!PlayerInteract.isHoldingKey) ? 0f : ((Time.realtimeSinceStartup - PlayerInteract.lastKeyDown) / this.salvageTime), data); } if ((base.player.stance.stance == EPlayerStance.DRIVING || base.player.stance.stance == EPlayerStance.SITTING) && !Input.GetKey(KeyCode.LeftShift)) { if (Input.GetKeyDown(KeyCode.F1)) { this.hotkey(0); } if (Input.GetKeyDown(KeyCode.F2)) { this.hotkey(1); } if (Input.GetKeyDown(KeyCode.F3)) { this.hotkey(2); } if (Input.GetKeyDown(KeyCode.F4)) { this.hotkey(3); } if (Input.GetKeyDown(KeyCode.F5)) { this.hotkey(4); } if (Input.GetKeyDown(KeyCode.F6)) { this.hotkey(5); } if (Input.GetKeyDown(KeyCode.F7)) { this.hotkey(6); } if (Input.GetKeyDown(KeyCode.F8)) { this.hotkey(7); } if (Input.GetKeyDown(KeyCode.F9)) { this.hotkey(8); } if (Input.GetKeyDown(KeyCode.F10)) { this.hotkey(9); } } if (Input.GetKeyDown(ControlsSettings.interact)) { PlayerInteract.lastKeyDown = Time.realtimeSinceStartup; PlayerInteract.isHoldingKey = true; } if (Input.GetKeyDown(ControlsSettings.inspect) && ControlsSettings.inspect != ControlsSettings.interact && base.player.equipment.canInspect) { base.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[0]); } if (PlayerInteract.isHoldingKey) { if (Input.GetKeyUp(ControlsSettings.interact)) { PlayerInteract.isHoldingKey = false; if (PlayerUI.window.showCursor) { if (base.player.inventory.isStoring && base.player.inventory.shouldInteractCloseStorage) { PlayerDashboardUI.close(); PlayerLifeUI.open(); } else if (PlayerBarricadeSignUI.active) { PlayerBarricadeSignUI.close(); PlayerLifeUI.open(); } else if (PlayerBarricadeStereoUI.active) { PlayerBarricadeStereoUI.close(); PlayerLifeUI.open(); } else if (PlayerBarricadeLibraryUI.active) { PlayerBarricadeLibraryUI.close(); PlayerLifeUI.open(); } else if (PlayerBarricadeMannequinUI.active) { PlayerBarricadeMannequinUI.close(); PlayerLifeUI.open(); } else if (PlayerNPCDialogueUI.active) { if (PlayerNPCDialogueUI.dialogueAnimating) { PlayerNPCDialogueUI.skipText(); } else if (PlayerNPCDialogueUI.dialogueHasNextPage) { PlayerNPCDialogueUI.nextPage(); } else { PlayerNPCDialogueUI.close(); PlayerLifeUI.open(); } } else if (PlayerNPCQuestUI.active) { PlayerNPCQuestUI.closeNicely(); } else if (PlayerNPCVendorUI.active) { PlayerNPCVendorUI.closeNicely(); } } else if (base.player.stance.stance == EPlayerStance.DRIVING || base.player.stance.stance == EPlayerStance.SITTING) { VehicleManager.exitVehicle(); } else if (PlayerInteract.focus != null && PlayerInteract.interactable != null) { if (PlayerInteract.interactable.checkUseable()) { PlayerInteract.interactable.use(); } } else if (PlayerInteract.purchaseAsset != null) { if (base.player.skills.experience >= base.player.movement.purchaseNode.cost) { base.player.skills.sendPurchase(base.player.movement.purchaseNode); } } else if (ControlsSettings.inspect == ControlsSettings.interact && base.player.equipment.canInspect) { base.channel.send("askInspect", ESteamCall.SERVER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[0]); } } else if (Time.realtimeSinceStartup - PlayerInteract.lastKeyDown > this.salvageTime) { PlayerInteract.isHoldingKey = false; if (!PlayerUI.window.showCursor && PlayerInteract.interactable2 != null) { PlayerInteract.interactable2.use(); } } } } }