diff --git a/art/flashFiles/heart.fla b/art/flashFiles/heart.fla new file mode 100644 index 00000000..69fd0d8a Binary files /dev/null and b/art/flashFiles/heart.fla differ diff --git a/assets/preload/images/heart.png b/assets/preload/images/heart.png new file mode 100644 index 00000000..6fe4f4fc Binary files /dev/null and b/assets/preload/images/heart.png differ diff --git a/assets/preload/sounds/fav.ogg b/assets/preload/sounds/fav.ogg new file mode 100644 index 00000000..8132335e Binary files /dev/null and b/assets/preload/sounds/fav.ogg differ diff --git a/assets/preload/sounds/unfav.ogg b/assets/preload/sounds/unfav.ogg new file mode 100644 index 00000000..5c8d0eb1 Binary files /dev/null and b/assets/preload/sounds/unfav.ogg differ diff --git a/hmm.json b/hmm.json index ac5eeb15..639ef0d1 100644 --- a/hmm.json +++ b/hmm.json @@ -113,7 +113,7 @@ { "name": "lumod", "type": "haxelib", - "version": "1.0.0" + "version": "2.0.0" }, { "name": "actuate", diff --git a/source/Main.hx b/source/Main.hx index cdad3f91..0fec776b 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -51,7 +51,7 @@ class Main extends Sprite #end public static final PSYCH_ONLINE_VERSION:String = "0.9.3"; - public static final CLIENT_PROTOCOL:Float = 6; + public static final CLIENT_PROTOCOL:Float = 7; public static final GIT_COMMIT:String = online.backend.Macros.getGitCommitHash(); // You can pretty much ignore everything from here on - your code should go in your states. @@ -112,8 +112,15 @@ class Main extends Sprite CoolUtil.setDarkMode(true); - Lumod.get_scriptsRootPath = () -> { - return Lumod.scriptsRootPath = Paths.mods(Mods.currentModDirectory + "/lumod"); + Lumod.scriptPathHandler = scriptPath -> { + var defaultPath:String = 'lumod/' + scriptPath; + + // check if script exists in any of loaded mods + var path:String = Paths.modFolders(defaultPath); + if (FileSystem.exists(path)) + return path; + + return defaultPath; } Lumod.classResolver = Deflection.resolveClass; diff --git a/source/backend/ClientPrefs.hx b/source/backend/ClientPrefs.hx index f8d123ab..85b0c3ec 100644 --- a/source/backend/ClientPrefs.hx +++ b/source/backend/ClientPrefs.hx @@ -59,7 +59,8 @@ class SaveVariables { 'instakill' => false, 'practice' => false, 'botplay' => false, - 'opponentplay' => false + 'opponentplay' => false, + 'nospecialnotes' => false, ]; public var comboOffset:Array = [0, 0, 0, 0]; @@ -90,6 +91,8 @@ class SaveVariables { public var disableLagDetection:Bool = false; public var groupSongsBy:String = 'No Grouping'; public var hiddenSongs:Array = []; //format: 'songname-originfolder' + public var favSongs:Array = []; //format: 'songname-originfolder' + public var modchartSkinChanges:Bool = false; public function new() { @@ -120,6 +123,7 @@ class ClientPrefs { 'reset' => [R], 'taunt' => [SPACE], 'sidebar' => [GRAVEACCENT], + 'fav' => [Q], 'volume_mute' => [ZERO], 'volume_up' => [NUMPADPLUS, PLUS], @@ -144,7 +148,8 @@ class ClientPrefs { 'pause' => [START], 'reset' => [BACK], 'taunt' => [A], - 'sidebar' => [] + 'sidebar' => [], + 'fav' => [] ]; public static var defaultKeys:Map> = null; public static var defaultButtons:Map> = null; diff --git a/source/backend/Controls.hx b/source/backend/Controls.hx index 03fc2ad8..50d06574 100644 --- a/source/backend/Controls.hx +++ b/source/backend/Controls.hx @@ -81,12 +81,14 @@ class Controls public var RESET(get, never):Bool; public var TAUNT(get, never):Bool; public var SIDEBAR(get, never):Bool; + public var FAV(get, never):Bool; private function get_ACCEPT() return justPressed('accept'); private function get_BACK() return justPressed('back'); private function get_PAUSE() return justPressed('pause'); private function get_RESET() return justPressed('reset'); private function get_TAUNT() return justPressed('taunt'); private function get_SIDEBAR() return justPressed('sidebar'); + private function get_FAV() return justPressed('fav'); //Gamepad & Keyboard stuff public var keyboardBinds:Map>; diff --git a/source/online/GameClient.hx b/source/online/GameClient.hx index 4b1d4758..26e87cd2 100644 --- a/source/online/GameClient.hx +++ b/source/online/GameClient.hx @@ -196,9 +196,9 @@ class GameClient { options.set("skinURL", OnlineMods.getModURL(ClientPrefs.data.modSkin[0])); } - if (asHost) { - options.set("gameplaySettings", ClientPrefs.data.gameplaySettings); - } + // if (asHost) { + // options.set("gameplaySettings", ClientPrefs.data.gameplaySettings); + // } return options; } diff --git a/source/online/states/OnlineState.hx b/source/online/states/OnlineState.hx index 12b18c13..73b2abfd 100644 --- a/source/online/states/OnlineState.hx +++ b/source/online/states/OnlineState.hx @@ -332,6 +332,17 @@ class OnlineState extends MusicBeatState { // FlxG.openURL(GameClient.serverAddress + "/rooms"); FlxG.switchState(() -> new FindRoomState()); case "host": + var count:Float = 0; + for (mod in Mods.getModDirectories()) { + var url = OnlineMods.getModURL(mod); + if (url == null || !(url.startsWith('https://') || url.startsWith('http://'))) + count++; + } + + if (count > 0) { + Alert.alert('WARNING', count + ' of your mods doesn\'t have a valid URL set!'); + } + disableInput = true; GameClient.createRoom(GameClient.serverAddress, onRoomJoin); case "options": diff --git a/source/online/states/ResultsState.hx b/source/online/states/ResultsState.hx index d9bcc902..97703c0c 100644 --- a/source/online/states/ResultsState.hx +++ b/source/online/states/ResultsState.hx @@ -199,13 +199,13 @@ class ResultsState extends MusicBeatState { switch (GameClient.room.state.winCondition) { case 0: - winner = (getPlayer(1).score >= getPlayer(2).score ? 0 : 1); - if (getPlayer(1).score == getPlayer(2).score) - winner = -1; - case 1: winner = (p1Accuracy >= p2Accuracy ? 0 : 1); if (p1Accuracy == p2Accuracy) winner = -1; + case 1: + winner = (getPlayer(1).score >= getPlayer(2).score ? 0 : 1); + if (getPlayer(1).score == getPlayer(2).score) + winner = -1; case 2: winner = (getPlayer(1).misses <= getPlayer(2).misses ? 0 : 1); if (getPlayer(1).misses == getPlayer(2).misses) @@ -416,7 +416,7 @@ class ResultsState extends MusicBeatState { if (FlxG.keys.justPressed.F12) { trace('reloading lumod'); Lumod.cache.scripts.clear(); - luaLoad(); + lmLoad(); } if (luaValue == false) diff --git a/source/online/states/RoomState.hx b/source/online/states/RoomState.hx index 6ae78b02..63bbf6b2 100644 --- a/source/online/states/RoomState.hx +++ b/source/online/states/RoomState.hx @@ -615,7 +615,7 @@ class RoomState extends MusicBeatState { if (FlxG.keys.justPressed.F12) { trace('reloading lumod'); Lumod.cache.scripts.clear(); - luaLoad(); + lmLoad(); } if (!GameClient.isConnected()) diff --git a/source/online/states/SetupModsState.hx b/source/online/states/SetupModsState.hx index 21f4a1b6..1b2e8e79 100644 --- a/source/online/states/SetupModsState.hx +++ b/source/online/states/SetupModsState.hx @@ -151,10 +151,11 @@ class SetupModsState extends MusicBeatState { item.text = "> " + item.text + " <"; item.alpha = 1; } - if (modsInput[item.ID].startsWith("http://") || modsInput[item.ID].startsWith("https://")) - item.color = FlxColor.LIME; - else + + if (modsInput[item.ID] == null || !(modsInput[item.ID].startsWith('https://') || modsInput[item.ID].startsWith('http://'))) item.color = FlxColor.RED; + else + item.color = FlxColor.LIME; item.screenCenter(X); } } diff --git a/source/online/states/SkinsState.hx b/source/online/states/SkinsState.hx index bac30b66..9fbf2bd8 100644 --- a/source/online/states/SkinsState.hx +++ b/source/online/states/SkinsState.hx @@ -374,7 +374,7 @@ class SkinsState extends MusicBeatState { camFollow.setPosition(FlxG.width / 2, FlxG.height / 2); if (stopUpdates) { - camFollow.y += !ClientPrefs.data.lowQuality ? 800 : 200; + camFollow.y += !ClientPrefs.data.lowQuality ? 600 : 200; return; } @@ -396,6 +396,9 @@ class SkinsState extends MusicBeatState { if (controls.NOTE_RIGHT) { character.members[0].playAnim("singRIGHT"); } + if (controls.TAUNT) { + character.members[0].playAnim("taunt"); + } } } else { @@ -433,11 +436,7 @@ class SkinsState extends MusicBeatState { })); } - if (controls.BACK) { - switchState(() -> Type.createInstance(backClass, [])); - } - - if (controls.ACCEPT) { + if (!FlxG.keys.pressed.SHIFT && controls.ACCEPT) { var charName = charactersName[curCharacter]; if (charName.endsWith("-player")) charName = charName.substring(0, charName.length - "-player".length); @@ -468,6 +467,10 @@ class SkinsState extends MusicBeatState { character.members[0].playAnim("hey", true); } + if (controls.BACK || (!FlxG.keys.pressed.SHIFT && controls.ACCEPT)) { + switchState(() -> Type.createInstance(backClass, [])); + } + if (FlxG.keys.justPressed.EIGHT) { Mods.currentModDirectory = charactersMod.get(charactersName[curCharacter]); switchState(() -> new CharacterEditorState(charactersName[curCharacter], false, true)); diff --git a/source/online/substates/RoomSettingsSubstate.hx b/source/online/substates/RoomSettingsSubstate.hx index 11acad09..1ea4f45f 100644 --- a/source/online/substates/RoomSettingsSubstate.hx +++ b/source/online/substates/RoomSettingsSubstate.hx @@ -119,9 +119,9 @@ class RoomSettingsSubstate extends MusicBeatSubstate { if (GameClient.room.state.winCondition != prevCond) { switch (GameClient.room.state.winCondition) { case 0: - winCondition.descText.text = 'Player with the most Score wins!'; - case 1: winCondition.descText.text = 'Player with the highest Accuracy wins!'; + case 1: + winCondition.descText.text = 'Player with the most Score wins!'; case 2: winCondition.descText.text = 'Player with the least Misses wins!'; case 3: diff --git a/source/options/ControlsSubState.hx b/source/options/ControlsSubState.hx index c58db57e..11b9e180 100644 --- a/source/options/ControlsSubState.hx +++ b/source/options/ControlsSubState.hx @@ -35,6 +35,7 @@ class ControlsSubState extends MusicBeatSubstate [true, 'Back', 'back', 'Back'], [true, 'Pause', 'pause', 'Pause'], [true, 'Sidebar', 'sidebar', 'Sidebar'], + [true, 'Favorite', 'fav', 'Favorite'], [false], [false, 'VOLUME'], [false, 'Mute', 'volume_mute', 'Volume Mute'], diff --git a/source/options/GameplaySettingsSubState.hx b/source/options/GameplaySettingsSubState.hx index a90e9d42..98006e37 100644 --- a/source/options/GameplaySettingsSubState.hx +++ b/source/options/GameplaySettingsSubState.hx @@ -133,6 +133,12 @@ class GameplaySettingsSubState extends BaseOptionsMenu 'bool'); addOption(option); + var option:Option = new Option('Modchart Skin Changes', + 'If enabled, the song events will change the character of your active skin', + 'modchartSkinChanges', + 'bool'); + addOption(option); + super(); } diff --git a/source/options/VisualsUISubState.hx b/source/options/VisualsUISubState.hx index b827aa61..c705adc7 100644 --- a/source/options/VisualsUISubState.hx +++ b/source/options/VisualsUISubState.hx @@ -202,7 +202,7 @@ class VisualsUISubState extends BaseOptionsMenu "How should songs on Freeplay menu be group by?", 'groupSongsBy', 'string', - ['No Grouping', 'Alphabetically', 'Modpack', 'Hidden']); + ['No Grouping', 'Alphabetically', 'Modpack', 'Favorites', 'Hidden']); addOption(option); super(); diff --git a/source/states/FreeplayState.hx b/source/states/FreeplayState.hx index f36a4cb4..5ad69e65 100644 --- a/source/states/FreeplayState.hx +++ b/source/states/FreeplayState.hx @@ -34,6 +34,7 @@ import backend.WeekData; import backend.Highscore; import backend.Song; import openfl.media.Sound; +import flixel.system.FlxAssets.FlxGraphicAsset; import lime.utils.Assets; import openfl.utils.Assets as OpenFlAssets; @@ -78,6 +79,7 @@ class FreeplayState extends MusicBeatState private var grpSongs:FlxTypedGroup; private var grpIcons:FlxTypedGroup; + private var grpHearts:FlxTypedGroup; private var curPlaying:Bool = false; private var initSongs:Array = []; @@ -100,6 +102,8 @@ class FreeplayState extends MusicBeatState var selectedScore:Int = 0; static var bustSound:FlxSound; + static var favSound:FlxSound; + static var unfavSound:FlxSound; var explods:FlxTypedGroup; // var dTime:Alphabet = new Alphabet(0, 0, "0:00", false); @@ -227,6 +231,11 @@ class FreeplayState extends MusicBeatState grpIcons.cameras = [itemsCamera]; add(grpIcons); + grpHearts = new FlxTypedGroup(); + grpHearts.cameras = [itemsCamera]; + grpHearts.recycle(Heart); + add(grpHearts); + // if (!ClientPrefs.data.disableFreeplayAlphabet) randomText = new Alphabet(90, 320, "RANDOM", true); // else @@ -262,6 +271,18 @@ class FreeplayState extends MusicBeatState bustSound.persist = true; } + if (favSound == null) { + favSound = new FlxSound(); + favSound.loadEmbedded(Paths.sound('fav')); + favSound.persist = true; + } + + if (unfavSound == null) { + unfavSound = new FlxSound(); + unfavSound.loadEmbedded(Paths.sound('unfav')); + unfavSound.persist = true; + } + explods = new FlxTypedGroup(); explods.cameras = [itemsCamera]; explods.add(new Explod()); @@ -317,27 +338,36 @@ class FreeplayState extends MusicBeatState newGroup = MIX; case 'Hidden': newGroup = HIDDEN; + case 'Favorites': + newGroup = FAV; default: newGroup = NONE; } if (newGroup != searchGroup) { searchGroup = newGroup; searchGroupValue = 0; + } - switch (searchGroup) { - case ALPHABET: - searchGroupVList = ['ab', 'cd', 'ef', 'gh', 'ij', 'kl', 'mn', 'op', 'qr', 'st', 'uv', 'wx', 'yz']; - case MOD: - searchGroupVList = modList; - case MIX: - searchGroupVList = []; - case HIDDEN: - searchGroupVList = ['Hidden', 'Visible']; - default: - searchGroupVList = []; - } + switch (searchGroup) { + case ALPHABET: + searchGroupVList = ['ab', 'cd', 'ef', 'gh', 'ij', 'kl', 'mn', 'op', 'qr', 'st', 'uv', 'wx', 'yz']; + case MOD: + searchGroupVList = modList; + case MIX: + searchGroupVList = []; + case HIDDEN: + searchGroupVList = ['Hidden', 'Visible']; + case FAV: + searchGroupVList = ['Favorites', 'Not Favorited']; + default: + searchGroupVList = []; } + if (searchGroupValue < 0) + searchGroupValue = 0; + if (searchGroupValue > searchGroupVList.length - 1) + searchGroupValue = searchGroupVList.length - 1; + scoreText = new FlxText(FlxG.width * 0.7, 5, 0, "", 32); scoreText.setFormat(Paths.font("vcr.ttf"), 32, FlxColor.WHITE, RIGHT); scoreText.scrollFactor.set(); @@ -706,6 +736,24 @@ class FreeplayState extends MusicBeatState holdTime = 0; } + if (controls.FAV && curSelected != -1) { + var songId = songs[curSelected].songName + '-' + songs[curSelected].folder; + if (ClientPrefs.data.favSongs.contains(songId)) { + ClientPrefs.data.favSongs.remove(songId); + + unfavSound.volume = 1; + unfavSound.play(true); + } + else { + ClientPrefs.data.favSongs.push(songId); + + favSound.volume = 1; + favSound.play(true); + } + ClientPrefs.saveSettings(); + search(); + } + if (controls.RESET && curSelected != -1 && !FlxG.keys.pressed.ALT) { var songId = songs[curSelected].songName + '-' + songs[curSelected].folder; if (ClientPrefs.data.hiddenSongs.contains(songId)) { @@ -1498,7 +1546,7 @@ class FreeplayState extends MusicBeatState private function updateGroupTitle() { var textValue = ''; switch (searchGroup) { - case MOD, HIDDEN: + case MOD, HIDDEN, FAV: textValue = searchGroupVList[searchGroupValue] ?? ''; case ALPHABET: textValue = searchGroupVList[searchGroupValue].charAt(0).toUpperCase() + '-' + searchGroupVList[searchGroupValue].charAt(1).toUpperCase(); @@ -1716,9 +1764,13 @@ class FreeplayState extends MusicBeatState function search(?init:Bool = false) { grpIcons.clear(); grpSongs.clear(); + grpHearts.killMembers(); _lastVisibles = []; songs = []; + if (!init) + instPlaying = -1; + if (searchGroupValue < 0) searchGroupValue = searchGroupVList.length - 1; if (searchGroupValue > searchGroupVList.length - 1) @@ -1751,6 +1803,14 @@ class FreeplayState extends MusicBeatState continue; } + var isFavorited = ClientPrefs.data.favSongs.contains(song.songName + '-' + song.folder); + if (searchGroup == FAV) { + if (isFavorited && searchGroupValue == 1) + continue; + if (!isFavorited && searchGroupValue == 0) + continue; + } + if ( searchString.length < 1 || song.songName.toLowerCase().replace('-', ' ').contains(searchString.toLowerCase()) || @@ -1769,6 +1829,17 @@ class FreeplayState extends MusicBeatState grpIcons.add(arr[1]); // icon } songs.push(song); + + if (isFavorited) { + grpHearts.recycle(Heart).target = arr[1]; + } + + var diff = Difficulty.getString(curDifficulty); + var trackSuffix = diff == "Erect" || diff == "Nightmare" ? "-erect" : ""; + var track = song.songName.toLowerCase() + trackSuffix; + if (track == trackPlaying) + instPlaying = i; + i++; } } @@ -1825,7 +1896,6 @@ class FreeplayState extends MusicBeatState return; } - instPlaying = -1; changeSelection(); updateTexts(); } @@ -1906,6 +1976,7 @@ enum GroupType { MOD; MIX; HIDDEN; + FAV; } class Explod extends FlxSprite { @@ -1947,4 +2018,42 @@ class Explod extends FlxSprite { super.update(elapsed); } +} + +class Heart extends LockInSprite { + public function new(?target:FlxSprite) { + super(target, Paths.image('heart')); + } +} + +class LockInSprite extends FlxSprite { + public var target(default, set):FlxSprite; + + public function new(target:FlxSprite, ?asset:FlxGraphicAsset) { + super(0, 0, asset); + + this.target = target; + } + + override function update(elapsed) { + super.update(elapsed); + + if (target == null || !target.alive) { + kill(); + return; + } + + x = target.x; + y = target.y; + alpha = target.alpha; + scale.x = target.scale.x; + scale.y = target.scale.y; + visible = target.active && target.visible; + } + + function set_target(v:FlxSprite) { + target = v; + revive(); + return target; + } } \ No newline at end of file diff --git a/source/states/MainMenuState.hx b/source/states/MainMenuState.hx index beec58c0..ceab0ec0 100644 --- a/source/states/MainMenuState.hx +++ b/source/states/MainMenuState.hx @@ -15,6 +15,7 @@ import objects.AchievementPopup; import states.editors.MasterEditorMenu; import options.OptionsState; +@:build(lumod.LuaScriptClass.build()) class MainMenuState extends MusicBeatState { public static var psychEngineVersion:String = '0.7.1h'; // This is also used for Discord RPC @@ -40,10 +41,6 @@ class MainMenuState extends MusicBeatState public function new() { super(); - - // if (TitleState.offlineMode) { - // optionShit.remove('online'); - // } } override function create() diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 6b153e73..97b27dc8 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -272,6 +272,7 @@ class PlayState extends MusicBeatState return cpuControlled; } public var practiceMode:Bool = false; + public var noSpecialNotes:Bool = false; public var botplaySine:Float = 0; @:unreflective public var botplayTxt:FlxText; @@ -547,6 +548,7 @@ class PlayState extends MusicBeatState practiceMode = ClientPrefs.getGameplaySetting('practice'); cpuControlled = ClientPrefs.getGameplaySetting('botplay'); opponentMode = ClientPrefs.getGameplaySetting('opponentplay'); + noSpecialNotes = ClientPrefs.getGameplaySetting('nospecialnotes'); }); preloadTasks.push(() -> { @@ -1297,29 +1299,40 @@ class PlayState extends MusicBeatState public function addCharacterToList(newCharacter:String, type:Int) { switch(type) { case 0: - if (boyfriend.isSkin) + if (!ClientPrefs.data.modchartSkinChanges && boyfriend.isSkin) return; if(!boyfriendMap.exists(newCharacter)) { - var newBoyfriend:Character = new Character(0, 0, newCharacter, true); + var newBoyfriend:Character; + if (boyfriend.isSkin && newCharacter == SONG.player1) + newBoyfriend = boyfriend; + else { + newBoyfriend = new Character(0, 0, newCharacter, true); + boyfriendGroup.add(newBoyfriend); + startCharacterPos(newBoyfriend); + newBoyfriend.alpha = 0.00001; + startCharacterScripts(newBoyfriend.curCharacter); + } + boyfriendMap.set(newCharacter, newBoyfriend); - boyfriendGroup.add(newBoyfriend); - startCharacterPos(newBoyfriend); - newBoyfriend.alpha = 0.00001; - startCharacterScripts(newBoyfriend.curCharacter); } case 1: - if (dad.isSkin) + if (!ClientPrefs.data.modchartSkinChanges && dad.isSkin) return; if(!dadMap.exists(newCharacter)) { - var newDad:Character = new Character(0, 0, newCharacter); + var newDad:Character; + if (dad.isSkin && newCharacter == SONG.player2) + newDad = dad; + else { + newDad = new Character(0, 0, newCharacter); + dadGroup.add(newDad); + startCharacterPos(newDad, true); + newDad.alpha = 0.00001; + startCharacterScripts(newDad.curCharacter); + } dadMap.set(newCharacter, newDad); - dadGroup.add(newDad); - startCharacterPos(newDad, true); - newDad.alpha = 0.00001; - startCharacterScripts(newDad.curCharacter); } case 2: @@ -1992,9 +2005,11 @@ class PlayState extends MusicBeatState } } else { - gottaHitNote = songNotes[1] > maniaKeys - 1; + gottaHitNote = songNotes[1] < maniaKeys; } + if (noSpecialNotes && songNotes[3] != null) + continue; if (playsAsBF() ? gottaHitNote : !gottaHitNote && daStrumTime - lastStrumTime > 10) { playingNoteCount++; @@ -3038,7 +3053,7 @@ class PlayState extends MusicBeatState switch(charType) { case 0: - if (boyfriend.isSkin) + if (!ClientPrefs.data.modchartSkinChanges && boyfriend.isSkin) return; if(boyfriend.curCharacter != value2) { @@ -3055,7 +3070,7 @@ class PlayState extends MusicBeatState setOnScripts('boyfriendName', boyfriend.curCharacter); case 1: - if (dad.isSkin) + if (!ClientPrefs.data.modchartSkinChanges && dad.isSkin) return; if(dad.curCharacter != value2) { @@ -4380,15 +4395,15 @@ class PlayState extends MusicBeatState } super.stepHit(); - - if (!GameClient.isConnected() && swingMode && (curStep % 4 == 3)) { // here in the funkin crew we call that a functional audio resyncing algorithm - setSongTime(Conductor.songPosition + Conductor.calculateCrochet(Conductor.bpm) / 4); - } if(curStep == lastStepHit) { return; } + if (!GameClient.isConnected() && swingMode && (curStep % 4 == 3)) { // here in the funkin crew we call that a functional audio resyncing algorithm + setSongTime(Conductor.songPosition + Conductor.calculateCrochet(Conductor.bpm) / 4); + } + lastStepHit = curStep; setOnScripts('curStep', curStep); callOnScripts('onStepHit'); @@ -4893,7 +4908,7 @@ class PlayState extends MusicBeatState #end function isInvalidScore() { - return cpuControlled || controls.moodyBlues != null; + return cpuControlled || controls.moodyBlues != null || noSpecialNotes; } // MULTIPLAYER STUFF HERE diff --git a/source/states/TitleState.hx b/source/states/TitleState.hx index ed2934c3..c8e0d313 100644 --- a/source/states/TitleState.hx +++ b/source/states/TitleState.hx @@ -358,6 +358,11 @@ class TitleState extends MusicBeatState override function update(elapsed:Float) { + if (FlxG.keys.justPressed.DELETE) { + lumod.Lumod.cache.scripts.clear(); + trace("cleared lumod cache"); + } + if (FlxG.sound.music != null) Conductor.songPosition = FlxG.sound.music.time; // FlxG.watch.addQuick('amp', FlxG.sound.music.amplitude); diff --git a/source/substates/GameplayChangersSubstate.hx b/source/substates/GameplayChangersSubstate.hx index 2d55b66b..41f93e6f 100644 --- a/source/substates/GameplayChangersSubstate.hx +++ b/source/substates/GameplayChangersSubstate.hx @@ -83,6 +83,9 @@ class GameplayChangersSubstate extends MusicBeatSubstate optionsArray.push(option); } + var option:GameplayOption = new GameplayOption('No Special Notes', 'nospecialnotes', 'bool', false); + optionsArray.push(option); + GameClient.send("status", "In the Game Changers Menu"); }