Adds /dumpdata which dumps the permission table & ref data.
This commit is contained in:
parent
d937789c15
commit
63179deaa5
3 changed files with 15 additions and 1 deletions
|
|
@ -616,6 +616,10 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
HelpText = "Sends a PM to a player."
|
HelpText = "Sends a PM to a player."
|
||||||
});
|
});
|
||||||
|
add(new Command(Permissions.createdumps, CreateDumps, "datadump")
|
||||||
|
{
|
||||||
|
HelpText = "Creates a reference tables for Terraria data types and the TShock permission system in the server folder."
|
||||||
|
});
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
add(new Command(Aliases, "aliases")
|
add(new Command(Aliases, "aliases")
|
||||||
|
|
@ -5178,6 +5182,14 @@ namespace TShockAPI
|
||||||
args.Player.SendErrorMessage("No command or command alias matching \"{0}\" found.", givenCommandName);
|
args.Player.SendErrorMessage("No command or command alias matching \"{0}\" found.", givenCommandName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void CreateDumps(CommandArgs args)
|
||||||
|
{
|
||||||
|
TShock.Utils.DumpPermissionMatrix("PermissionMatrix.txt");
|
||||||
|
TShock.Utils.Dump();
|
||||||
|
args.Player.SendSuccessMessage("Your reference dumps have been created in the server folder.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion General Commands
|
#endregion General Commands
|
||||||
|
|
||||||
#region Cheat Commands
|
#region Cheat Commands
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,9 @@ namespace TShockAPI
|
||||||
[Description("User can get other users' info.")]
|
[Description("User can get other users' info.")]
|
||||||
public static readonly string userinfo = "tshock.admin.userinfo";
|
public static readonly string userinfo = "tshock.admin.userinfo";
|
||||||
|
|
||||||
|
[Description("User can create reference files of Terraria IDs and the permission matrix in the server folder.")]
|
||||||
|
public static readonly string createdumps = "tshock.admin.createdumps";
|
||||||
|
|
||||||
// tshock.buff nodes
|
// tshock.buff nodes
|
||||||
|
|
||||||
[Description("User can buff self.")]
|
[Description("User can buff self.")]
|
||||||
|
|
|
||||||
|
|
@ -1204,7 +1204,6 @@ namespace TShockAPI
|
||||||
Permissions.DumpDescriptions();
|
Permissions.DumpDescriptions();
|
||||||
ServerSideCharacters.ServerSideConfig.DumpDescriptions();
|
ServerSideCharacters.ServerSideConfig.DumpDescriptions();
|
||||||
RestManager.DumpDescriptions();
|
RestManager.DumpDescriptions();
|
||||||
DumpPermissionMatrix("PermissionMatrix.txt");
|
|
||||||
DumpBuffs("BuffList.txt");
|
DumpBuffs("BuffList.txt");
|
||||||
DumpItems("Items-1_0.txt", -48, 235);
|
DumpItems("Items-1_0.txt", -48, 235);
|
||||||
DumpItems("Items-1_1.txt", 235, 604);
|
DumpItems("Items-1_1.txt", 235, 604);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue