diff --git a/libs.xml b/libs.xml
index 3f33c203..556b6b41 100644
--- a/libs.xml
+++ b/libs.xml
@@ -37,7 +37,7 @@
cd tools
haxe tools.hxml
- cd ..s
+ cd ..
diff --git a/project.xml b/project.xml
index 232f6159..26c15e0c 100644
--- a/project.xml
+++ b/project.xml
@@ -157,8 +157,6 @@
-
-
@@ -197,4 +195,8 @@
+
+
+
+
diff --git a/source/funkin/backend/MusicBeatState.hx b/source/funkin/backend/MusicBeatState.hx
index e519ed0e..35dbfd04 100644
--- a/source/funkin/backend/MusicBeatState.hx
+++ b/source/funkin/backend/MusicBeatState.hx
@@ -127,7 +127,9 @@ class MusicBeatState extends FlxState implements IBeatReceiver
script.load();
}
}
+ #if EXPERMENTAL_SCRIPT_RELOADING
else stateScripts.reload();
+ #end
}
}
@@ -182,9 +184,11 @@ class MusicBeatState extends FlxState implements IBeatReceiver
override function update(elapsed:Float)
{
// TODO: DEBUG MODE!!
+ #if EXPERMENTAL_SCRIPT_RELOADING
if (FlxG.keys.justPressed.F5) {
loadScript();
}
+ #end
call("update", [elapsed]);
super.update(elapsed);
diff --git a/source/funkin/backend/MusicBeatSubstate.hx b/source/funkin/backend/MusicBeatSubstate.hx
index d8ee8076..e571d32a 100644
--- a/source/funkin/backend/MusicBeatSubstate.hx
+++ b/source/funkin/backend/MusicBeatSubstate.hx
@@ -114,7 +114,9 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver
script.load();
}
}
+ #if EXPERMENTAL_SCRIPT_RELOADING
else stateScripts.reload();
+ #end
}
}
@@ -171,10 +173,12 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver
override function update(elapsed:Float)
{
+ #if EXPERMENTAL_SCRIPT_RELOADING
// TODO: DEBUG MODE!!
if (FlxG.keys.justPressed.F5) {
loadScript();
}
+ #end
call("update", [elapsed]);
super.update(elapsed);
}
diff --git a/source/funkin/backend/scripting/GlobalScript.hx b/source/funkin/backend/scripting/GlobalScript.hx
index d2d9323f..c9b49ad8 100644
--- a/source/funkin/backend/scripting/GlobalScript.hx
+++ b/source/funkin/backend/scripting/GlobalScript.hx
@@ -42,6 +42,7 @@ class GlobalScript {
});
FlxG.signals.postUpdate.add(function() {
call("postUpdate", [FlxG.elapsed]);
+ #if EXPERMENTAL_SCRIPT_RELOADING
if (FlxG.keys.justPressed.F5) {
if (scripts.scripts.length > 0) {
Logs.trace('Reloading global script...', WARNING, YELLOW);
@@ -52,6 +53,7 @@ class GlobalScript {
onModSwitch(#if MOD_SUPPORT ModsFolder.currentModFolder #else null #end);
}
}
+ #end
if (FlxG.keys.justPressed.F2)
NativeAPI.allocConsole();
});
diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx
index 12e0189f..046f45f9 100644
--- a/source/funkin/game/PlayState.hx
+++ b/source/funkin/game/PlayState.hx
@@ -1237,11 +1237,13 @@ class PlayState extends MusicBeatState
if (chartingMode && FlxG.keys.justPressed.SEVEN) {
FlxG.switchState(new funkin.editors.charter.Charter(SONG.meta.name, difficulty, false));
}
+ #if EXPERMENTAL_SCRIPT_RELOADING
if (FlxG.keys.justPressed.F5) {
Logs.trace('[PlayState] Reloading scripts...', WARNING, YELLOW);
scripts.reload();
Logs.trace('[PlayState] Song scripts successfully reloaded.', WARNING, GREEN);
}
+ #end
}
if (doIconBop) {