Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 |
|
---|
| 4 | namespace AllocsFixes.CustomCommands
|
---|
| 5 | {
|
---|
[230] | 6 | public class EnableRendering : ConsoleCmdAbstract
|
---|
[224] | 7 | {
|
---|
[230] | 8 | public override string GetDescription ()
|
---|
[224] | 9 | {
|
---|
| 10 | return "enable/disable live map rendering";
|
---|
| 11 | }
|
---|
| 12 |
|
---|
[230] | 13 | public override string[] GetCommands ()
|
---|
[224] | 14 | {
|
---|
[230] | 15 | return new string[] { "enablerendering" };
|
---|
[224] | 16 | }
|
---|
| 17 |
|
---|
[230] | 18 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
|
---|
[224] | 19 | {
|
---|
| 20 | try {
|
---|
[230] | 21 | if (_params.Count != 1) {
|
---|
| 22 | SdtdConsole.Instance.Output ("Current state: " + AllocsFixes.MapRendering.MapRendering.renderingEnabled);
|
---|
[224] | 23 | return;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | AllocsFixes.MapRendering.MapRendering.renderingEnabled = _params[0].Equals("1");
|
---|
[230] | 27 | SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1"));
|
---|
[224] | 28 | } catch (Exception e) {
|
---|
| 29 | Log.Out ("Error in EnableRendering.Run: " + e);
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.