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