Skip to content

Commit

Permalink
iris has imports built-in now lol
Browse files Browse the repository at this point in the history
  • Loading branch information
crowplexus committed Dec 2, 2023
1 parent 593635f commit 5552231
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions source/forever/core/scripting/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Dynamic> = new StringMap<Dynamic>();

var localPath:String = null;

public function new(file:String, ?localPath:String = null):Void {
Expand All @@ -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();
Expand Down

0 comments on commit 5552231

Please sign in to comment.