Beispiel #1
0
        public static void ApplyPatches()
        {
            var harmony = HarmonyInstance.Create("com.tobeyblaber.straitjacket.subnautica.customtunes.mod");

            harmony.PatchAll(Assembly.GetExecutingAssembly());
            CustomTunes.Initialise();
        }
 private void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
         //Destroy(musicSource);
         //Mp3WavePaths.Clear();
         // TODO: Tidy up loaded music
     }
 }
Beispiel #3
0
        private void Options_ToggleChanged(object sender, ToggleChangedEventArgs e)
        {
            switch (e.Id)
            {
            case INCLUDE_OST_ID:
                CustomTunes.Config.IncludeOST = e.Value;
                if (!CustomTunes.Config.IncludeOST)
                {
                    CoroutineHost.StartCoroutine(CustomTunes.UnloadOST());
                }
                break;

            case RELOAD_ON_FILE_CHANGE_ID:
                CustomTunes.Config.ReloadOnFileChange = e.Value;
                break;
            }
            CustomTunes.Config.Save();
        }