You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.3 KiB

  1. using IPA;
  2. using UnityEngine.SceneManagement;
  3. using IPALogger = IPA.Logging.Logger;
  4. using BSIPA_ModList.UI;
  5. using UnityEngine;
  6. using IPA.Logging;
  7. namespace BSIPA_ModList
  8. {
  9. internal static class Logger
  10. {
  11. internal static IPALogger log { get; set; }
  12. internal static IPALogger md => log.GetChildLogger("MarkDown");
  13. }
  14. public class Plugin : IBeatSaberPlugin
  15. {
  16. public void Init(IPALogger logger)
  17. {
  18. Logger.log = logger;
  19. IPA.Updating.BeatMods.Updater.ModListPresent = true;
  20. }
  21. public void OnActiveSceneChanged(Scene prevScene, Scene nextScene)
  22. {
  23. }
  24. public void OnApplicationQuit()
  25. {
  26. }
  27. public void OnApplicationStart()
  28. {
  29. }
  30. public void OnFixedUpdate()
  31. {
  32. }
  33. public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
  34. {
  35. if (scene.name == "MenuCore")
  36. {
  37. FloatingNotification.Create();
  38. if (ButtonUI.Instance == null)
  39. new GameObject("BSIPA Mod List Object").AddComponent<ButtonUI>().Init();
  40. }
  41. }
  42. public void OnSceneUnloaded(Scene scene)
  43. {
  44. }
  45. public void OnUpdate()
  46. {
  47. }
  48. }
  49. }