Add container ignore system
This commit is contained in:
parent
fa68bd7635
commit
fbe5af24ee
@ -48,5 +48,8 @@
|
|||||||
},
|
},
|
||||||
"writerConfig": {
|
"writerConfig": {
|
||||||
"outputLocation": "E:\\spt\\dumps\\output"
|
"outputLocation": "E:\\spt\\dumps\\output"
|
||||||
|
},
|
||||||
|
"containerIgnoreList": {
|
||||||
|
"tarkovstreets": ["container_City_SW_04_DesignStuff_00002"]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,4 +49,8 @@ public class Config
|
|||||||
[JsonProperty("writerConfig")]
|
[JsonProperty("writerConfig")]
|
||||||
[JsonPropertyName("writerConfig")]
|
[JsonPropertyName("writerConfig")]
|
||||||
public WriterConfig WriterConfig { get; set; }
|
public WriterConfig WriterConfig { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("containerIgnoreList")]
|
||||||
|
[JsonPropertyName("containerIgnoreList")]
|
||||||
|
public Dictionary<string, string[]> ContainerIgnoreList { get; set; }
|
||||||
}
|
}
|
@ -88,10 +88,17 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor
|
|||||||
mapDumpCounter.Add(data.Data.Name, 1);
|
mapDumpCounter.Add(data.Data.Name, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LootDumpProcessorContext.GetConfig().ContainerIgnoreList.TryGetValue(data.Data.Id.ToLower(), out string[]? ignoreListForMap);
|
||||||
foreach (var dynamicStaticContainer in StaticLootProcessor.CreateDynamicStaticContainers(data))
|
foreach (var dynamicStaticContainer in StaticLootProcessor.CreateDynamicStaticContainers(data))
|
||||||
{
|
{
|
||||||
lock (mapStaticContainersAggregatedLock)
|
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))
|
if (mapAggregatedData.ContainsKey(dynamicStaticContainer))
|
||||||
mapAggregatedData[dynamicStaticContainer] += 1;
|
mapAggregatedData[dynamicStaticContainer] += 1;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user