From bbbcb6b80ce68c795b3c9c9caa62b4d77acae1dc Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 12 Jun 2024 09:59:22 +0100 Subject: [PATCH] Updated map data extractor patches to save into the same file + have consistent naming systems --- project/SPT.Debugging/Patches/ExfilDumper.cs | 2 +- project/SPT.Debugging/Patches/StaticLootDumper.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/project/SPT.Debugging/Patches/ExfilDumper.cs b/project/SPT.Debugging/Patches/ExfilDumper.cs index fbe32dd..f541f16 100644 --- a/project/SPT.Debugging/Patches/ExfilDumper.cs +++ b/project/SPT.Debugging/Patches/ExfilDumper.cs @@ -15,7 +15,7 @@ namespace SPT.Debugging.Patches { internal class ExfilDumper : ModulePatch { - public static string DumpFolder = Path.Combine(Environment.CurrentDirectory, "ExfilDumps"); + public static string DumpFolder = Path.Combine(Environment.CurrentDirectory, "Dumps"); protected override MethodBase GetTargetMethod() { diff --git a/project/SPT.Debugging/Patches/StaticLootDumper.cs b/project/SPT.Debugging/Patches/StaticLootDumper.cs index 8b58334..3acfe62 100644 --- a/project/SPT.Debugging/Patches/StaticLootDumper.cs +++ b/project/SPT.Debugging/Patches/StaticLootDumper.cs @@ -13,7 +13,7 @@ namespace SPT.Debugging.Patches { public class StaticLootDumper : ModulePatch { - public static string DumpFolder = Path.Combine(Environment.CurrentDirectory, "StaticDumps"); + public static string DumpFolder = Path.Combine(Environment.CurrentDirectory, "Dumps"); protected override MethodBase GetTargetMethod() { @@ -65,9 +65,9 @@ namespace SPT.Debugging.Patches }); string jsonString = JsonConvert.SerializeObject(containersData, Formatting.Indented); - - string outputFile = Path.Combine(DumpFolder, $"{mapName}.json"); - if (File.Exists(outputFile)) + string outputFile = Path.Combine(DumpFolder, $"{mapName}", $"statics.json"); + Directory.CreateDirectory(Path.GetDirectoryName(outputFile)); + if (File.Exists(outputFile)) { File.Delete(outputFile); }