Last change
on this file since 405 was 405, checked in by alloc, 21 months ago |
Refactored console commands for A21 caching
|
File size:
734 bytes
|
Line | |
---|
1 | using System.Collections.Generic;
|
---|
2 | using JetBrains.Annotations;
|
---|
3 |
|
---|
4 | namespace MapRendering.Commands {
|
---|
5 | [UsedImplicitly]
|
---|
6 | public class EnableRendering : ConsoleCmdAbstract {
|
---|
7 | protected override string getDescription () {
|
---|
8 | return "enable/disable live map rendering";
|
---|
9 | }
|
---|
10 |
|
---|
11 | protected override string[] getCommands () {
|
---|
12 | return new[] {"enablerendering"};
|
---|
13 | }
|
---|
14 |
|
---|
15 | public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
|
---|
16 | if (_params.Count != 1) {
|
---|
17 | SdtdConsole.Instance.Output ($"Current state: {MapRenderer.renderingEnabled}");
|
---|
18 | return;
|
---|
19 | }
|
---|
20 |
|
---|
21 | MapRenderer.renderingEnabled = _params [0].Equals ("1");
|
---|
22 | SdtdConsole.Instance.Output ($"Set live map rendering to {_params [0].Equals ("1")}");
|
---|
23 | }
|
---|
24 | }
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.