From 5552231c02b15187b97ff8ce1a6e1dd81809bc61 Mon Sep 17 00:00:00 2001 From: Crow <45212377+crowplexus@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:22:41 -0400 Subject: [PATCH] iris has imports built-in now lol --- source/forever/core/scripting/HScript.hx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/source/forever/core/scripting/HScript.hx b/source/forever/core/scripting/HScript.hx index 8cca07f..5131402 100644 --- a/source/forever/core/scripting/HScript.hx +++ b/source/forever/core/scripting/HScript.hx @@ -10,8 +10,6 @@ import forever.tools.Paths.LocalPaths; @:build(forever.macros.StubMacro.build()) #end class HScript #if SCRIPTING extends Iris #end { - public var imports:StringMap = new StringMap(); - var localPath:String = null; public function new(file:String, ?localPath:String = null):Void { @@ -22,17 +20,6 @@ class HScript #if SCRIPTING extends Iris #end { override function preset():Void { super.preset(); - // temporary until we have imports in Iris - set("import", (name:String, ?as:String = null) -> { - var className = as ?? name.split(".").last(); - if (exists(className)) - return; - - var cls:Dynamic = (cast Type.resolveClass(name)) ?? (cast Type.resolveEnum(name)); - imports.set(className, cls); - set(className, cls); - // trace(imports); - }); set("closeScript", () -> { this.destroy(); cast(FlxG.state, funkin.states.base.FNFState).validCheck();