Skip to content

Commit

Permalink
Build.dat and unfinished code lol
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLikesKirby committed Jun 1, 2024
1 parent 2feb5e0 commit 86e99d9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ APIStuff.hx
BGSource/.vs
vscode-project.hxml
.DS_Store
haxelib.json
15 changes: 15 additions & 0 deletions Bulid.bat
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion mods/test/data/charts/test-settings.json
Original file line number Diff line number Diff line change
@@ -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
}
Empty file added mods/test/scripts/test.hx
Empty file.
7 changes: 6 additions & 1 deletion source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>;

private var Catagories:Array<String> = ['dave', 'joke', 'extras', 'mod'];
var translatedCatagory:Array<String> = [LanguageManager.getTextString('freeplay_dave'), LanguageManager.getTextString('freeplay_joke'), LanguageManager.getTextString('freeplay_extra'), TitleState.currentMod];
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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<String> = customSongs[i].split(':');
addWeek([data[0]], Std.parseInt(data[1]), [data[2]]);
}
}
}
}

Expand Down
14 changes: 11 additions & 3 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> = introAssets.get('default');
Expand Down

0 comments on commit 86e99d9

Please sign in to comment.