Last change
on this file since 329 was 325, checked in by alloc, 6 years ago |
Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)
|
File size:
827 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | namespace AllocsFixes.CustomCommands {
|
---|
5 | public class EnableRendering : ConsoleCmdAbstract {
|
---|
6 | public override string GetDescription () {
|
---|
7 | return "enable/disable live map rendering";
|
---|
8 | }
|
---|
9 |
|
---|
10 | public override string[] GetCommands () {
|
---|
11 | return new[] {"enablerendering"};
|
---|
12 | }
|
---|
13 |
|
---|
14 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
|
---|
15 | try {
|
---|
16 | if (_params.Count != 1) {
|
---|
17 | SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled);
|
---|
18 | return;
|
---|
19 | }
|
---|
20 |
|
---|
21 | MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1");
|
---|
22 | SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1"));
|
---|
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.