- Timestamp:
- Apr 18, 2015, 4:27:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Commands/EnableRendering.cs
r224 r230 4 4 namespace AllocsFixes.CustomCommands 5 5 { 6 public class EnableRendering : ConsoleC ommand6 public class EnableRendering : ConsoleCmdAbstract 7 7 { 8 public EnableRendering (ConsoleSdtd cons) : base(cons) 9 { 10 } 11 12 public override string Description () 8 public override string GetDescription () 13 9 { 14 10 return "enable/disable live map rendering"; 15 11 } 16 12 17 public override string[] Names ()13 public override string[] GetCommands () 18 14 { 19 return new string[] { "enablerendering" , string.Empty};15 return new string[] { "enablerendering" }; 20 16 } 21 17 22 public override void Run (string[] _params)18 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) 23 19 { 24 20 try { 25 if (_params. Length!= 1) {26 m_Console.SendResult ("Current state: " + AllocsFixes.MapRendering.MapRendering.renderingEnabled);21 if (_params.Count != 1) { 22 SdtdConsole.Instance.Output ("Current state: " + AllocsFixes.MapRendering.MapRendering.renderingEnabled); 27 23 return; 28 24 } 29 25 30 26 AllocsFixes.MapRendering.MapRendering.renderingEnabled = _params[0].Equals("1"); 31 m_Console.SendResult ("Set live map rendering to " + _params [0].Equals ("1"));27 SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1")); 32 28 } catch (Exception e) { 33 29 Log.Out ("Error in EnableRendering.Run: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.