Skip to content
Kriptel edited this page Dec 30, 2024 · 1 revision

Abstracts in script

In the any classpath you can add RuleScriptAbstracts.txt (or define rulescript_abstracts_file_path value) file.

Enter the type path of abstracts there.

Example:

RuleScriptAbstracts.txt

test.HelloWorldAbstract.LocalAbstract
test.HelloWorldAbstract
TestAbstract

Meta

@:alias(path:String,?fullPath:Bool = false)

Sets a different type path for the abstract in scripts.

Example:

Source

packagetest.TestAbstract;
@:alias('hello.TestAbstract', true)
abstractTestAbstract(Test) fromTesttoTest
{
publicstaticinlinevarhelloworld:Int=1;
}

Script:

hello.TestAbstract.helloworld; // 1

@:ignoreField

Ignores field.

Example:

Source

abstractTestAbstract(Test) fromTesttoTest
{
@:ignoreFieldpublicstaticinlinevarhelloworld:Int=1;
}

Clone this wiki locally