scriptable class changes
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
package funkin.graphics;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a FunkinSprite.
|
||||
* Create a scripted class that extends FunkinSprite to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedFunkinSprite extends funkin.graphics.FunkinSprite implements HScriptedClass {}
|
||||
class ScriptedFunkinSprite extends funkin.graphics.FunkinSprite implements polymod.hscript.HScriptedClass {}
|
||||
@@ -260,6 +260,11 @@ class PolymodHandler
|
||||
Polymod.addImportAlias('lime.utils.Assets', funkin.Assets);
|
||||
Polymod.addImportAlias('openfl.utils.Assets', funkin.Assets);
|
||||
|
||||
// Backward compatibility for certain scripted classes outside `funkin.modding.base`.
|
||||
Polymod.addImportAlias('funkin.modding.base.ScriptedFunkinSprite', funkin.graphics.ScriptedFunkinSprite);
|
||||
Polymod.addImportAlias('funkin.modding.base.ScriptedMusicBeatState', funkin.ui.ScriptedMusicBeatState);
|
||||
Polymod.addImportAlias('funkin.modding.base.ScriptedMusicBeatSubState', funkin.ui.ScriptedMusicBeatSubState);
|
||||
|
||||
// `funkin.util.FileUtil` has unrestricted access to the file system.
|
||||
Polymod.addImportAlias('funkin.util.FileUtil', funkin.util.FileUtilSandboxed);
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package funkin.modding.base;
|
||||
|
||||
/**
|
||||
* An empty base class meant to be extended by scripts.
|
||||
*/
|
||||
|
||||
class Object {
|
||||
public function new() {}
|
||||
|
||||
public function toString():String {
|
||||
return "(Object)";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
|
||||
/**
|
||||
* A script that can be tied to an FlxBasic.
|
||||
* Create a scripted class that extends FlxBasic to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedFlxBasic extends flixel.FlxBasic implements HScriptedClass {}
|
||||
@@ -0,0 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
|
||||
/**
|
||||
* A script that can be tied to an FlxObject.
|
||||
* Create a scripted class that extends FlxObject to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedFlxObject extends flixel.FlxObject implements HScriptedClass {}
|
||||
@@ -0,0 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
|
||||
/**
|
||||
* A script that can be tied to an Object (empty base class).
|
||||
* Create a scripted class that extends Object to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedObject extends funkin.modding.base.Object implements HScriptedClass {}
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
package funkin.ui;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a MusicBeatState.
|
||||
* Create a scripted class that extends MusicBeatState to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedMusicBeatState extends funkin.ui.MusicBeatState implements HScriptedClass {}
|
||||
class ScriptedMusicBeatState extends funkin.ui.MusicBeatState implements polymod.hscript.HScriptedClass {}
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package funkin.modding.base;
|
||||
package funkin.ui;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a MusicBeatSubState.
|
||||
* Create a scripted class that extends MusicBeatSubState to use this.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedMusicBeatSubState extends funkin.ui.MusicBeatSubState implements HScriptedClass {}
|
||||
class ScriptedMusicBeatSubState extends funkin.ui.MusicBeatSubState implements polymod.hscript.HScriptedClass {}
|
||||
Reference in New Issue
Block a user