Example #1
0
        public void OnEnable()
        {
            _harmonyInstanceCore.PatchAll(Assembly.GetExecutingAssembly());

            GameplaySetup.instance.AddTab("Chroma", "Chroma.Settings.modifiers.bsml", ChromaSettingsUI.instance);
            if (ChromaConfig.Instance.LightshowMenu)
            {
                GameplaySetup.instance.AddTab("Lightshow Modifiers", "Chroma.Settings.lightshow.bsml", ChromaSettingsUI.instance);
            }

            ChromaUtils.SetSongCoreCapability(REQUIREMENTNAME, ChromaConfig.Instance.CustomColorEventsEnabled);

            SceneManager.activeSceneChanged += ChromaController.OnActiveSceneChanged;

            // Legacy support
            ChromaUtils.SetSongCoreCapability("Chroma Lighting Events");

            if (ChromaUtils.IsModInstalled("NoodleExtensions"))
            {
                AnimationHelper.SubscribeColorEvents();
                NoodleExtensionsInstalled = true;
            }
            else
            {
                NoodleExtensionsInstalled = false;
            }
        }
Example #2
0
        public void OnDisable()
        {
            _harmonyInstanceCore.UnpatchAll(HARMONYID);

            GameplaySetup.instance.RemoveTab("Chroma");

            ChromaUtils.SetSongCoreCapability(REQUIREMENTNAME, false);

            SceneManager.activeSceneChanged -= ChromaController.OnActiveSceneChanged;

            // Legacy support
            ChromaUtils.SetSongCoreCapability("Chroma Lighting Events", false);
        }
Example #3
0
        public void OnEnable()
        {
            _harmonyInstanceCore.PatchAll(Assembly.GetExecutingAssembly());

            SiraUtilInstalled = IPA.Loader.PluginManager.EnabledPlugins.Any(x => x.Id == "SiraUtil");

            GameplaySetup.instance.AddTab("Chroma", "Chroma.Settings.modifiers.bsml", ChromaSettingsUI.instance);

            ChromaUtils.SetSongCoreCapability(REQUIREMENTNAME, ChromaConfig.Instance !.CustomColorEventsEnabled);

            SceneManager.activeSceneChanged += ChromaController.OnActiveSceneChanged;

            // Legacy support
            ChromaUtils.SetSongCoreCapability("Chroma Lighting Events");

            AnimationHelper.SubscribeColorEvents();
            EnvironmentEnhancementManager.SubscribeTrackManagerCreated();
        }