-
Notifications
You must be signed in to change notification settings - Fork 3
Settings
ashley edited this page Aug 7, 2026
·
1 revision
HscriptInsanity has a little utility class called
that allows you to configure certain behaviors with Hscript!
-
interpClassdefines the default interpreter class used on all scripts, modules and scripted instances. This is useful if you desire to have custom behavior within the interpreter. -
preprocessorValuesis a map containing variables you can check during conditional compilation (i.e.#if #else #end). This contains all of the values defined by the Haxe compiler by default, plus an "insanity" define to know this library is being used. -
globalVariablesis a map that contains variables to include in every script. By default, only the constantstrue,falseandnullare set. -
globalImportsis a map that contains classes to import in the interpreter by default. It uses a string key for the path to the class or package, with an enum as value for the import mode ...By default, all bottom level modules are imported (IAll // imports every module within the package, similarly to Haxe's wildcard INormal // imports the module and every sub-type within it IAsName(alias:String) // imports the class with the specified alias
'' => IAll) -
typeProxyis a map that serves to redirect a class to another. This can be specially useful if you need to use sandboxed versions of classes to prevent jailbreaking.
By default, the classesStd,TypeandReflectare redirected toInsanityStd,InsanityTypeandInsanityReflectrespectively, that allow the library's scripting to interact properly with certain cases. -
blacklistallows you to assign class or package paths to completely block in scripts. The map contains four blacklist modes with an array you can append to...Nothing is blacklisted by default!ByPackage(false) // blacklists all types in the specified packages, excluding sub-packages ByPackage(true) // blacklists all types in the specified packages AND their sub-packages (recursive) ByModule // blacklists the specified modules and all types within them ByType // blacklists only specific types
HscriptInsanity by emi3