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