Fix compiling issues

This commit is contained in:
Ne_Eo
2024-08-02 14:24:50 +02:00
parent da20261490
commit 8cb833a38d
5 changed files with 5 additions and 2 deletions
+1
View File
@@ -56,6 +56,7 @@ class Chart {
data.setFieldDefault("name", songName);
data.setFieldDefault("beatsPerMeasure", 4);
data.setFieldDefault("stepsPerBeat", 4);
data.setFieldDefault("needsVoices", true);
data.setFieldDefault("icon", "face");
data.setFieldDefault("difficulties", []);
data.setFieldDefault("coopAllowed", false);
+1
View File
@@ -26,6 +26,7 @@ typedef ChartMetaData = {
public var ?coopAllowed:Bool;
public var ?opponentModeAllowed:Bool;
public var ?customValues:Dynamic;
public var ?needsVoices:Bool;
// NOT TO BE EXPORTED
public var ?parsedColor:FlxColor;
@@ -41,6 +41,7 @@ class FNFLegacyParser {
}
result.meta.bpm = data.bpm;
result.meta.needsVoices = data.needsVoices.getDefault(true);
var camFocusedBF:Bool = false;
var altAnims:Bool = false;
+1 -1
View File
@@ -526,7 +526,7 @@ class Charter extends UIState {
noteTypes = PlayState.SONG.noteTypes;
FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff)));
if (Assets.exists(Paths.voices(__song, __diff))) // null or true
if (PlayState.SONG.meta.needsVoices != false && Assets.exists(Paths.voices(__song, __diff))) // null or true
vocals = FlxG.sound.load(Paths.voices(__song, __diff));
else
vocals = new FlxSound();
+1 -1
View File
@@ -1000,7 +1000,7 @@ class PlayState extends MusicBeatState
curSong = songData.meta.name.toLowerCase();
inst = FlxG.sound.load(Paths.inst(SONG.meta.name, difficulty));
if (Assets.exists(Paths.voices(SONG.meta.name, difficulty))) // null or true
if (SONG.meta.needsVoices != false && Assets.exists(Paths.voices(SONG.meta.name, difficulty))) // null or true
vocals = FlxG.sound.load(Paths.voices(SONG.meta.name, difficulty));
else
vocals = new FlxSound();