public static bool Prefix(JukeboxInstance __instance) { if (string.IsNullOrEmpty(__instance.file) || !Jukebox.HasFile(__instance._file)) { __instance.SwitchTrack(true); } if (__instance.isControlling && Jukebox.isStartingOrPlaying) { MainPatch.isPaused = !Jukebox.paused; Jukebox.paused = !Jukebox.paused; } else if (__instance.ConsumePower()) { Jukebox.Play(__instance); Jukebox.TrackInfo info = Jukebox.GetInfo(__instance.file); __instance.SetLabel(info.label); __instance.SetLength(info.length); MainPatch.isPlaying = true; MainPatch.isPaused = false; } else { __instance.SetLabel(Language.main.Get("JukeboxNoPower")); } if (StoryGoalManager.main.IsAlanOnboard()) { StoryGoal.Execute("Log_Alan_Aside_JukeboxMusic", Story.GoalType.PDA, true, false); } return(false); }