private static void Postfix(IDifficultyBeatmap difficultyBeatmap) { if (difficultyBeatmap.beatmapData is CustomBeatmapData customBeatmapData) { IEnumerable <string> requirements = ((List <object>)Trees.at(customBeatmapData.beatmapCustomData, "_requirements"))?.Cast <string>(); bool noodleRequirement = requirements?.Contains(CAPABILITY) ?? false; NoodleController.ToggleNoodlePatches(noodleRequirement, customBeatmapData, difficultyBeatmap.noteJumpMovementSpeed, difficultyBeatmap.noteJumpStartBeatOffset); } }
internal static void Patch(IDifficultyBeatmap difficultyBeatmap) { if (difficultyBeatmap.beatmapData is CustomBeatmapData customBeatmapData) { IEnumerable <string>?requirements = customBeatmapData.beatmapCustomData.Get <List <object> >("_requirements")?.Cast <string>(); bool noodleRequirement = requirements?.Contains(CAPABILITY) ?? false; NoodleController.ToggleNoodlePatches(noodleRequirement); } }
private static void Postfix(IDifficultyBeatmap difficultyBeatmap, PlayerSpecificSettings playerSpecificSettings) { if (difficultyBeatmap.beatmapData is CustomBeatmapData customBeatmapData) { IEnumerable <string> requirements = ((List <object>)Trees.at(customBeatmapData.beatmapCustomData, "_requirements"))?.Cast <string>(); bool noodleRequirement = requirements?.Contains(CAPABILITY) ?? false; NoodleController.ToggleNoodlePatches(noodleRequirement); // Reset tracks when entering game scene Dictionary <string, Track> tracks = Trees.at(customBeatmapData.customData, "tracks"); if (tracks != null) { foreach (KeyValuePair <string, Track> track in tracks) { track.Value.ResetVariables(); } } } NoodleController.LeftHandedMode = playerSpecificSettings.leftHanded; }
private static void Prefix() { NoodleController.ToggleNoodlePatches(false); }