Logic node structure. Logic nodes are described in detail in Logic nodes article.

Fields

read only checks:Array<{value:Int, type:String, operator:String, name:String}>

Logic node checks.

read only hasTimeout:Bool

If set to true, node has timeout until completion.

read only hasTimer:Bool

If set to true, node has completion timer.

read only id:Int

Logic node ID.

read only isVisible:Bool

If true, this node should be visible to the players.

read only locale:LocaleMap<{note:String, name:String}>

Localization map.

read only name:String

Logic node name.

read only note:String

Logic node description.

read only requires:Array<{type:String}>

Logic node requirements.

read only results:Array<{type:String, stringID:String, onFail:Bool, nodeID:Int, itemID:Int, custom:Dynamic}>

Logic node results.

read only stringID:String

Logic node string ID.

timeoutValue:Int

Timeout value (in seconds).

timerValue:Int

Timer value (in seconds).

read only tree:LogicTreeCore

Logic tree.

read only treeID:Int

Logic tree ID.

read only vars:Array<_LogicVariable>

Logic node parameters.

Methods

dump (logic:UserLogicCore, lang:String):Dynamic

Stores node info into an anonymous object for client response.

Returns:

Anonymous object with node parameters.

getMax (name:String):Int

Returns maximum value for node variable.

Parameters:

name

Variable name.

Returns:

Maximum variable value.

getVar (name:String):_LogicVariable

Returns node variable by its name.

Parameters:

name

Variable name.

type

Variable type.

Returns:

Variable value. Returns null, if this variable is not found.

hasCheck (name:String):Bool

Returns true, if this node has a completion check with a given name.

Parameters:

name

Completion check name.

Returns:

True, if this node has this completion check. False otherwise.

hasVar (name:String, ?type:String):Bool

Returns true, if this node has a variable with given name and type.

Parameters:

name

Variable name.

type

(optional) Variable type.

Returns:

True, if this node has this variable. False otherwise.