From 15a18bb3daf21c920266afee968e55e0325458ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=8D=9A=7ENex?=
<87421482+NexIsDumb@users.noreply.github.com>
Date: Wed, 18 Sep 2024 16:10:19 +0200
Subject: [PATCH] importable scripts through stage.xml + new call
extensions feature
---
assets/data/scripts/pixel.hx | 1 +
assets/data/stages/school-evil.hx | 1 -
assets/data/stages/school-evil.xml | 1 +
assets/data/stages/school.hx | 2 +-
assets/data/stages/school.xml | 2 ++
source/funkin/game/Stage.hx | 36 ++++++++++++++++++++++++++----
6 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/assets/data/scripts/pixel.hx b/assets/data/scripts/pixel.hx
index 48dfb279..8f1887c8 100644
--- a/assets/data/scripts/pixel.hx
+++ b/assets/data/scripts/pixel.hx
@@ -1,3 +1,4 @@
+//
import funkin.game.HudCamera;
import funkin.backend.scripting.events.NoteHitEvent;
diff --git a/assets/data/stages/school-evil.hx b/assets/data/stages/school-evil.hx
index af086dab..c29dbeea 100644
--- a/assets/data/stages/school-evil.hx
+++ b/assets/data/stages/school-evil.hx
@@ -1,5 +1,4 @@
function create() {
- importScript("data/scripts/pixel");
isSpooky = true;
// Make transition work between school types
diff --git a/assets/data/stages/school-evil.xml b/assets/data/stages/school-evil.xml
index 568b3aad..48ee14b7 100644
--- a/assets/data/stages/school-evil.xml
+++ b/assets/data/stages/school-evil.xml
@@ -1,5 +1,6 @@
+
\ No newline at end of file
diff --git a/assets/data/stages/school.hx b/assets/data/stages/school.hx
index 5cba9421..dc55a69d 100644
--- a/assets/data/stages/school.hx
+++ b/assets/data/stages/school.hx
@@ -1,5 +1,5 @@
+//
function create() {
- importScript("data/scripts/pixel");
if (PlayState.SONG.meta.name.toLowerCase() == "roses") {
bgGirls.animation.remove("danceLeft");
bgGirls.animation.remove("danceRight");
diff --git a/assets/data/stages/school.xml b/assets/data/stages/school.xml
index dabf463b..7a2740ad 100644
--- a/assets/data/stages/school.xml
+++ b/assets/data/stages/school.xml
@@ -1,5 +1,7 @@
+
+
diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx
index af36d445..10168945 100644
--- a/source/funkin/game/Stage.hx
+++ b/source/funkin/game/Stage.hx
@@ -6,6 +6,7 @@ import flixel.math.FlxPoint;
import flixel.FlxState;
import haxe.xml.Access;
import funkin.backend.system.interfaces.IBeatReceiver;
+import funkin.backend.scripting.DummyScript;
import funkin.backend.scripting.Script;
import haxe.io.Path;
@@ -18,6 +19,7 @@ class Stage extends FlxBasic implements IBeatReceiver {
public var stageScript:Script;
public var state:FlxState;
public var characterPoses:Map = [];
+ public var xmlImportedScripts:Map