LimboUtility

Inherits:

Helper functions for LimboAI.

Methods

String

decorate_output_var(variable: String) const

String

decorate_var(variable: String) const

String

get_check_operator_string(check: CheckType) const

String

get_operation_string(operation: Operation) const

String

get_status_name(status: int) const

Texture2D

get_task_icon(class_or_script_path: String) const

bool

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

Variant

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


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(variable: String) 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(variable: String) const 🔗

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


String get_check_operator_string(check: CheckType) 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(status: int) const 🔗

Returns a name of a BTTask status code.


Texture2D get_task_icon(class_or_script_path: String) const 🔗

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


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

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


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

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