Merge branch 'main' into new-editors
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -27,6 +27,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;
|
||||
@@ -145,6 +146,7 @@ class FNFLegacyParser {
|
||||
notes: null,
|
||||
bpm: chart.meta.bpm,
|
||||
speed: chart.scrollSpeed,
|
||||
needsVoices: chart.meta.needsVoices,
|
||||
|
||||
player1: null,
|
||||
player2: null,
|
||||
@@ -208,6 +210,7 @@ typedef SwagSong =
|
||||
var ?stage:String;
|
||||
var ?noteTypes:Array<String>;
|
||||
var ?events:Array<Dynamic>;
|
||||
var ?needsVoices:Bool;
|
||||
|
||||
var player1:String;
|
||||
var player2:String;
|
||||
|
||||
@@ -28,13 +28,21 @@ class Macros {
|
||||
|
||||
var isHl = Context.defined("hl");
|
||||
|
||||
var compathx4 = [
|
||||
"sys.db.Sqlite",
|
||||
"sys.db.Mysql",
|
||||
"sys.db.Connection",
|
||||
"sys.db.ResultSet",
|
||||
"haxe.remoting.Proxy",
|
||||
];
|
||||
|
||||
if(Context.defined("sys")) {
|
||||
for(inc in ["sys", "openfl.net", "funkin.backend.system.net"]) {
|
||||
if(!isHl)
|
||||
Compiler.include(inc);
|
||||
Compiler.include(inc, compathx4);
|
||||
else {
|
||||
// TODO: Hashlink
|
||||
//Compiler.include(inc, ["sys.net.UdpSocket", "openfl.net.DatagramSocket"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast
|
||||
//Compiler.include(inc, compathx4.concat(["sys.net.UdpSocket", "openfl.net.DatagramSocket"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user