ServerComboCommandDefinition
A class in Root.Township, Alta.Menu.
A menu command that sends a list of console commands to the server one after another, each after the last one's result comes back. Client side.
Constructors
| Member | What it is |
|---|
ServerComboCommandDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private string[] commands | Console commands to send, in order. |
private int currentCommandIndex | Index of the command being sent. |
private static readonly Logger Logger | NLog logger; logs each command sent and its result. |
private string settingDescription | Backing field for SettingDescription. |
Properties
| Member | What it is |
|---|
override string SettingDescription { get; } | Description shown on the settings panel. |
1 private and internal property
| Member | What it is |
|---|
private string[] Commands { get; } | The command list. |
Methods
| Member | What it is |
|---|
override void RunCommandOnClient() | Starts sending the command list from the current index. |
2 private and internal methods
| Member | What it is |
|---|
private void OnCommandCompleted(string command, string result) | Logs the result and sends the next command, or resets to the first when all are done. |
private void RunNextCommand() | Sends the current command to the server through CommandSync. |