Files
gymkhana-actions/docs/api/ESCCommandArgumentDescriptor.md
Dennis Ploeger 58d880101d Optimized Docs (#7)
Authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-06-22 23:06:20 +02:00

1.1 KiB

ESCCommandArgumentDescriptor

Extends: Object

Description

The descriptor of the arguments of an ESC command

Property Descriptions

min_args

var min_args: int = 0

Number of arguments the command expects

types

var types: Array

The types the arguments as TYPE_ constants. If the command is called with more arguments than there are entries in the types array, the additional arguments will be checked against the last entry of the types array.

defaults

var defaults: Array

The default values for the arguments

Method Descriptions

_init

func _init(p_min_args: int = 0, p_types: Array, p_defaults: Array)

Initialize the descriptor

prepare_arguments

func prepare_arguments(arguments: Array) -> Array

Combine the default argument values with the given arguments

validate

func validate(command: String, arguments: Array) -> bool

Validate wether the given arguments match the command descriptor