- Timestamp:
- Aug 26, 2014, 4:41:47 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/CustomCommands
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/CreativeMenu.cs
r128 r130 2 2 using System.Collections.Generic; 3 3 4 public class CreativeMenu : ConsoleCommand 4 namespace AllocsFixes.CustomCommands 5 5 { 6 public CreativeMenu (ConsoleSdtd cons) : base(cons)6 public class CreativeMenu : ConsoleCommand 7 7 { 8 } 8 public CreativeMenu (ConsoleSdtd cons) : base(cons) 9 { 10 } 9 11 10 public override string Description ()11 {12 return "enable/disable creative menu";13 }12 public override string Description () 13 { 14 return "enable/disable creative menu"; 15 } 14 16 15 public override string[] Names ()16 {17 return new string[] { "creativemenu", "cm" };18 }17 public override string[] Names () 18 { 19 return new string[] { "creativemenu", "cm" }; 20 } 19 21 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; 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); 26 35 } 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 36 } 34 37 } 35 38 } 36
Note:
See TracChangeset
for help on using the changeset viewer.