// custom keybinding input internal void Update() { if (CustomKeybindings.GetKeyDown(TOGGLE_KEY, out int playerID)) { MinimapScript.Instances[playerID].ToggleEnable(); } }
public override void Update() { if (CustomKeybindings.GetKeyDown(MENU_KEY)) { BuildingMenu.Show = !BuildingMenu.Show; } }
internal void Update() { if (CustomKeybindings.GetKeyDown(MENU_KEY)) { BuildingMenu.Show = !BuildingMenu.Show; } }
internal void Update() { try { if (MenuManager.Instance.IsInMainMenuScene || NetworkLevelLoader.Instance.IsGameplayPaused) { return; } } catch { return; } if (CustomKeybindings.GetKeyDown(NextKeyToggle, out int playerID)) { var player = SplitScreenManager.Instance.LocalPlayers[playerID]; CycleQuickslotBar(player.AssignedCharacter, true); } if (CustomKeybindings.GetKeyDown(PrevKeyToggle, out playerID)) { var player = SplitScreenManager.Instance.LocalPlayers[playerID]; CycleQuickslotBar(player.AssignedCharacter, false); } }
public override void Update() { if (CustomKeybindings.GetKeyDown(TOGGLE_KEY, out int playerID)) { var player = SplitScreenManager.Instance.LocalPlayers[playerID].AssignedCharacter; CustomToggleTarget(player); } }
internal void Update() { for (int i = 0; i < SlotsToAdd; i++) { if (CustomKeybindings.GetKeyDown($"QS_Instant{i + 12}", out int playerID)) { var character = SplitScreenManager.Instance.LocalPlayers[playerID].AssignedCharacter; character.QuickSlotMngr.QuickSlotInput(i + 11); break; } } foreach (SplitPlayer player in SplitScreenManager.Instance.LocalPlayers) { var character = player.AssignedCharacter; int id = character.OwnerPlayerSys.PlayerID; if (QuickSlotInstant9(id)) { character.QuickSlotMngr.QuickSlotInput(12); } if (QuickSlotInstant10(id)) { character.QuickSlotMngr.QuickSlotInput(13); } if (QuickSlotInstant11(id)) { character.QuickSlotMngr.QuickSlotInput(14); } if (QuickSlotInstant12(id)) { character.QuickSlotMngr.QuickSlotInput(15); } } if (!fixedDictionary && !LocalizationManager.Instance.IsLoading && LocalizationManager.Instance.Loaded) { fixedDictionary = true; var genLoc = SideLoader.References.GENERAL_LOCALIZATION; for (int i = 0; i < SlotsToAdd; i++) { genLoc[$"InputAction_QS_Instant{i + 12}"] = $"Quick Slot {i + 9}"; } } }
internal void Update() { if (NetworkLevelLoader.Instance.IsGameplayPaused || !SplitScreenManager.Instance || SplitScreenManager.Instance.LocalPlayers == null) { return; } for (int i = 0; i < SlotsToAdd; i++) { if (CustomKeybindings.GetKeyDown($"QS_Instant{i + 12}", out int playerID)) { var character = SplitScreenManager.Instance.LocalPlayers[playerID].AssignedCharacter; character.QuickSlotMngr.QuickSlotInput(i + 11); break; } } foreach (SplitPlayer player in SplitScreenManager.Instance.LocalPlayers) { var character = player.AssignedCharacter; int id = character.OwnerPlayerSys.PlayerID; if (QuickSlotInstant9(id)) { character.QuickSlotMngr.QuickSlotInput(12); } if (QuickSlotInstant10(id)) { character.QuickSlotMngr.QuickSlotInput(13); } if (QuickSlotInstant11(id)) { character.QuickSlotMngr.QuickSlotInput(14); } if (QuickSlotInstant12(id)) { character.QuickSlotMngr.QuickSlotInput(15); } } }
public static void UpdateInteraction(LocalCharacterControl __instance) { if (__instance.InputLocked) { return; } try { if (CustomKeybindings.GetKeyDown("QuickSave")) { SaveSystemReworked.MyLogger.LogDebug("QuickSave"); SaveManager.Instance.Save(true, true); //QuickSave = SaveManager.Instance.ChooseCharacterSaveInstance(charUID, 0); if ((bool)Global.AudioManager) { Global.AudioManager.PlaySound(GlobalAudioManager.Sounds.UI_NEWGAME_SelectSave); } } //if (CustomKeybindings.GetKeyDown("QuickLoad")) //{ // SaveSystemReworked.MyLogger.LogDebug("QuickLoad"); // if (QuickSave == null) // { // QuickSave = SaveManager.Instance.ChooseCharacterSaveInstance(charUID, 0); // } // SplitScreenManager.Instance.LocalPlayers[0].SetChosenSave(QuickSave); // QuickSave.ApplyLoadedSaveToChar(__instance.Character); //} } catch (Exception ex) { SaveSystemReworked.MyLogger.LogError(ex.Message); } }