diff --git a/assets/languages/en/Editors.xml b/assets/languages/en/Editors.xml index fd1fc32a..e5517f75 100644 --- a/assets/languages/en/Editors.xml +++ b/assets/languages/en/Editors.xml @@ -113,6 +113,7 @@ Color Difficulties Custom Values (Advanced) + Needs Voices Opponent Mode Co-op Mode diff --git a/assets/languages/es/Editors.xml b/assets/languages/es/Editors.xml index 1190a0eb..5b5a7e4d 100644 --- a/assets/languages/es/Editors.xml +++ b/assets/languages/es/Editors.xml @@ -105,6 +105,7 @@ Modos Permitidos Difficultades Valores Especiales (Avanzado) + Necesita Voces Modo Oponente Modo Co-op diff --git a/assets/languages/it/Editors.xml b/assets/languages/it/Editors.xml index c4b8a800..6b5df001 100644 --- a/assets/languages/it/Editors.xml +++ b/assets/languages/it/Editors.xml @@ -108,8 +108,9 @@ Colore Difficoltà Valori Personalizzati (Avanzato) + Bisogno Voci - Modalità Avvers. + Modalità Avvers Modalità Co-op diff --git a/assets/languages/pl/Editors.xml b/assets/languages/pl/Editors.xml index 9dfde365..4af0d432 100644 --- a/assets/languages/pl/Editors.xml +++ b/assets/languages/pl/Editors.xml @@ -111,6 +111,7 @@ Kolor Trudności Własna Waluta (Zaawansowane) + Potrzebne Wokale Tryb Przeciwnika Tryb Ko-operacyjny diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index a9637e6a..98b1126f 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -121,6 +121,8 @@ class Chart { data.setFieldDefault("coopAllowed", Flags.DEFAULT_COOP_ALLOWED); data.setFieldDefault("opponentModeAllowed", Flags.DEFAULT_OPPONENT_MODE_ALLOWED); data.setFieldDefault("instSuffix", ""); + data.setFieldDefault("vocalsSuffix", ""); + data.setFieldDefault("needsVoices", true); if (data.difficulties.length <= 0) { data.difficulties = [for(f in Paths.getFolderContent('songs/${songName}/charts/', false, fromMods ? MODS : SOURCE)) if (Path.extension(f.toUpperCase()) == "JSON") Path.withoutExtension(f)]; diff --git a/source/funkin/backend/chart/ChartData.hx b/source/funkin/backend/chart/ChartData.hx index 16653fd9..e5ac048a 100644 --- a/source/funkin/backend/chart/ChartData.hx +++ b/source/funkin/backend/chart/ChartData.hx @@ -30,6 +30,8 @@ typedef ChartMetaData = { public var ?customValues:Dynamic; public var ?metas:Map; public var ?instSuffix:String; + public var ?vocalsSuffix:String; + public var ?needsVoices:Bool; } typedef ChartStrumLine = { diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index 9abdfe8e..84e96aa2 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -40,6 +40,7 @@ class FNFLegacyParser { } result.meta.bpm = data.bpm; + result.meta.needsVoices = data.needsVoices.getDefault(true); var camFocusedBF:Bool = false; var altAnims:Bool = false; @@ -156,7 +157,7 @@ class FNFLegacyParser { notes: null, bpm: chart.meta.bpm, speed: chart.scrollSpeed, - needsVoices: true, + needsVoices: chart.meta.needsVoices, player1: null, player2: null, diff --git a/source/funkin/backend/chart/VSliceParser.hx b/source/funkin/backend/chart/VSliceParser.hx index 4ef045f0..05b859ec 100644 --- a/source/funkin/backend/chart/VSliceParser.hx +++ b/source/funkin/backend/chart/VSliceParser.hx @@ -67,6 +67,7 @@ class VSliceParser { var timeChanges = metadata.timeChanges; result.meta.bpm = timeChanges[0].bpm; + result.meta.needsVoices = false; for (note in data) { diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 9514ffc2..48163b78 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -602,7 +602,12 @@ class Charter extends UIState { noteTypes = PlayState.SONG.noteTypes; FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff, PlayState.SONG.meta.instSuffix))); - vocals = Assets.exists(Paths.voices(__song, __diff)) ? FlxG.sound.load(Paths.voices(__song, __diff)) : new FlxSound(); + if (Assets.exists(Paths.voices(__song, __diff, PlayState.SONG.meta.vocalsSuffix))) + vocals = FlxG.sound.load(Paths.voices(__song, __diff, PlayState.SONG.meta.vocalsSuffix)); + else + vocals = new FlxSound(); + + vocals.muted = !PlayState.SONG.meta.needsVoices; vocals.group = FlxG.sound.defaultMusicGroup; gridBackdrops.createGrids(PlayState.SONG.strumLines.length); diff --git a/source/funkin/editors/charter/CharterMetaDataScreen.hx b/source/funkin/editors/charter/CharterMetaDataScreen.hx index 54e7be05..a86ae09b 100644 --- a/source/funkin/editors/charter/CharterMetaDataScreen.hx +++ b/source/funkin/editors/charter/CharterMetaDataScreen.hx @@ -23,6 +23,7 @@ class CharterMetaDataScreen extends UISubstateWindow { public var iconSprite:HealthIcon; public var opponentModeCheckbox:UICheckbox; public var coopAllowedCheckbox:UICheckbox; + public var needsVoicesCheckbox:UICheckbox; public var colorWheel:UIColorwheel; public var difficultiesTextBox:UITextBox; @@ -68,6 +69,9 @@ class CharterMetaDataScreen extends UISubstateWindow { denominatorStepper = new UINumericStepper(beatsPerMeasureStepper.x + 30 + 24, beatsPerMeasureStepper.y, Math.floor(16 / metadata.stepsPerBeat), 1, 0, 1, null, 54); add(denominatorStepper); + needsVoicesCheckbox = new UICheckbox(beatsPerMeasureStepper.x + 100, beatsPerMeasureStepper.y + 6, translate("needsVoices"), metadata.needsVoices); + add(needsVoicesCheckbox); + add(title = new UIText(songNameTextBox.x, songNameTextBox.y + 10 + 46, 0, translate("menusData"), 28)); displayNameTextBox = new UITextBox(title.x, title.y + title.height + 36, metadata.displayName); @@ -149,6 +153,7 @@ class CharterMetaDataScreen extends UISubstateWindow { PlayState.SONG.meta = { name: songNameTextBox.label.text, bpm: bpmStepper.value, + needsVoices: needsVoicesCheckbox.checked, beatsPerMeasure: Std.int(beatsPerMeasureStepper.value), stepsPerBeat: Std.int(16 / denominatorStepper.value), displayName: displayNameTextBox.label.text, @@ -161,5 +166,6 @@ class CharterMetaDataScreen extends UISubstateWindow { }; Charter.instance.updateBPMEvents(); + Charter.instance.vocals.muted = !needsVoicesCheckbox.checked; } } \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index b61b1f9e..1457d4ce 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1115,8 +1115,12 @@ class PlayState extends MusicBeatState FlxG.sound.setMusic(inst = FlxG.sound.load(Assets.getMusic(Paths.inst(SONG.meta.name, difficulty, SONG.meta.instSuffix)))); - var vocalsPath = Paths.voices(SONG.meta.name, difficulty); - vocals = Assets.exists(vocalsPath) ? FlxG.sound.load(Options.streamedVocals ? Assets.getMusic(vocalsPath) : vocalsPath) : new FlxSound(); + var vocalsPath = Paths.voices(SONG.meta.name, difficulty, SONG.meta.vocalsSuffix); + if (SONG.meta.needsVoices && Assets.exists(vocalsPath)) + vocals = FlxG.sound.load(Options.streamedVocals ? Assets.getMusic(vocalsPath) : vocalsPath); + else + vocals = new FlxSound(); + vocals.group = FlxG.sound.defaultMusicGroup; vocals.persist = false;