Added the SetDungeon command.
This commit is contained in:
parent
79484f1378
commit
bbca61cea1
2 changed files with 18 additions and 2 deletions
|
|
@ -512,7 +512,12 @@ namespace TShockAPI
|
|||
AllowServer = false,
|
||||
HelpText = "Sets the world's spawn point to your location."
|
||||
});
|
||||
add(new Command(Permissions.worldsettle, Settle, "settle")
|
||||
add(new Command(Permissions.worldspawn, SetDungeon, "setdungeon")
|
||||
{
|
||||
AllowServer = false,
|
||||
HelpText = "Sets the dungeon's position to your location."
|
||||
});
|
||||
add(new Command(Permissions.worldsettle, Settle, "settle")
|
||||
{
|
||||
HelpText = "Forces all liquids to update immediately."
|
||||
});
|
||||
|
|
@ -3612,7 +3617,15 @@ namespace TShockAPI
|
|||
args.Player.SendSuccessMessage("Spawn has now been set at your location.");
|
||||
}
|
||||
|
||||
private static void Reload(CommandArgs args)
|
||||
private static void SetDungeon(CommandArgs args)
|
||||
{
|
||||
Main.dungeonX = args.Player.TileX + 1;
|
||||
Main.dungeonY = args.Player.TileY + 3;
|
||||
SaveManager.Instance.SaveWorld(false);
|
||||
args.Player.SendSuccessMessage("The dungeon's position has now been set at your location.");
|
||||
}
|
||||
|
||||
private static void Reload(CommandArgs args)
|
||||
{
|
||||
TShock.Utils.Reload(args.Player);
|
||||
|
||||
|
|
|
|||
|
|
@ -305,6 +305,9 @@ namespace TShockAPI
|
|||
[Description("User can set the world spawn.")]
|
||||
public static readonly string worldspawn = "tshock.world.setspawn";
|
||||
|
||||
[Description( "User can set the dungeon's location." )]
|
||||
public static readonly string dungeonposition = "tshock.world.setdungeon";
|
||||
|
||||
[Description("User can drop a meteor.")]
|
||||
public static readonly string dropmeteor = "tshock.world.time.dropmeteor";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue