needsvoices is finally removed!
This commit is contained in:
@@ -56,7 +56,6 @@ 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);
|
||||
|
||||
@@ -20,7 +20,6 @@ typedef ChartMetaData = {
|
||||
public var ?displayName:String;
|
||||
public var ?beatsPerMeasure:Float;
|
||||
public var ?stepsPerBeat:Float;
|
||||
public var ?needsVoices:Bool;
|
||||
public var ?icon:String;
|
||||
public var ?color:Dynamic;
|
||||
public var ?difficulties:Array<String>;
|
||||
|
||||
@@ -41,7 +41,6 @@ class FNFLegacyParser {
|
||||
}
|
||||
|
||||
result.meta.bpm = data.bpm;
|
||||
result.meta.needsVoices = data.needsVoices.getDefault(true);
|
||||
|
||||
var camFocusedBF:Bool = false;
|
||||
var altAnims:Bool = false;
|
||||
@@ -145,7 +144,6 @@ class FNFLegacyParser {
|
||||
song: chart.meta.name,
|
||||
notes: null,
|
||||
bpm: chart.meta.bpm,
|
||||
needsVoices: chart.meta.needsVoices,
|
||||
speed: chart.scrollSpeed,
|
||||
|
||||
player1: null,
|
||||
@@ -206,7 +204,6 @@ typedef SwagSong =
|
||||
var song:String;
|
||||
var notes:Array<SwagSection>;
|
||||
var bpm:Float;
|
||||
var needsVoices:Bool;
|
||||
var speed:Float;
|
||||
var ?stage:String;
|
||||
var ?noteTypes:Array<String>;
|
||||
|
||||
@@ -526,7 +526,7 @@ class Charter extends UIState {
|
||||
noteTypes = PlayState.SONG.noteTypes;
|
||||
|
||||
FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff)));
|
||||
if (PlayState.SONG.meta.needsVoices != false) // null or true
|
||||
if (Assets.exists(Paths.voices(__song, __diff))) // null or true
|
||||
vocals = FlxG.sound.load(Paths.voices(__song, __diff));
|
||||
else
|
||||
vocals = new FlxSound();
|
||||
@@ -602,7 +602,7 @@ class Charter extends UIState {
|
||||
var wavesToGenerate:Array<{name:String, sound:FlxSound}> = [
|
||||
{name: "Inst.ogg", sound: FlxG.sound.music},
|
||||
];
|
||||
if (PlayState.SONG.meta.needsVoices != false)
|
||||
if (Assets.exists(Paths.voices(__song, __diff)))
|
||||
wavesToGenerate.push({name: "Voices.ogg", sound: vocals});
|
||||
|
||||
for (strumLine in strumLines)
|
||||
|
||||
@@ -15,7 +15,6 @@ class CharterMetaDataScreen extends UISubstateWindow {
|
||||
public var bpmStepper:UINumericStepper;
|
||||
public var beatsPerMeasureStepper:UINumericStepper;
|
||||
public var stepsPerBeatStepper :UINumericStepper;
|
||||
public var needsVoicesCheckbox:UICheckbox;
|
||||
public var customPropertiesButtonList:UIButtonList<PropertyButton>;
|
||||
|
||||
public var displayNameTextBox:UITextBox;
|
||||
@@ -64,11 +63,6 @@ class CharterMetaDataScreen extends UISubstateWindow {
|
||||
stepsPerBeatStepper = new UINumericStepper(beatsPerMeasureStepper.x + 30 + 24, beatsPerMeasureStepper.y, metadata.stepsPerBeat, 1, 0, 1, null, 54);
|
||||
add(stepsPerBeatStepper);
|
||||
|
||||
needsVoicesCheckbox = new UICheckbox(stepsPerBeatStepper.x + 80 + 26, stepsPerBeatStepper.y, "Voices", metadata.needsVoices);
|
||||
add(needsVoicesCheckbox);
|
||||
addLabelOn(needsVoicesCheckbox, "Needs Voices");
|
||||
needsVoicesCheckbox.y += 6; needsVoicesCheckbox.x += 4;
|
||||
|
||||
add(title = new UIText(songNameTextBox.x, songNameTextBox.y + 10 + 46, 0, "Menus Data (Freeplay/Story)", 28));
|
||||
|
||||
displayNameTextBox = new UITextBox(title.x, title.y + title.height + 36, metadata.displayName);
|
||||
@@ -97,7 +91,7 @@ class CharterMetaDataScreen extends UISubstateWindow {
|
||||
add(difficulitesTextBox);
|
||||
addLabelOn(difficulitesTextBox, "Difficulties");
|
||||
|
||||
customPropertiesButtonList = new UIButtonList<PropertyButton>(needsVoicesCheckbox.x + needsVoicesCheckbox.width + 105, songNameTextBox.y, 290, 316, '', FlxPoint.get(280, 35), null, 5);
|
||||
customPropertiesButtonList = new UIButtonList<PropertyButton>(stepsPerBeatStepper.x + 80 + 26 + 105, songNameTextBox.y, 290, 316, '', FlxPoint.get(280, 35), null, 5);
|
||||
customPropertiesButtonList.frames = Paths.getFrames('editors/ui/inputbox');
|
||||
customPropertiesButtonList.cameraSpacing = 0;
|
||||
customPropertiesButtonList.addButton.callback = function() {
|
||||
@@ -161,7 +155,6 @@ class CharterMetaDataScreen extends UISubstateWindow {
|
||||
bpm: bpmStepper.value,
|
||||
beatsPerMeasure: Std.int(beatsPerMeasureStepper.value),
|
||||
stepsPerBeat: Std.int(stepsPerBeatStepper.value),
|
||||
needsVoices: needsVoicesCheckbox.checked,
|
||||
displayName: displayNameTextBox.label.text,
|
||||
icon: iconTextBox.label.text,
|
||||
color: colorWheel.curColorString,
|
||||
|
||||
@@ -19,7 +19,6 @@ class SongCreationScreen extends UISubstateWindow {
|
||||
public var bpmStepper:UINumericStepper;
|
||||
public var beatsPerMeasureStepper:UINumericStepper;
|
||||
public var stepsPerBeatStepper :UINumericStepper;
|
||||
public var needsVoicesCheckbox:UICheckbox;
|
||||
public var instExplorer:UIFileExplorer;
|
||||
public var voicesExplorer:UIFileExplorer;
|
||||
|
||||
@@ -83,25 +82,6 @@ class SongCreationScreen extends UISubstateWindow {
|
||||
|
||||
var voicesUIText:UIText = null;
|
||||
|
||||
needsVoicesCheckbox = new UICheckbox(stepsPerBeatStepper.x + 80 + 26, stepsPerBeatStepper.y, "Voices", true);
|
||||
needsVoicesCheckbox.onChecked = function(checked) {
|
||||
if (voicesExplorer == null) return;
|
||||
|
||||
if(!checked) {
|
||||
voicesExplorer.removeFile();
|
||||
voicesExplorer.selectable = voicesExplorer.uploadButton.selectable = false;
|
||||
voicesUIText.text = "Vocal Audio File";
|
||||
} else {
|
||||
voicesExplorer.selectable = voicesExplorer.uploadButton.selectable = true;
|
||||
voicesUIText.applyMarkup(
|
||||
"Vocal Audio File $* Required$",
|
||||
[new FlxTextFormatMarkerPair(new FlxTextFormat(0xFFAD1212), "$")]);
|
||||
}
|
||||
}
|
||||
songDataGroup.add(needsVoicesCheckbox);
|
||||
addLabelOn(needsVoicesCheckbox, "Needs Voices");
|
||||
needsVoicesCheckbox.y += 6; needsVoicesCheckbox.x += 4;
|
||||
|
||||
instExplorer = new UIFileExplorer(songNameTextBox.x, songNameTextBox.y + 32 + 36, null, null, Paths.SOUND_EXT, function (res) {
|
||||
var audioPlayer:UIAudioPlayer = new UIAudioPlayer(instExplorer.x + 8, instExplorer.y + 8, res);
|
||||
instExplorer.members.push(audioPlayer);
|
||||
@@ -195,7 +175,7 @@ class SongCreationScreen extends UISubstateWindow {
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
if (curPage == 0) {
|
||||
if (instExplorer.file != null && (needsVoicesCheckbox.checked ? voicesExplorer.file != null : true))
|
||||
if (instExplorer.file != null)
|
||||
saveButton.selectable = true;
|
||||
else saveButton.selectable = false;
|
||||
} else
|
||||
@@ -258,7 +238,6 @@ class SongCreationScreen extends UISubstateWindow {
|
||||
bpm: bpmStepper.value,
|
||||
beatsPerMeasure: Std.int(beatsPerMeasureStepper.value),
|
||||
stepsPerBeat: Std.int(stepsPerBeatStepper.value),
|
||||
needsVoices: needsVoicesCheckbox.checked,
|
||||
displayName: displayNameTextBox.label.text,
|
||||
icon: iconTextBox.label.text,
|
||||
color: colorWheel.curColorString,
|
||||
|
||||
@@ -988,7 +988,7 @@ class PlayState extends MusicBeatState
|
||||
curSong = songData.meta.name.toLowerCase();
|
||||
|
||||
inst = FlxG.sound.load(Paths.inst(SONG.meta.name, difficulty));
|
||||
if (SONG.meta.needsVoices != false) // null or true
|
||||
if (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