Last change
on this file since 355 was 325, checked in by alloc, 6 years ago |
Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)
|
File size:
827 bytes
|
Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 |
|
---|
[325] | 4 | namespace AllocsFixes.CustomCommands {
|
---|
| 5 | public class EnableRendering : ConsoleCmdAbstract {
|
---|
| 6 | public override string GetDescription () {
|
---|
[224] | 7 | return "enable/disable live map rendering";
|
---|
| 8 | }
|
---|
| 9 |
|
---|
[325] | 10 | public override string[] GetCommands () {
|
---|
| 11 | return new[] {"enablerendering"};
|
---|
[224] | 12 | }
|
---|
| 13 |
|
---|
[325] | 14 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
|
---|
[224] | 15 | try {
|
---|
[230] | 16 | if (_params.Count != 1) {
|
---|
[325] | 17 | SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled);
|
---|
[224] | 18 | return;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
[325] | 21 | MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1");
|
---|
[230] | 22 | SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1"));
|
---|
[224] | 23 | } catch (Exception e) {
|
---|
| 24 | Log.Out ("Error in EnableRendering.Run: " + e);
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.