diff --git a/source/funkin/modding/module/ModuleHandler.hx b/source/funkin/modding/module/ModuleHandler.hx index 20bd6425c..28866c3f5 100644 --- a/source/funkin/modding/module/ModuleHandler.hx +++ b/source/funkin/modding/module/ModuleHandler.hx @@ -1,5 +1,6 @@ package funkin.modding.module; +import funkin.util.SortUtil; import funkin.modding.events.ScriptEvent.UpdateScriptEvent; import funkin.modding.events.ScriptEvent; import funkin.modding.events.ScriptEventDispatcher; @@ -76,8 +77,7 @@ class ModuleHandler } else { - // Sort alphabetically. Yes that's how this works. - return a > b ? 1 : -1; + return SortUtil.alphabetical(a, b); } }); } diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index bdf7ef591..5cf49f090 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -586,7 +586,7 @@ class BaseCharacter extends Bopper public override function playAnimation(name:String, restart:Bool = false, ?ignoreOther:Bool = false, ?reversed:Bool = false):Void { FlxG.watch.addQuick('playAnim(${characterName})', name); - trace('playAnim(${characterName}): ${name}'); + // trace('playAnim(${characterName}): ${name}'); super.playAnimation(name, restart, ignoreOther, reversed); } } diff --git a/source/funkin/util/SortUtil.hx b/source/funkin/util/SortUtil.hx index 60b522744..d6ffb3225 100644 --- a/source/funkin/util/SortUtil.hx +++ b/source/funkin/util/SortUtil.hx @@ -26,4 +26,13 @@ class SortUtil { return FlxSort.byValues(order, a.data.strumTime, b.data.strumTime); } + + /** + * Sort predicate for sorting strings alphabetically. + */ + public static function alphabetical(a:String, b:String):Int + { + // Sort alphabetically. Yes that's how this works. + return a > b ? 1 : -1; + } }