// Token: 0x060020B8 RID: 8376 RVA: 0x000C12CC File Offset: 0x000BF4CC private void UpdateQuickSlots() { if (this.m_character != null && this.m_character.QuickSlotMngr != null) { int playerID = this.m_character.OwnerPlayerSys.PlayerID; if (!this.m_character.CharacterUI.IsMenuFocused) { this.m_character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID); this.m_character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID); } if (ControlsInput.QuickSlotInstant1(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(0); } else if (ControlsInput.QuickSlotInstant2(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(1); } else if (ControlsInput.QuickSlotInstant3(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(2); } else if (ControlsInput.QuickSlotInstant4(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(3); } else if (ControlsInput.QuickSlotInstant5(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(4); } else if (ControlsInput.QuickSlotInstant6(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(5); } else if (ControlsInput.QuickSlotInstant7(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(6); } else if (ControlsInput.QuickSlotInstant8(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(7); } else { // Loop through the 8 new slots for (var x = 0; x < 8; ++x) { // See if the action for the slot is pressed if (ControlsInput.QuickSlotInstantX(playerID, x + 12)) { // If so, trigger the quick slot. // The index of the slot is 1 less than it's id, as you can see above. this.m_character.QuickSlotMngr.QuickSlotInput(x + 11); break; } } } } }
static private void TryOverrideVanillaQuickslotInput(ref bool input, int playerID) { #region quit if (!_extraGamepadQuickslots) { return; } #endregion input &= !ControlsInput.QuickSlotToggle1(playerID) && !ControlsInput.QuickSlotToggle2(playerID); }
static private void TryHandleCustomQuickslotInput(Character character) { #region quit if (!_extraGamepadQuickslots) { return; } #endregion if (character == null || character.QuickSlotMngr == null || character.CharacterUI.IsMenuFocused) { return; } int playerID = character.OwnerPlayerSys.PlayerID; if (!ControlsInput.QuickSlotToggle1(playerID) && !ControlsInput.QuickSlotToggle2(playerID)) { return; } int quickslotID = -1; if (GameInput.Pressed(playerID, ControlsInput.GameplayActions.Sheathe)) { quickslotID = 8; } else if (GameInput.Pressed(playerID, ControlsInput.MenuActions.ToggleMapMenu)) { quickslotID = 9; } else if (GameInput.Pressed(playerID, ControlsInput.GameplayActions.ToggleLights)) { quickslotID = 10; } else if (GameInput.Pressed(playerID, ControlsInput.GameplayActions.HandleBag)) { quickslotID = 11; } if (quickslotID < 0) { return; } if (ControlsInput.QuickSlotToggle1(playerID)) { quickslotID += 4; } character.QuickSlotMngr.QuickSlotInput(quickslotID); }
// Token: 0x060020B8 RID: 8376 RVA: 0x000C12CC File Offset: 0x000BF4CC private void UpdateQuickSlots() { if (this.m_character != null && this.m_character.QuickSlotMngr != null) { int playerID = this.m_character.OwnerPlayerSys.PlayerID; if (!this.m_character.CharacterUI.IsMenuFocused) { this.m_character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID); this.m_character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID); } if (ControlsInput.QuickSlotInstant1(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(0); } else if (ControlsInput.QuickSlotInstant2(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(1); } else if (ControlsInput.QuickSlotInstant3(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(2); } else if (ControlsInput.QuickSlotInstant4(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(3); } else if (ControlsInput.QuickSlotInstant5(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(4); } else if (ControlsInput.QuickSlotInstant6(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(5); } else if (ControlsInput.QuickSlotInstant7(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(6); } else if (ControlsInput.QuickSlotInstant8(playerID)) { this.m_character.QuickSlotMngr.QuickSlotInput(7); } } }
public static bool Prefix(int _playerID, ref bool __result, Dictionary <int, RewiredInputs> ___m_playerInputManager) { __result = ___m_playerInputManager[_playerID].GetButtonDown("QS_Instant4") || (!ControlsInput.QuickSlotToggle2(_playerID) && ControlsInput.QuickSlotToggle1(_playerID) && ControlsInput.QuickSlot4(_playerID)); return(false); }
internal bool QuickSlotInstant12(int _playerID) { return(ControlsInput.QuickSlotToggle2(_playerID) && ControlsInput.QuickSlotToggle1(_playerID) && ControlsInput.QuickSlot4(_playerID)); }
public static bool UpdateQuickSlotsPrefix(LocalCharacterControl __instance) { if (__instance.Character != null && __instance.Character.QuickSlotMngr != null) { int playerID = __instance.Character.OwnerPlayerSys.PlayerID; if (!__instance.Character.CharacterUI.IsMenuFocused) { __instance.Character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID); __instance.Character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID); } if (m_playerInputManager[playerID].GetButtonDown("Sit_Emote")) { __instance.Character.CastSpell(Character.SpellCastType.Sit, __instance.Character.gameObject, Character.SpellCastModifier.Immobilized, 1, -1f); } else if (m_playerInputManager[playerID].GetButtonDown("Alternate_Idle_Emote")) { __instance.Character.CastSpell(Character.SpellCastType.IdleAlternate, __instance.Character.gameObject, Character.SpellCastModifier.Immobilized, 1, -1f); } else if (ControlsInput.QuickSlotInstant1(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(0); } else if (ControlsInput.QuickSlotInstant2(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(1); } else if (ControlsInput.QuickSlotInstant3(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(2); } else if (ControlsInput.QuickSlotInstant4(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(3); } else if (ControlsInput.QuickSlotInstant5(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(4); } else if (ControlsInput.QuickSlotInstant6(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(5); } else if (ControlsInput.QuickSlotInstant7(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(6); } else if (ControlsInput.QuickSlotInstant8(playerID)) { __instance.Character.QuickSlotMngr.QuickSlotInput(7); } else { //Debug.Log("ExtendedQuickslots - UpdateQuickSlotsPatch() else"); for (var x = 0; x < ExtendedQuickslots.numSlots; ++x) { bool inputRecieved = m_playerInputManager[playerID].GetButtonDown(string.Format("QS_Instant{0}", x + 12)); //Debug.Log(string.Format("Checking QS_Instant{0}: {1}", x+12, inputRecieved)); if (inputRecieved) { Debug.Log("ExtendedQuickslots - UpdateQuickSlotsPatch() QS_Instant" + (x + 12)); __instance.Character.QuickSlotMngr.QuickSlotInput(x + 11); break; } } } } return(false); }