diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index cf0434d4..287b4a44 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -11,7 +11,7 @@ import flixel.input.keyboard.FlxKey; import funkin.game.Character; class CharacterEditor extends UIState { - var __character:String; + static var __character:String; public var character:Character; public var ghosts:CharacterGhostsHandler; @@ -45,7 +45,7 @@ class CharacterEditor extends UIState { public function new(character:String) { super(); - __character = character; + if (character != null) __character = character; } public override function create() { diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 5ab87d09..3d125f6a 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -20,9 +20,9 @@ import funkin.editors.ui.UIState; import openfl.net.FileReference; class Charter extends UIState { - var __song:String; - var __diff:String; - var __reload:Bool; + static var __song:String; + static var __diff:String; + static var __reload:Bool; var chart(get, null):ChartData; private function get_chart() @@ -86,9 +86,11 @@ class Charter extends UIState { public function new(song:String, diff:String, reload:Bool = true) { super(); - __song = song; - __diff = diff; - __reload = reload; + if (song != null) { + __song = song; + __diff = diff; + __reload = reload; + } } public override function create() { @@ -230,7 +232,7 @@ class Charter extends UIState { onSelect: _note_selectall }, { - label: "Select maeasure", + label: "Select measure", keybind: [CONTROL, SHIFT, A], onSelect: _note_selectmeasure }, diff --git a/source/funkin/game/NoteGroup.hx b/source/funkin/game/NoteGroup.hx index dc066ea4..ca617eec 100644 --- a/source/funkin/game/NoteGroup.hx +++ b/source/funkin/game/NoteGroup.hx @@ -8,6 +8,11 @@ class NoteGroup extends FlxTypedGroup { var i:Int = 0; var __currentlyLooping:Bool = false; + /** + * How many ms it should show a note before it should be hit + **/ + public var limit:Float = 1500; + /** * Preallocates the members array with nulls, but if theres anything in the array already it clears it **/ @@ -36,7 +41,7 @@ class NoteGroup extends FlxTypedGroup { if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.active) { continue; } - if (__loopSprite.strumTime - Conductor.songPosition > 1500) + if (__loopSprite.strumTime - Conductor.songPosition > limit) break; __loopSprite.update(elapsed); } @@ -55,7 +60,7 @@ class NoteGroup extends FlxTypedGroup { __loopSprite = members[i--]; if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.visible) continue; - if (__loopSprite.strumTime - Conductor.songPosition > 1500) break; + if (__loopSprite.strumTime - Conductor.songPosition > limit) break; __loopSprite.draw(); } __currentlyLooping = oldCur; @@ -74,7 +79,7 @@ class NoteGroup extends FlxTypedGroup { __loopSprite = members[i--]; if (__loopSprite == null || !__loopSprite.exists) continue; - if (__loopSprite.strumTime - Conductor.songPosition > 1500) break; + if (__loopSprite.strumTime - Conductor.songPosition > limit) break; noteFunc(__loopSprite); } __currentlyLooping = oldCur; diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 2629e7ca..fbf8dba8 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -565,8 +565,8 @@ class PlayState extends MusicBeatState for(folder in scriptsFolders) { for(file in Paths.getFolderContent(folder, true, fromMods ? MODS : BOTH)) { if (folder == 'data/charts/') - Logs.trace('data/charts/ is deprecrated and will be removed in the future. Please move script $file.hx to songs/', WARNING, DARKYELLOW); - + Logs.trace('data/charts/ is deprecrated and will be removed in the future. Please move script $file to songs/', WARNING, DARKYELLOW); + addScript(file); } }