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

991 B

ESCCommand

Extends: ESCStatement < Object

Description

An ESC command

Constants Descriptions

REGEX

const REGEX: String = "^(\\s*)(?<name>[^\\s]+)(\\s(?<parameters>([^\\[]|$)+))?(\\[(?<conditions>[^\\]]+)\\])?"

Regex matching command lines

Property Descriptions

name

var name: String

The name of this command

parameters

var parameters: Array

Parameters of this command

conditions

var conditions: Array

A list of ESCConditions to run this command. Conditions are combined using logical AND

Method Descriptions

_init

func _init(command_string)

Create a command from a command string

is_valid

func is_valid() -> bool

Check, if conditions match

run

func run() -> var

Run this command