LimboUtility

Inherits:

Helper functions for LimboAI.

Methods

String

decorate_output_var ( String variable ) const

String

decorate_var ( String variable ) const

String

get_check_operator_string ( CheckType check ) const

String

get_operation_string ( Operation operation ) const

String

get_status_name ( int status ) const

Texture2D

get_task_icon ( String class_or_script_path ) const

bool

perform_check ( CheckType check, Variant a, Variant b )

Variant

perform_operation ( Operation operation, Variant a, Variant b )


Enumerations

enum CheckType:

CheckType CHECK_EQUAL = 0

Equality Check.

CheckType CHECK_LESS_THAN = 1

Less Than Check.

CheckType CHECK_LESS_THAN_OR_EQUAL = 2

Less Than or Equal To Check.

CheckType CHECK_GREATER_THAN = 3

Greater Than Check.

CheckType CHECK_GREATER_THAN_OR_EQUAL = 4

Greater Than or Equal To Check

CheckType CHECK_NOT_EQUAL = 5

Inequality Check.


enum Operation:

Operation OPERATION_NONE = 0

No operation.

Operation OPERATION_ADDITION = 1

Arithmetic addition.

Operation OPERATION_SUBTRACTION = 2

Arithmetic subtraction.

Operation OPERATION_MULTIPLICATION = 3

Arithmetic multiplication.

Operation OPERATION_DIVISION = 4

Arithmetic division.

Operation OPERATION_MODULO = 5

Produces the remainder of an integer division.

Operation OPERATION_POWER = 6

Multiply a by itself b times.

Operation OPERATION_BIT_SHIFT_LEFT = 7

Bitwise left shift.

Operation OPERATION_BIT_SHIFT_RIGHT = 8

Bitwise right shift.

Operation OPERATION_BIT_AND = 9

Bitwise AND.

Operation OPERATION_BIT_OR = 10

Bitwise OR.

Operation OPERATION_BIT_XOR = 11

Bitwise XOR.


Method Descriptions

String decorate_output_var ( String variable ) const

Just like decorate_var, produces a string with a Blackboard variable name that is formatted for display, and also adds an additional symbol to indicate that the variable is used as an output.


String decorate_var ( String variable ) const

Produces a string with a Blackboard variable name that is formatted for display or console output.


String get_check_operator_string ( CheckType check ) const

Returns an operator string for a CheckType enum value. For example, CHECK_EQUAL returns “==”.


String get_operation_string ( Operation operation ) const

Returns a string representation of an Operation enum value.


String get_status_name ( int status ) const

Returns a name of a BTTask status code.


Texture2D get_task_icon ( String class_or_script_path ) const

Returns the icon texture associated with a task based on its class name or script resource path.


bool perform_check ( CheckType check, Variant a, Variant b )

Performs a check on two values, a and b, and returns true if the check passes.


Variant perform_operation ( Operation operation, Variant a, Variant b )

Performs an operation on two values, a and b, and returns the result.