From 3fe28602d3dd4eb7a789df474752e036fda73acf Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 2 Aug 2021 14:11:43 -0400 Subject: [PATCH] chart shit cooler (hashlink saving workaround) --- source/ChartingState.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 7cce329f9..20bfa51ed 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1082,6 +1082,10 @@ class ChartingState extends MusicBeatState var data:String = Json.stringify(json); + #if hl + var filename = _song.song.toLowerCase(); + sys.io.File.saveContent('./$filename.json', data); + #else if ((data != null) && (data.length > 0)) { _file = new FileReference(); @@ -1090,6 +1094,7 @@ class ChartingState extends MusicBeatState _file.addEventListener(IOErrorEvent.IO_ERROR, onSaveError); _file.save(data.trim(), _song.song.toLowerCase() + ".json"); } + #end } function onSaveComplete(_):Void