Console
Summary
Console global table.
Functions
| Method | Returns |
|---|---|
| GetSettings(category: string) | DataContainer |
| Execute(command: string) | void |
| Register(group: string, name: string, description: string, inst: table, callback: function) | void |
Functions
GetSettings
Console.GetSettings(category: string): DataContainerGets the settings for a specific category.
Parameters
| Name | Type | Description |
|---|---|---|
| category | string | The category to get the settings for. |
Returns
| Type | Description |
|---|---|
| DataContainer | Settings object |
Execute
Console.Execute(command: string): voidExecute a console command.
Parameters
| Name | Type | Description |
|---|---|---|
| command | string | The command to be executed. |
Register
Console.Register(group: string, name: string, description: string, inst: table, callback: function): voidRegister a new command.
Parameters
| Name | Type | Description |
|---|---|---|
| group | string | The category to get the settings for. |
| name | string | The name for the command. |
| description | string | The description for the command. |
| inst | table | The instance you want to have the callback be the instance function of. Like: inst:callback(args) |
| callback | function | A callback in the form function(args: string). |