private static void doNeverSelectStuffForSecondary(int i) { MPAutoSelection.SecondaryNeverSelect[i] = !MPAutoSelection.SecondaryNeverSelect[i]; if (!MPAutoSelection.SecondaryNeverSelect[i]) { SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } else { SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); }
public static void Postfix() { selected = DrawMpAutoselectOrderingScreen.returnPrimarySelected(); selected2 = DrawMpAutoselectOrderingScreen.returnSecondarySelected(); switch (MenuManager.m_menu_sub_state) { case MenuSubState.ACTIVE: if (MenuManager.m_menu_micro_state == 3) { switch (UIManager.m_menu_selection) { case 200: case 201: case 202: case 203: if (UIManager.PushedSelect(100)) { MenuManager.m_menu_micro_state = UIManager.m_menu_selection - 200; MenuManager.UIPulse(1f); GameManager.m_audio.PlayCue2D(364, 0.4f, 0.07f, 0f, false); } break; // Triggers Swap Logic for the Primary Weapon Buttons case 1720: case 1721: case 1722: case 1723: case 1724: case 1725: case 1726: case 1727: // int nwhen (MenuManager.m_menu_micro_state > 1719 && MenuManager.m_menu_micro_state <= 1727): if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(UIManager.m_menu_selection - 1720); } break; // Triggers Swap Logic for the Secondary Weapon Buttons case 1728: case 1729: case 1730: case 1731: case 1732: case 1733: case 1734: case 1735: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(UIManager.m_menu_selection - 1728); } break; // Triggers Neverselect Logic for the Primary Buttons case 2000: case 2001: case 2002: case 2003: case 2004: case 2005: case 2006: case 2007: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(UIManager.m_menu_selection - 2000); } break; // Triggers Neverselect Logic for the Secondary Buttons case 2010: case 2011: case 2012: case 2013: case 2014: case 2015: case 2016: case 2017: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(UIManager.m_menu_selection - 2010); } break; case 2100: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.primarySwapFlag || MPAutoSelection.secondarySwapFlag) { MPAutoSelection.primarySwapFlag = false; MPAutoSelection.secondarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.primarySwapFlag = true; MPAutoSelection.secondarySwapFlag = true; MenuManager.opt_primary_autoswitch = 0; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2102: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.secondarySwapFlag) { MPAutoSelection.secondarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.secondarySwapFlag = true; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2103: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.primarySwapFlag) { MPAutoSelection.primarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.primarySwapFlag = true; MenuManager.opt_primary_autoswitch = 0; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2104: // if (UIManager.PushedSelect(100)) { if (MPAutoSelection.zorc) { MPAutoSelection.zorc = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.zorc = true; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2105: // if (UIManager.PushedSelect(100)) { if (MPAutoSelection.dontAutoselectAfterFiring) { MPAutoSelection.dontAutoselectAfterFiring = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.dontAutoselectAfterFiring = true; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2106: // if (UIManager.PushedSelect(100)) { if (MPAutoSelection.swapWhileFiring) { MPAutoSelection.swapWhileFiring = false; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_close, 0.8f, 0f, 0f, false); } else { MPAutoSelection.swapWhileFiring = true; SFXCueManager.PlayCue2D(SFXCue.hud_weapon_cycle_picker, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; default: if (UIManager.PushedSelect(100) && UIManager.m_menu_selection == 100) { uConsole.Log("Definitly 203 " + Player.Mp_loadout1 + " : " + Player.Mp_loadout2); UIManager.DestroyAll(false); MenuManager.PlaySelectSound(1f); if (MPAutoSelection.isCurrentlyInLobby) { MenuManager.ChangeMenuState(MenuState.MP_PRE_MATCH_MENU, false); } else { MenuManager.ChangeMenuState(MenuState.MP_MENU, false); } DrawMpAutoselectOrderingScreen.isInitialised = false; } break; } } else { //uConsole.Log("NOT 203 "+Player.Mp_loadout1 + " : " + Player.Mp_loadout2); if (Player.Mp_loadout1 == 203 || Player.Mp_loadout2 == 203) { Player.Mp_loadout1 = loadout1LastTick; Player.Mp_loadout2 = loadout2LastTick; } else { loadout1LastTick = Player.Mp_loadout1; loadout2LastTick = Player.Mp_loadout2; } if (UIManager.PushedSelect(100) && UIManager.m_menu_selection == 203) { //MenuManager.SetDefaultSelection(-1); MenuManager.m_menu_micro_state = 3; MenuManager.UIPulse(1f); GameManager.m_audio.PlayCue2D(364, 0.4f, 0.07f, 0f, false); } } break; } }
public static void Postfix() { selected = DrawMpAutoselectOrderingScreen.returnPrimarySelected(); selected2 = DrawMpAutoselectOrderingScreen.returnSecondarySelected(); switch (MenuManager.m_menu_sub_state) { case MenuSubState.ACTIVE: if (MenuManager.m_menu_micro_state == 3) { switch (UIManager.m_menu_selection) { case 200: case 201: case 202: case 203: if (UIManager.PushedSelect(100)) { MenuManager.m_menu_micro_state = UIManager.m_menu_selection - 200; MenuManager.UIPulse(1f); GameManager.m_audio.PlayCue2D(364, 0.4f, 0.07f, 0f, false); } break; case 1720: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(0); } break; case 1721: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(1); } break; case 1722: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(2); } break; case 1723: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(3); } break; case 1724: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(4); } break; case 1725: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(5); } break; case 1726: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(6); } break; case 1727: if (UIManager.PushedSelect(100)) { doSelectedStuffForPrimary(7); } break; case 1728: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(0); } break; case 1729: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(1); } break; case 1730: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(2); } break; case 1731: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(3); } break; case 1732: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(4); } break; case 1733: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(5); } break; case 1734: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(6); } break; case 1735: if (UIManager.PushedSelect(100)) { doSelectedStuffForSecondary(7); } break; case 2000: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(0); } break; case 2001: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(1); } break; case 2002: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(2); } break; case 2003: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(3); } break; case 2004: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(4); } break; case 2005: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(5); } break; case 2006: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(6); } break; case 2007: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForPrimary(7); } break; case 2010: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(0); } break; case 2011: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(1); } break; case 2012: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(2); } break; case 2013: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(3); } break; case 2014: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(4); } break; case 2015: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(5); } break; case 2016: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(6); } break; case 2017: if (UIManager.PushedSelect(100)) { doNeverSelectStuffForSecondary(7); } break; case 2100: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.primarySwapFlag || MPAutoSelection.secondarySwapFlag) { MPAutoSelection.primarySwapFlag = false; MPAutoSelection.secondarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.enemy_detonatorA_death_roll, 0.8f, 0f, 0f, false); //SFXCueManager.PlayRawSoundEffect2D(SoundEffect.door_close2, 1f, -0.2f, 0.25f, false); } else { MPAutoSelection.primarySwapFlag = true; MPAutoSelection.secondarySwapFlag = true; MenuManager.opt_primary_autoswitch = 0; SFXCueManager.PlayCue2D(SFXCue.enemy_detonatorB_alert, 0.8f, 0f, 0f, false); // SFXCueManager.PlayRawSoundEffect2D(SoundEffect.door_open2, 1f, -0.2f, 0.25f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2101: //REPLACE /* * if (UIManager.PushedSelect(100)) * { * if (MPAutoSelection.patchPrevNext) * { * MPAutoSelection.patchPrevNext = false; * SFXCueManager.PlayCue2D(SFXCue.guidebot_response_negative, 0.8f, 0f, 0f, false); * } * else * { * MPAutoSelection.patchPrevNext = true; * SFXCueManager.PlayCue2D(SFXCue.guidebot_objective_found, 0.8f, 0f, 0f, false); * } * DrawMpAutoselectOrderingScreen.saveToFile(); * }*/ break; case 2102: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.secondarySwapFlag) { MPAutoSelection.secondarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.guidebot_response_negative, 0.8f, 0f, 0f, false); } else { MPAutoSelection.secondarySwapFlag = true; SFXCueManager.PlayCue2D(SFXCue.guidebot_objective_found, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2103: if (UIManager.PushedSelect(100)) { if (MPAutoSelection.primarySwapFlag) { MPAutoSelection.primarySwapFlag = false; SFXCueManager.PlayCue2D(SFXCue.guidebot_response_negative, 0.8f, 0f, 0f, false); } else { MPAutoSelection.primarySwapFlag = true; SFXCueManager.PlayCue2D(SFXCue.guidebot_objective_found, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2104: // if (UIManager.PushedSelect(100)) { if (MPAutoSelection.zorc) { MPAutoSelection.zorc = false; SFXCueManager.PlayCue2D(SFXCue.guidebot_response_negative, 0.8f, 0f, 0f, false); } else { MPAutoSelection.zorc = true; SFXCueManager.PlayCue2D(SFXCue.guidebot_objective_found, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; case 2105: // if (UIManager.PushedSelect(100)) { if (MPAutoSelection.COswapToHighest) { MPAutoSelection.COswapToHighest = false; SFXCueManager.PlayCue2D(SFXCue.guidebot_response_negative, 0.8f, 0f, 0f, false); } else { MPAutoSelection.COswapToHighest = true; SFXCueManager.PlayCue2D(SFXCue.guidebot_objective_found, 0.8f, 0f, 0f, false); } DrawMpAutoselectOrderingScreen.saveToFile(); } break; default: if (UIManager.PushedSelect(100) && UIManager.m_menu_selection == 100) { uConsole.Log("Definitly 203 " + Player.Mp_loadout1 + " : " + Player.Mp_loadout2); UIManager.DestroyAll(false); MenuManager.PlaySelectSound(1f); if (MPAutoSelection.isCurrentlyInLobby) { MenuManager.ChangeMenuState(MenuState.MP_PRE_MATCH_MENU, false); } else { MenuManager.ChangeMenuState(MenuState.MP_MENU, false); } DrawMpAutoselectOrderingScreen.isInitialised = false; } break; } } else { //uConsole.Log("NOT 203 "+Player.Mp_loadout1 + " : " + Player.Mp_loadout2); if (Player.Mp_loadout1 == 203 || Player.Mp_loadout2 == 203) { Player.Mp_loadout1 = loadout1LastTick; Player.Mp_loadout2 = loadout2LastTick; } else { loadout1LastTick = Player.Mp_loadout1; loadout2LastTick = Player.Mp_loadout2; } if (UIManager.PushedSelect(100) && UIManager.m_menu_selection == 203) { //MenuManager.SetDefaultSelection(-1); MenuManager.m_menu_micro_state = 3; MenuManager.UIPulse(1f); GameManager.m_audio.PlayCue2D(364, 0.4f, 0.07f, 0f, false); } } break; } }