From f935fa0aecd5130b01bc639800474e4f160e9160 Mon Sep 17 00:00:00 2001 From: swordcube <49110074+swordcube@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:22:38 -0500 Subject: [PATCH 1/4] Fix chart saving on Linux/Mac --- source/funkin/backend/chart/Chart.hx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index fe20fd95..70ee87c7 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -176,11 +176,12 @@ class Chart { var meta = filteredChart.meta; #if sys - if (!FileSystem.exists('${songFolderPath}\\charts\\')) - FileSystem.createDirectory('${songFolderPath}\\charts\\'); + var sep:String = #if windows "\\" #else "/" #end; /** \\ doesn't work correctly on linux!! remember!! windows and linux are different doofy!! **/ + if (!FileSystem.exists('${songFolderPath}${sep}charts${sep}')) + FileSystem.createDirectory('${songFolderPath}${sep}charts${sep}'); - var chartPath = '${songFolderPath}\\charts\\${difficulty.trim()}.json'; - var metaPath = '${songFolderPath}\\meta.json'; + var chartPath = '${songFolderPath}${sep}charts${sep}${difficulty.trim()}.json'; + var metaPath = '${songFolderPath}${sep}meta.json'; File.saveContent(chartPath, Json.stringify(filteredChart, null, saveSettings.prettyPrint == true ? "\t" : null)); @@ -216,4 +217,4 @@ typedef ChartSaveSettings = { var ?overrideExistingMeta:Bool; var ?saveMetaInChart:Bool; var ?prettyPrint:Bool; -} \ No newline at end of file +} From cd43f7100768faa7a7323fbb9f476b9580876ced Mon Sep 17 00:00:00 2001 From: swordcube <49110074+swordcube@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:33:03 -0500 Subject: [PATCH 2/4] No need for back slashes actually!! --- source/funkin/backend/chart/Chart.hx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index 70ee87c7..e8692241 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -176,12 +176,11 @@ class Chart { var meta = filteredChart.meta; #if sys - var sep:String = #if windows "\\" #else "/" #end; /** \\ doesn't work correctly on linux!! remember!! windows and linux are different doofy!! **/ - if (!FileSystem.exists('${songFolderPath}${sep}charts${sep}')) - FileSystem.createDirectory('${songFolderPath}${sep}charts${sep}'); + if (!FileSystem.exists('${songFolderPath}/charts/')) + FileSystem.createDirectory('${songFolderPath}/charts/'); - var chartPath = '${songFolderPath}${sep}charts${sep}${difficulty.trim()}.json'; - var metaPath = '${songFolderPath}${sep}meta.json'; + var chartPath = '${songFolderPath}/charts/${difficulty.trim()}.json'; + var metaPath = '${songFolderPath}/meta.json'; File.saveContent(chartPath, Json.stringify(filteredChart, null, saveSettings.prettyPrint == true ? "\t" : null)); From 71a01e25663a013b18ced0bd2d3ef7509581abcf Mon Sep 17 00:00:00 2001 From: swordcube <49110074+swordcube@users.noreply.github.com> Date: Wed, 21 Jun 2023 03:41:47 -0500 Subject: [PATCH 3/4] Support both gf and gfVersion in charts --- source/funkin/backend/chart/BaseGameParser.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/backend/chart/BaseGameParser.hx b/source/funkin/backend/chart/BaseGameParser.hx index a8b31b87..bbf995c2 100644 --- a/source/funkin/backend/chart/BaseGameParser.hx +++ b/source/funkin/backend/chart/BaseGameParser.hx @@ -28,7 +28,7 @@ class BaseGameParser { }); if (!p2isGF && data.gf != "none") { result.strumLines.push({ - characters: [data.gf != null ? data.gf : "gf"], + characters: [data.gf != null ? data.gf : (data.gfVersion != null ? data.gfVersion : "gf")], type: 2, position: "girlfriend", notes: [], @@ -129,4 +129,4 @@ typedef SwagSection = var changeBPM:Bool; var altAnim:Bool; @:optional var camTarget:Null; -} \ No newline at end of file +} From 0a39c2c358830f62f482c66956bb4dabe8894f60 Mon Sep 17 00:00:00 2001 From: swordcube <49110074+swordcube@users.noreply.github.com> Date: Wed, 21 Jun 2023 03:49:00 -0500 Subject: [PATCH 4/4] Fuck --- source/funkin/backend/chart/BaseGameParser.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/source/funkin/backend/chart/BaseGameParser.hx b/source/funkin/backend/chart/BaseGameParser.hx index bbf995c2..d8ab91d6 100644 --- a/source/funkin/backend/chart/BaseGameParser.hx +++ b/source/funkin/backend/chart/BaseGameParser.hx @@ -112,6 +112,7 @@ typedef SwagSong = var player1:String; var player2:String; var gf:String; + var gfVersion:String; var validScore:Bool; // ADDITIONAL STUFF THAT MAY NOT BE PRESENT IN CHART