source: binary-improvements2/MapRendering/Commands/EnableRendering.cs@ 386

Last change on this file since 386 was 383, checked in by alloc, 2 years ago

Fixed a bunch of warnings

File size: 714 bytes
Line 
1using System.Collections.Generic;
2
3namespace 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.