diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index c4d06606..88766e8d 100755
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -635,10 +635,20 @@ namespace TShockAPI
}
case "-dump":
{
+ Utils.PrepareLangForDump();
+ Lang.setLang(true);
ConfigFile.DumpDescriptions();
Permissions.DumpDescriptions();
ServerSideConfig.DumpDescriptions();
RestManager.DumpDescriptions();
+ Utils.DumpBuffs("BuffList.txt");
+ Utils.DumpItems("Items-1_0.txt", -48, 235);
+ Utils.DumpItems("Items-1_1.txt", 235, 604);
+ Utils.DumpItems("Items-1_2.txt", 604, 2749);
+ Utils.DumpItems("Items-1_3.txt", 2749, Main.maxItemTypes);
+ Utils.DumpNPCs("NPCs.txt");
+ Utils.DumpProjectiles("Projectiles.txt");
+ Utils.DumpPrefixes("Prefixes.txt");
Environment.Exit(1);
break;
}
diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs
index be20bf1e..5dfdb221 100644
--- a/TShockAPI/Utils.cs
+++ b/TShockAPI/Utils.cs
@@ -17,6 +17,7 @@ along with this program. If not, see .
*/
using System;
+using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -1166,5 +1167,212 @@ namespace TShockAPI
return points;
}
+
+ internal void PrepareLangForDump()
+ {
+ for(int i = 0; i < Main.recipe.Length; i++)
+ Main.recipe[i] = new Recipe();
+ }
+
+ public void DumpBuffs(string path)
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.AppendLine("[block:parameters]").AppendLine("{").AppendLine(" \"data\": {");
+ buffer.AppendLine(" \"h-0\": \"ID\",");
+ buffer.AppendLine(" \"h-1\": \"Name\",");
+ buffer.AppendLine(" \"h-2\": \"Description\",");
+
+ List