Пример #1
0
        private static bool BasicPatch(IDifficultyBeatmap difficultyBeatmap, CustomBeatmapData customBeatmapData)
        {
            IEnumerable <string>?requirements = customBeatmapData.beatmapCustomData.Get <List <object> >("_requirements")?.Cast <string>();
            IEnumerable <string>?suggestions  = customBeatmapData.beatmapCustomData.Get <List <object> >("_suggestions")?.Cast <string>();
            bool chromaRequirement            = (requirements?.Contains(Plugin.REQUIREMENTNAME) ?? false) || (suggestions?.Contains(Plugin.REQUIREMENTNAME) ?? false);

            // please let me remove this shit
            bool legacyOverride = customBeatmapData.beatmapEventsData.Any(n => n.value >= LegacyLightHelper.RGB_INT_OFFSET);

            if (legacyOverride)
            {
                Plugin.Logger.Log("Legacy Chroma Detected...", IPA.Logging.Logger.Level.Warning);
                Plugin.Logger.Log("Please do not use Legacy Chroma Lights for new maps as it is deprecated and its functionality in future versions of Chroma cannot be guaranteed", IPA.Logging.Logger.Level.Warning);
            }

            ChromaController.ToggleChromaPatches((chromaRequirement || legacyOverride) && ChromaConfig.Instance !.CustomColorEventsEnabled);
            ChromaController.DoColorizerSabers = chromaRequirement && ChromaConfig.Instance !.CustomColorEventsEnabled;

            LightIDTableManager.SetEnvironment(difficultyBeatmap.GetEnvironmentInfo().serializedName);

            return(chromaRequirement);
        }
 private static void SetEnvironmentTable(EnvironmentInfoSO environmentInfo)
 {
     LightIDTableManager.SetEnvironment(environmentInfo.serializedName);
 }
Пример #3
0
        private static void Postfix(IDifficultyBeatmap difficultyBeatmap, EnvironmentInfoSO ____multiplayerEnvironmentInfo)
        {
            LightIDTableManager.SetEnvironment(____multiplayerEnvironmentInfo.serializedName);

            SceneTransitionHelper.Patch(difficultyBeatmap);
        }