diff --git a/Config/config.json b/Config/config.json index ff7c802..33d96a2 100644 --- a/Config/config.json +++ b/Config/config.json @@ -48,5 +48,8 @@ }, "writerConfig": { "outputLocation": "E:\\spt\\dumps\\output" + }, + "containerIgnoreList": { + "tarkovstreets": ["container_City_SW_04_DesignStuff_00002"] } } \ No newline at end of file diff --git a/Model/Config/Config.cs b/Model/Config/Config.cs index 6249a27..ef765fe 100644 --- a/Model/Config/Config.cs +++ b/Model/Config/Config.cs @@ -49,4 +49,8 @@ public class Config [JsonProperty("writerConfig")] [JsonPropertyName("writerConfig")] public WriterConfig WriterConfig { get; set; } + + [JsonProperty("containerIgnoreList")] + [JsonPropertyName("containerIgnoreList")] + public Dictionary ContainerIgnoreList { get; set; } } \ No newline at end of file diff --git a/Process/Processor/DumpProcessor/MultithreadSteppedDumpProcessor.cs b/Process/Processor/DumpProcessor/MultithreadSteppedDumpProcessor.cs index b9802dd..f2507a6 100644 --- a/Process/Processor/DumpProcessor/MultithreadSteppedDumpProcessor.cs +++ b/Process/Processor/DumpProcessor/MultithreadSteppedDumpProcessor.cs @@ -87,11 +87,18 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor else mapDumpCounter.Add(data.Data.Name, 1); } - + + LootDumpProcessorContext.GetConfig().ContainerIgnoreList.TryGetValue(data.Data.Id.ToLower(), out string[]? ignoreListForMap); foreach (var dynamicStaticContainer in StaticLootProcessor.CreateDynamicStaticContainers(data)) { lock (mapStaticContainersAggregatedLock) { + // Skip adding containers to aggredated data if container id is in ignore list + if (ignoreListForMap != null && ignoreListForMap.Contains(dynamicStaticContainer.Id)) + { + continue; + } + if (mapAggregatedData.ContainsKey(dynamicStaticContainer)) mapAggregatedData[dynamicStaticContainer] += 1; else @@ -154,7 +161,7 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor } private static double GetStaticProbability(string mapName, KeyValuePair td, Dictionary mapDumpCounter) - { + { return Math.Round((double)((decimal)td.Value / (decimal)mapDumpCounter[mapName]), 2); }