Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 |
|
---|
| 4 | namespace AllocsFixes.CustomCommands
|
---|
| 5 | {
|
---|
| 6 | public class EnableRendering : ConsoleCommand
|
---|
| 7 | {
|
---|
| 8 | public EnableRendering (ConsoleSdtd cons) : base(cons)
|
---|
| 9 | {
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | public override string Description ()
|
---|
| 13 | {
|
---|
| 14 | return "enable/disable live map rendering";
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | public override string[] Names ()
|
---|
| 18 | {
|
---|
| 19 | return new string[] { "enablerendering", string.Empty };
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | public override void Run (string[] _params)
|
---|
| 23 | {
|
---|
| 24 | try {
|
---|
| 25 | if (_params.Length != 1) {
|
---|
| 26 | m_Console.SendResult ("Current state: " + AllocsFixes.MapRendering.MapRendering.renderingEnabled);
|
---|
| 27 | return;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | AllocsFixes.MapRendering.MapRendering.renderingEnabled = _params[0].Equals("1");
|
---|
| 31 | m_Console.SendResult ("Set live map rendering to " + _params [0].Equals ("1"));
|
---|
| 32 | } catch (Exception e) {
|
---|
| 33 | Log.Out ("Error in EnableRendering.Run: " + e);
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.