Codename LogoCodename Logo

funkin.backend.scripting.ScriptPack

APIWiki

Constructor

View in GitHub

new(name:String)

Variables

@:value([])additionalDefaultVariables:Map<String, Dynamic> = []

@:value(null)parent:Dynamic = null

@:value([])publicVariables:Map<String, Dynamic> = []

@:value([])scripts:Array<Script> = []

Methods

View in GitHub

contains(path:String):Bool

View in GitHub

inlineevent<T>(func:String, event:T):T

Sends an event to every single script, and returns the event.

Parameters:

func

Function to call

event

Event (will be the first parameter of the function)

Returns:

(modified by scripts)

View in GitHub

insert(pos:Int, script:Script):Void

Inherited Variables

Defined by Script

extension:String

Script Extension

fileName:String

Script name (with extension)

@:value(null)path:String = null

Path to the script.

@:value([])remappedNames:Map<String, String> = []

Inherited Methods

Defined by Script

View in GitHub

error(text:String, ?additionalInfo:Dynamic):Void

Shows an error from this script.

Parameters:

text

Text of the error (ex: Null Object Reference).

additionalInfo

Additional information you could provide.

View in GitHub

loadFromString(code:String):Script

Loads the code from a string, doesnt really work after the script has been loaded

Parameters:

code

The code.

View in GitHub

setPublicMap(map:Map<String, Dynamic>):Void

HSCRIPT ONLY FOR NOW Sets the "public" variables map for ScriptPack

View in GitHub

trace(v:Dynamic):Void

Traces something as this script.