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