Rev | Line | |
---|
[224] | 1 | using System.Collections.Generic;
|
---|
| 2 |
|
---|
[325] | 3 | namespace AllocsFixes.CustomCommands {
|
---|
| 4 | public class EnableRendering : ConsoleCmdAbstract {
|
---|
| 5 | public override string GetDescription () {
|
---|
[224] | 6 | return "enable/disable live map rendering";
|
---|
| 7 | }
|
---|
| 8 |
|
---|
[325] | 9 | public override string[] GetCommands () {
|
---|
| 10 | return new[] {"enablerendering"};
|
---|
[224] | 11 | }
|
---|
| 12 |
|
---|
[325] | 13 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
|
---|
[359] | 14 | if (_params.Count != 1) {
|
---|
| 15 | SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled);
|
---|
| 16 | return;
|
---|
| 17 | }
|
---|
[224] | 18 |
|
---|
[359] | 19 | MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1");
|
---|
| 20 | SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1"));
|
---|
[224] | 21 | }
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.