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

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

Fixed a bunch of warnings

File size: 714 bytes
RevLine 
[224]1using System.Collections.Generic;
2
[325]3namespace 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.