Changeset 230 for binary-improvements/MapRendering/Commands
- Timestamp:
- Apr 18, 2015, 4:27:57 PM (10 years ago)
- Location:
- binary-improvements/MapRendering/Commands
- Files:
-
- 1 added
- 2 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); -
binary-improvements/MapRendering/Commands/RenderMap.cs
r224 r230 6 6 namespace AllocsFixes.CustomCommands 7 7 { 8 public class RenderMap : ConsoleC ommand8 public class RenderMap : ConsoleCmdAbstract 9 9 { 10 public RenderMap (ConsoleSdtd cons) : base(cons) 11 { 12 } 13 14 public override string Description () 10 public override string GetDescription () 15 11 { 16 12 return "render the current map to a file"; 17 13 } 18 14 19 public override string[] Names ()15 public override string[] GetCommands () 20 16 { 21 return new string[] { "rendermap" , "rm"};17 return new string[] { "rendermap" }; 22 18 } 23 19 24 public override void Run (string[] _params)20 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) 25 21 { 26 22 try { 27 23 AllocsFixes.MapRendering.MapRendering.Instance.RenderFullMap (); 28 24 29 m_Console.SendResult ("Render map done");25 SdtdConsole.Instance.Output ("Render map done"); 30 26 } catch (Exception e) { 31 27 Log.Out ("Error in RenderMap.Run: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.