From 3e1146aadf90cc84ddd38bb3f02da8133b6f9862 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 7 Nov 2023 18:32:00 -0500 Subject: [PATCH] Fix bug where getDirection didn't work in scripts. --- assets | 2 +- source/funkin/data/song/SongData.hx | 32 ++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/assets b/assets index e634c8f50..5d5a860af 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit e634c8f50c34845097283e0f411e1f89409e1498 +Subproject commit 5d5a860af517ef0cf2aa39c537eb228c7ae803d0 diff --git a/source/funkin/data/song/SongData.hx b/source/funkin/data/song/SongData.hx index 783f52a64..29ca28036 100644 --- a/source/funkin/data/song/SongData.hx +++ b/source/funkin/data/song/SongData.hx @@ -658,6 +658,22 @@ class SongNoteDataRaw this.kind = kind; } + /** + * The direction of the note, if applicable. + * Strips the strumline index from the data. + * + * 0 = left, 1 = down, 2 = up, 3 = right + */ + public inline function getDirection(strumlineSize:Int = 4):Int + { + return this.data % strumlineSize; + } + + public function getDirectionName(strumlineSize:Int = 4):String + { + return SongNoteData.buildDirectionName(this.data, strumlineSize); + } + @:jignored var _stepTime:Null = null; @@ -714,22 +730,6 @@ abstract SongNoteData(SongNoteDataRaw) from SongNoteDataRaw to SongNoteDataRaw this = new SongNoteDataRaw(time, data, length, kind); } - /** - * The direction of the note, if applicable. - * Strips the strumline index from the data. - * - * 0 = left, 1 = down, 2 = up, 3 = right - */ - public inline function getDirection(strumlineSize:Int = 4):Int - { - return this.data % strumlineSize; - } - - public function getDirectionName(strumlineSize:Int = 4):String - { - return SongNoteData.buildDirectionName(this.data, strumlineSize); - } - public static function buildDirectionName(data:Int, strumlineSize:Int = 4):String { switch (data % strumlineSize)