diff --git a/.gitignore b/.gitignore index 80efe11..2cb7a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ APIStuff.hx BGSource/.vs vscode-project.hxml .DS_Store +haxelib.json diff --git a/Bulid.bat b/Bulid.bat new file mode 100644 index 0000000..5340c83 --- /dev/null +++ b/Bulid.bat @@ -0,0 +1,15 @@ +@echo off +title Setup - PECG +cd .. + +echo Installing dependencies, please wait... +haxelib install actuate 1.9.0 +haxelib git discord_rpc https://github.com/discord/discord-rpc +haxelib install flixel 4.11.0 +haxelib install flixel-addons 2.11.0 +haxelib install flixel-ui 2.6.1 +haxelib install hscript 2.5.0 +haxelib install hxCodec 2.5.1 +haxelib install hxcpp 4.3.2 +haxelib install lime 8.1.2 +haxelib install openfl 9.3.3 \ No newline at end of file diff --git a/mods/test/data/charts/test-settings.json b/mods/test/data/charts/test-settings.json index 3d5dd32..a6cb287 100644 --- a/mods/test/data/charts/test-settings.json +++ b/mods/test/data/charts/test-settings.json @@ -1,5 +1,6 @@ { "songCreators": "Kawai Sprite & MtH", "songHeadings": "funkinHeading", - "creditsTxt": "The testiest song on the planet" + "creditsTxt": "The testiest song on the planet", + "hasNoGf": false } \ No newline at end of file diff --git a/mods/test/scripts/test.hx b/mods/test/scripts/test.hx new file mode 100644 index 0000000..e69de29 diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index e3dc5cb..9aa67ca 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -59,7 +59,7 @@ class FreeplayState extends MusicBeatState private var InMainFreeplayState:Bool = false; private var CurrentSongIcon:FlxSprite; - var customSongs = CoolUtil.coolTextFile(TitleState.modFolder + '/data/CustomSongs.txt'); // idk should work + var customSongs:Array; private var Catagories:Array = ['dave', 'joke', 'extras', 'mod']; var translatedCatagory:Array = [LanguageManager.getTextString('freeplay_dave'), LanguageManager.getTextString('freeplay_joke'), LanguageManager.getTextString('freeplay_extra'), TitleState.currentMod]; @@ -154,6 +154,9 @@ class FreeplayState extends MusicBeatState isaCustomSong = false; rawJsonF = File.getContent(Paths.json('FreeplaySettings')); jsonF = cast Json.parse(rawJsonF); + if (FileSystem.exists(TitleState.modFolder + '/data/CustomSongs.txt')) { + customSongs = CoolUtil.coolTextFile(TitleState.modFolder + '/data/CustomSongs.txt'); // idk should work + } if (FileSystem.exists(TitleState.modFolder + '/data/FreeplaySettings.json')) { rawJsonFM = File.getContent(TitleState.modFolder + '/data/FreeplaySettings.json'); @@ -418,12 +421,14 @@ class FreeplayState extends MusicBeatState addWeek(['Enter Terminal'], 17, ['terminal']); case 'mod': addWeek(['Random'], 0, ['dave']); + if (FileSystem.exists(TitleState.modFolder + '/data/CustomSongs.txt')) { isaCustomSong = true; for (i in 0...customSongs.length) { var data:Array = customSongs[i].split(':'); addWeek([data[0]], Std.parseInt(data[1]), [data[2]]); } + } } } diff --git a/source/PlayState.hx b/source/PlayState.hx index 189afd2..20385f5 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -119,6 +119,10 @@ typedef Settings = var songCreators:String; var songHeadings:String; var creditsTxt:String; + var hasNoGf:Bool; + var intro:String; + var windowName:String; + var healthDrain:String; } class PlayState extends MusicBeatState @@ -831,10 +835,10 @@ class PlayState extends MusicBeatState } } var gfVersion:String = 'gf'; - var noGFSongs = ['memory', 'five-nights', 'bot-trot', 'escape-from-california', 'overdrive']; - trace(funnyFloatyBoys); - trace('this this false right?: ' + CharacterSelectState.inCS); + if (jsonSettings.hasNoGf) { + noGFSongs.push(SONG.song.toLowerCase()); + } if(SONG.gf != null) { gfVersion = SONG.gf; @@ -2396,7 +2400,11 @@ class PlayState extends MusicBeatState case 'overdrive': soundAssetsAlt = introSoundAssets.get('overdriving'); default: + if (jsonSettings.intro == '' || jsonSettings.intro == null) { soundAssetsAlt = introSoundAssets.get('default'); + } else { + soundAssetsAlt = introSoundAssets.get(jsonSettings.intro); + } } var introAlts:Array = introAssets.get('default');