@@ -21,7 +21,7 @@ public class BeatmapParser {
2121 * @return InfoData which includes bpm, artist, song folder and the beatmaps author.
2222 * Returns null if no info.dat file can be found.
2323 */
24- public static @ Nullable InfoData getInfoData (String folder ) {
24+ public static @ Nullable InfoData getInfoData (String folder , boolean dontUseChroma ) {
2525 File dataFolder = Nightclub .DATA_FOLDER ;
2626 File infoFolder = new File (dataFolder + "/" + folder );
2727 @ SuppressWarnings ("ConstantConditions" ) // compiler warns about "infoFolder.listFiles() might be null". please tell me how.
@@ -77,7 +77,7 @@ public class BeatmapParser {
7777 secondaryColor = new Color (envColorLeft .get ("r" ).getAsFloat (), envColorRight .get ("g" ).getAsFloat (), envColorRight .get ("b" ).getAsFloat ());
7878 isChroma = true ;
7979 }
80- if (requirements != null && ! isChroma ) {
80+ if (requirements != null ) {
8181 isChroma = requirements .contains (new JsonPrimitive ("Chroma" ))
8282 || requirements .contains (new JsonPrimitive ("Chroma Lighting Events" ))
8383 || requirements .contains (new JsonPrimitive ("Chroma Special Events" ));
@@ -102,7 +102,7 @@ public class BeatmapParser {
102102 .mapper (info .get ("_levelAuthorName" ).getAsString ())
103103 .songSubName (info .get ("_songSubName" ).getAsString ())
104104 .beatmapFileName (filename )
105- .isChroma (isChroma )
105+ .isChroma (! dontUseChroma && isChroma )
106106 .primaryColor (primaryColor )
107107 .secondaryColor (secondaryColor )
108108 .build ();
@@ -113,11 +113,11 @@ public class BeatmapParser {
113113 * @param name Folder where beatmap is (/name/ExpertPlus.dat/)
114114 * @return List of LightEvent's in the beatmap file. Returns an empty list if info file can't be found
115115 */
116- public static @ NotNull List <LightEvent > getEvents (String name ) {
116+ public static @ NotNull List <LightEvent > getEvents (String name , boolean dontUseChroma ) {
117117 File dataFolder = Nightclub .DATA_FOLDER ;
118118 List <LightEvent > events = new ArrayList <>();
119119 JsonArray eventArray ;
120- InfoData info = BeatmapParser .getInfoData (name );
120+ InfoData info = BeatmapParser .getInfoData (name , dontUseChroma );
121121 if (info == null ) {
122122 return new ArrayList <>();
123123 }
0 commit comments