private void PresetsMenu_OnItemSelect(UIMenu sender, UIMenuItem selectedItem, int index) { if (ModSettings.CinematicSpawn) { DeloreanHandler.SpawnWithReentry(DeloreanType.BTTF1, selectedItem.Text); } else { DeloreanHandler.Spawn(DeloreanType.BTTF1).Mods.Load(selectedItem.Text); } Main.MenuPool.CloseAllMenus(); }
private static void MainMenu_OnItemSelect(UIMenu sender, UIMenuItem selectedItem, int index) { if (selectedItem == spawnPresetDelorean && DeloreanModsCopy.ListPresets().Count == 0) { Notification.Show(Game.GetLocalizedString("BTTFV_Menu_Presets_Not_Found")); } if (selectedItem == spawnCustomDelorean || selectedItem == spawnPresetDelorean) { return; } if (selectedItem == spawnDelorean) { DeloreanHandler.Spawn(DeloreanType.DMC12); Main.MenuPool.CloseAllMenus(); } if (selectedItem == spawnDelorean1) { if (ModSettings.CinematicSpawn) { DeloreanHandler.SpawnWithReentry(DeloreanType.BTTF1); } else { DeloreanHandler.Spawn(DeloreanType.BTTF1); } Main.MenuPool.CloseAllMenus(); } if (selectedItem == spawnDelorean2) { if (ModSettings.CinematicSpawn) { DeloreanHandler.SpawnWithReentry(DeloreanType.BTTF2); } else { DeloreanHandler.Spawn(DeloreanType.BTTF2); } Main.MenuPool.CloseAllMenus(); } if (selectedItem == spawnDelorean3) { if (ModSettings.CinematicSpawn) { DeloreanHandler.SpawnWithReentry(DeloreanType.BTTF3); } else { DeloreanHandler.Spawn(DeloreanType.BTTF3); } Main.MenuPool.CloseAllMenus(); } if (selectedItem == removeOtherDeloreans) { DeloreanHandler.RemoveAllDeloreans(true); RemoteDeloreansHandler.DeleteAll(); Notification.Show(Game.GetLocalizedString("BTTFV_RemovedOtherTimeMachines")); } if (selectedItem == removeAllDeloreans) { DeloreanHandler.RemoveAllDeloreans(); RemoteDeloreansHandler.DeleteAll(); Notification.Show(Game.GetLocalizedString("BTTFV_RemovedAllTimeMachines")); } if (selectedItem == removeDelorean) { var delorean = DeloreanHandler.GetDeloreanFromVehicle(Main.PlayerVehicle); if (delorean == null) { Notification.Show(Game.GetLocalizedString("BTTFV_NotSeatedInTimeMachine")); return; } DeloreanHandler.RemoveDelorean(delorean); } }