Add hardmode-related commands
-/hardmode - starts hardmode and converts the world -/stophardmode - sets hardmode state to false, does not revert world.
This commit is contained in:
parent
c53a85b3c7
commit
2c45598c08
2 changed files with 15 additions and 0 deletions
|
|
@ -189,6 +189,8 @@ namespace TShockAPI
|
|||
add(Permissions.buff, Buff, "buff");
|
||||
add(Permissions.buffplayer, GBuff, "gbuff", "buffplayer");
|
||||
add(Permissions.grow, Grow, "grow");
|
||||
add(Permissions.hardmode, StartHardMode, "hardmode");
|
||||
add(Permissions.hardmode, DisableHardMode, "stophardmode", "disablehardmode");
|
||||
}
|
||||
|
||||
public static bool HandleCommand(TSPlayer player, string text)
|
||||
|
|
@ -1104,6 +1106,16 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
private static void StartHardMode(CommandArgs args)
|
||||
{
|
||||
WorldGen.StartHardmode();
|
||||
}
|
||||
|
||||
private static void DisableHardMode(CommandArgs args)
|
||||
{
|
||||
Main.hardMode = false;
|
||||
}
|
||||
|
||||
#endregion Cause Events and Spawn Monsters Commands
|
||||
|
||||
#region Teleport Commands
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ namespace TShockAPI
|
|||
[Description("")]
|
||||
public static readonly string grow;
|
||||
|
||||
[Description("User can change hardmode state.")]
|
||||
public static readonly string hardmode;
|
||||
|
||||
static Permissions()
|
||||
{
|
||||
foreach (var field in typeof(Permissions).GetFields())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue