From 8e3af6a893885f47821964d2b479e8d0d5511237 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 12 Aug 2023 19:08:38 +0100 Subject: [PATCH] initial push of Loot Processing Tool --- .gitignore | 400 ++++++++++++++++++ Config/config.json | 48 +++ Config/forced_loose.yaml | 97 +++++ Config/forced_static.yaml | 16 + Config/map_directory_mapping.yaml | 29 ++ GCHandler.cs | 12 + Logger/ILogger.cs | 8 + Logger/LogLevel.cs | 9 + Logger/LoggerFactory.cs | 14 + Logger/QueueLogger.cs | 109 +++++ LootDumpProcessor.csproj | 36 ++ LootDumpProcessor.sln | 25 ++ LootDumpProcessorContext.cs | 127 ++++++ Model/ComposedKey.cs | 41 ++ Model/Config/Config.cs | 48 +++ Model/Config/DataStorageConfig.cs | 16 + Model/Config/ForcedStatic.cs | 12 + Model/Config/IntakeReaderConfig.cs | 16 + Model/Config/LoggerConfig.cs | 16 + Model/Config/MapDirectoryMapping.cs | 11 + Model/Config/PreProcessorConfig.cs | 20 + Model/Config/ProcessorConfig.cs | 11 + Model/Config/ReaderConfig.cs | 36 ++ Model/Config/WriterConfig.cs | 11 + Model/FireMode.cs | 20 + Model/Foldable.cs | 20 + Model/GroupPosition.cs | 36 ++ Model/Input/AirdropParameter.cs | 48 +++ Model/Input/Banner.cs | 14 + Model/Input/BotLocationModifier.cs | 28 ++ Model/Input/ColliderParams.cs | 16 + Model/Input/Data.cs | 320 ++++++++++++++ Model/Input/Exit.cs | 60 +++ Model/Input/ExitZones.cs | 12 + Model/Input/Preview.cs | 16 + Model/Input/Props.cs | 16 + Model/Input/RootData.cs | 20 + Model/Input/SpawnPointParam.cs | 40 ++ Model/Input/Wave.cs | 48 +++ Model/Item.cs | 58 +++ Model/Output/AbstractDistribution.cs | 11 + Model/Output/AmmoDistribution.cs | 11 + Model/Output/ItemCountDistribution.cs | 16 + Model/Output/ItemDistribution.cs | 12 + Model/Output/LooseLoot/LooseLootRoot.cs | 20 + Model/Output/LooseLoot/SpawnPoint.cs | 24 ++ Model/Output/LooseLoot/SpawnPointCount.cs | 16 + Model/Output/LooseLoot/SpawnPointsForced.cs | 20 + Model/Output/StaticContainer/MapStaticLoot.cs | 20 + .../StaticContainer/StaticContainerRoot.cs | 44 ++ .../Output/StaticContainer/StaticDataPoint.cs | 15 + Model/Output/StaticContainer/StaticForced.cs | 19 + Model/Output/StaticDistribution.cs | 11 + Model/Output/StaticItemDistribution.cs | 16 + Model/Processing/BaseClasses.cs | 81 ++++ Model/Processing/BasicInfo.cs | 26 ++ Model/Processing/CaliberTemplateCount.cs | 8 + Model/Processing/DumpProcessData.cs | 10 + Model/Processing/LooseLootCounts.cs | 23 + Model/Processing/ParsedDump.cs | 31 ++ Model/Processing/PartialData.cs | 21 + Model/Processing/PreProcessedLooseLoot.cs | 19 + Model/Processing/PreProcessedStaticLoot.cs | 8 + Model/Repairable.cs | 25 ++ Model/Tarkov/Handbook.cs | 23 + Model/Tarkov/TemplateItems.cs | 152 +++++++ Model/Template.cs | 99 +++++ Model/Upd.cs | 36 ++ Model/Vector3.cs | 30 ++ Process/Collector/CollectorFactory.cs | 10 + Process/Collector/HashSetCollector.cs | 28 ++ Process/Collector/ICollector.cs | 12 + Process/FilesGatherer.cs | 6 + Process/IPipeline.cs | 6 + Process/OutputFileType.cs | 9 + Process/PipelineFactory.cs | 10 + .../DumpProcessor/DumpProcessorFactory.cs | 12 + .../Processor/DumpProcessor/IDumpProcessor.cs | 8 + .../MultithreadSteppedDumpProcessor.cs | 300 +++++++++++++ .../Processor/FileProcessor/FileProcessor.cs | 52 +++ .../FileProcessor/FileProcessorFactory.cs | 12 + .../Processor/FileProcessor/IFileProcessor.cs | 8 + Process/Processor/LooseLootProcessor.cs | 262 ++++++++++++ Process/Processor/StaticLootProcessor.cs | 161 +++++++ Process/QueuePipeline.cs | 200 +++++++++ Process/Reader/Filters/FileFilterFactory.cs | 25 ++ Process/Reader/Filters/FileFilterTypes.cs | 6 + Process/Reader/Filters/IFileFilter.cs | 7 + Process/Reader/Filters/JsonDumpFileFilter.cs | 40 ++ Process/Reader/Intake/IIntakeReader.cs | 8 + Process/Reader/Intake/IntakeReaderFactory.cs | 18 + Process/Reader/Intake/IntakeReaderTypes.cs | 6 + Process/Reader/Intake/JsonFileIntakeReader.cs | 48 +++ .../PreProcess/AbstractPreProcessReader.cs | 48 +++ .../Reader/PreProcess/IPreProcessReader.cs | 11 + .../PreProcess/PreProcessReaderFactory.cs | 22 + .../PreProcess/PreProcessReaderTypes.cs | 6 + .../PreProcess/SevenZipPreProcessReader.cs | 39 ++ Process/TarkovItems.cs | 45 ++ Process/Writer/FileWriter.cs | 77 ++++ Process/Writer/IWriter.cs | 8 + Process/Writer/WriterFactory.cs | 12 + Program.cs | 23 + Serializers/ISerializer.cs | 7 + .../Json/Converters/NetJsonKeyConverter.cs | 67 +++ .../Converters/NewtonsoftJsonKeyConverter.cs | 70 +++ Serializers/Json/IJsonSerializer.cs | 5 + Serializers/Json/JsonSerializerFactory.cs | 43 ++ Serializers/Json/JsonSerializerTypes.cs | 7 + Serializers/Json/NetJsonSerializer.cs | 27 ++ Serializers/Json/NewtonsoftJsonSerializer.cs | 27 ++ Serializers/Yaml/IYamlSerializer.cs | 5 + Serializers/Yaml/YamlDotNetYamlSerializer.cs | 19 + Serializers/Yaml/YamlSerializerFactory.cs | 16 + Storage/AbstractKey.cs | 29 ++ Storage/Collections/FlatKeyableDictionary.cs | 16 + Storage/Collections/FlatKeyableList.cs | 11 + .../SubdivisionedKeyableDictionary.cs | 51 +++ Storage/DataStorageFactory.cs | 46 ++ Storage/DataStorageTypes.cs | 7 + Storage/FlatUniqueKey.cs | 10 + Storage/IDataStorage.cs | 10 + Storage/IKey.cs | 19 + Storage/IKeyable.cs | 6 + .../Implementations/File/FileDataStorage.cs | 28 ++ .../File/Handlers/AbstractStoreHandler.cs | 55 +++ .../File/Handlers/FlatStoreHandler.cs | 24 ++ .../Handlers/SubdivisionedStoreHandler.cs | 26 ++ Storage/Implementations/File/IStoreHandler.cs | 9 + .../DataStorageFileSerializerFactory.cs | 17 + .../Serializers/IDataStorageFileSerializer.cs | 9 + .../JsonDataStorageFileSerializer.cs | 14 + .../YamlDataStorageFileSerializer.cs | 14 + .../File/StoreHandlerFactory.cs | 29 ++ .../Memory/MemoryDataStorage.cs | 50 +++ Storage/SubdivisionedUniqueKey.cs | 10 + Utils/ProcessorUtil.cs | 45 ++ 137 files changed, 5160 insertions(+) create mode 100644 .gitignore create mode 100644 Config/config.json create mode 100644 Config/forced_loose.yaml create mode 100644 Config/forced_static.yaml create mode 100644 Config/map_directory_mapping.yaml create mode 100644 GCHandler.cs create mode 100644 Logger/ILogger.cs create mode 100644 Logger/LogLevel.cs create mode 100644 Logger/LoggerFactory.cs create mode 100644 Logger/QueueLogger.cs create mode 100644 LootDumpProcessor.csproj create mode 100644 LootDumpProcessor.sln create mode 100644 LootDumpProcessorContext.cs create mode 100644 Model/ComposedKey.cs create mode 100644 Model/Config/Config.cs create mode 100644 Model/Config/DataStorageConfig.cs create mode 100644 Model/Config/ForcedStatic.cs create mode 100644 Model/Config/IntakeReaderConfig.cs create mode 100644 Model/Config/LoggerConfig.cs create mode 100644 Model/Config/MapDirectoryMapping.cs create mode 100644 Model/Config/PreProcessorConfig.cs create mode 100644 Model/Config/ProcessorConfig.cs create mode 100644 Model/Config/ReaderConfig.cs create mode 100644 Model/Config/WriterConfig.cs create mode 100644 Model/FireMode.cs create mode 100644 Model/Foldable.cs create mode 100644 Model/GroupPosition.cs create mode 100644 Model/Input/AirdropParameter.cs create mode 100644 Model/Input/Banner.cs create mode 100644 Model/Input/BotLocationModifier.cs create mode 100644 Model/Input/ColliderParams.cs create mode 100644 Model/Input/Data.cs create mode 100644 Model/Input/Exit.cs create mode 100644 Model/Input/ExitZones.cs create mode 100644 Model/Input/Preview.cs create mode 100644 Model/Input/Props.cs create mode 100644 Model/Input/RootData.cs create mode 100644 Model/Input/SpawnPointParam.cs create mode 100644 Model/Input/Wave.cs create mode 100644 Model/Item.cs create mode 100644 Model/Output/AbstractDistribution.cs create mode 100644 Model/Output/AmmoDistribution.cs create mode 100644 Model/Output/ItemCountDistribution.cs create mode 100644 Model/Output/ItemDistribution.cs create mode 100644 Model/Output/LooseLoot/LooseLootRoot.cs create mode 100644 Model/Output/LooseLoot/SpawnPoint.cs create mode 100644 Model/Output/LooseLoot/SpawnPointCount.cs create mode 100644 Model/Output/LooseLoot/SpawnPointsForced.cs create mode 100644 Model/Output/StaticContainer/MapStaticLoot.cs create mode 100644 Model/Output/StaticContainer/StaticContainerRoot.cs create mode 100644 Model/Output/StaticContainer/StaticDataPoint.cs create mode 100644 Model/Output/StaticContainer/StaticForced.cs create mode 100644 Model/Output/StaticDistribution.cs create mode 100644 Model/Output/StaticItemDistribution.cs create mode 100644 Model/Processing/BaseClasses.cs create mode 100644 Model/Processing/BasicInfo.cs create mode 100644 Model/Processing/CaliberTemplateCount.cs create mode 100644 Model/Processing/DumpProcessData.cs create mode 100644 Model/Processing/LooseLootCounts.cs create mode 100644 Model/Processing/ParsedDump.cs create mode 100644 Model/Processing/PartialData.cs create mode 100644 Model/Processing/PreProcessedLooseLoot.cs create mode 100644 Model/Processing/PreProcessedStaticLoot.cs create mode 100644 Model/Repairable.cs create mode 100644 Model/Tarkov/Handbook.cs create mode 100644 Model/Tarkov/TemplateItems.cs create mode 100644 Model/Template.cs create mode 100644 Model/Upd.cs create mode 100644 Model/Vector3.cs create mode 100644 Process/Collector/CollectorFactory.cs create mode 100644 Process/Collector/HashSetCollector.cs create mode 100644 Process/Collector/ICollector.cs create mode 100644 Process/FilesGatherer.cs create mode 100644 Process/IPipeline.cs create mode 100644 Process/OutputFileType.cs create mode 100644 Process/PipelineFactory.cs create mode 100644 Process/Processor/DumpProcessor/DumpProcessorFactory.cs create mode 100644 Process/Processor/DumpProcessor/IDumpProcessor.cs create mode 100644 Process/Processor/DumpProcessor/MultithreadSteppedDumpProcessor.cs create mode 100644 Process/Processor/FileProcessor/FileProcessor.cs create mode 100644 Process/Processor/FileProcessor/FileProcessorFactory.cs create mode 100644 Process/Processor/FileProcessor/IFileProcessor.cs create mode 100644 Process/Processor/LooseLootProcessor.cs create mode 100644 Process/Processor/StaticLootProcessor.cs create mode 100644 Process/QueuePipeline.cs create mode 100644 Process/Reader/Filters/FileFilterFactory.cs create mode 100644 Process/Reader/Filters/FileFilterTypes.cs create mode 100644 Process/Reader/Filters/IFileFilter.cs create mode 100644 Process/Reader/Filters/JsonDumpFileFilter.cs create mode 100644 Process/Reader/Intake/IIntakeReader.cs create mode 100644 Process/Reader/Intake/IntakeReaderFactory.cs create mode 100644 Process/Reader/Intake/IntakeReaderTypes.cs create mode 100644 Process/Reader/Intake/JsonFileIntakeReader.cs create mode 100644 Process/Reader/PreProcess/AbstractPreProcessReader.cs create mode 100644 Process/Reader/PreProcess/IPreProcessReader.cs create mode 100644 Process/Reader/PreProcess/PreProcessReaderFactory.cs create mode 100644 Process/Reader/PreProcess/PreProcessReaderTypes.cs create mode 100644 Process/Reader/PreProcess/SevenZipPreProcessReader.cs create mode 100644 Process/TarkovItems.cs create mode 100644 Process/Writer/FileWriter.cs create mode 100644 Process/Writer/IWriter.cs create mode 100644 Process/Writer/WriterFactory.cs create mode 100644 Program.cs create mode 100644 Serializers/ISerializer.cs create mode 100644 Serializers/Json/Converters/NetJsonKeyConverter.cs create mode 100644 Serializers/Json/Converters/NewtonsoftJsonKeyConverter.cs create mode 100644 Serializers/Json/IJsonSerializer.cs create mode 100644 Serializers/Json/JsonSerializerFactory.cs create mode 100644 Serializers/Json/JsonSerializerTypes.cs create mode 100644 Serializers/Json/NetJsonSerializer.cs create mode 100644 Serializers/Json/NewtonsoftJsonSerializer.cs create mode 100644 Serializers/Yaml/IYamlSerializer.cs create mode 100644 Serializers/Yaml/YamlDotNetYamlSerializer.cs create mode 100644 Serializers/Yaml/YamlSerializerFactory.cs create mode 100644 Storage/AbstractKey.cs create mode 100644 Storage/Collections/FlatKeyableDictionary.cs create mode 100644 Storage/Collections/FlatKeyableList.cs create mode 100644 Storage/Collections/SubdivisionedKeyableDictionary.cs create mode 100644 Storage/DataStorageFactory.cs create mode 100644 Storage/DataStorageTypes.cs create mode 100644 Storage/FlatUniqueKey.cs create mode 100644 Storage/IDataStorage.cs create mode 100644 Storage/IKey.cs create mode 100644 Storage/IKeyable.cs create mode 100644 Storage/Implementations/File/FileDataStorage.cs create mode 100644 Storage/Implementations/File/Handlers/AbstractStoreHandler.cs create mode 100644 Storage/Implementations/File/Handlers/FlatStoreHandler.cs create mode 100644 Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs create mode 100644 Storage/Implementations/File/IStoreHandler.cs create mode 100644 Storage/Implementations/File/Serializers/DataStorageFileSerializerFactory.cs create mode 100644 Storage/Implementations/File/Serializers/IDataStorageFileSerializer.cs create mode 100644 Storage/Implementations/File/Serializers/JsonDataStorageFileSerializer.cs create mode 100644 Storage/Implementations/File/Serializers/YamlDataStorageFileSerializer.cs create mode 100644 Storage/Implementations/File/StoreHandlerFactory.cs create mode 100644 Storage/Implementations/Memory/MemoryDataStorage.cs create mode 100644 Storage/SubdivisionedUniqueKey.cs create mode 100644 Utils/ProcessorUtil.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b6a4af --- /dev/null +++ b/.gitignore @@ -0,0 +1,400 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# rider +.idea/ +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml \ No newline at end of file diff --git a/Config/config.json b/Config/config.json new file mode 100644 index 0000000..4850723 --- /dev/null +++ b/Config/config.json @@ -0,0 +1,48 @@ +{ + "serverLocation": "D:\\Spt Stuff\\server", + "threads": 20, + "threadPoolingTimeoutMs": 1000, + "jsonSerializer": "DotNet", + "manualGarbageCollectionCalls": false, + "dataStorageConfig": { + "dataStorageType": "Memory", + "fileDataStorageTempLocation": "D:\\Spt Stuff\\Lootgenerator\\Dumps\\cache" + }, + "loggerConfig": { + "logLevel": "Info", + "queueLoggerPoolingTimeoutMs": 500 + }, + "readerConfig": { + "preProcessorConfig": { + "preProcessors": [ + "SevenZip" + ], + "preProcessorTempFolder": "D:\\Spt Stuff\\Lootgenerator\\TEMP", + "cleanupTempFolderAfterProcess": true + }, + "intakeReaderConfig": { + "readerType": "Json", + "ignoredDumpLocations": [ + "Hideout" + ] + }, + "dumpFilesLocation": [ + "D:\\Spt Stuff\\Lootgenerator\\dumps\\input" + ], + "thresholdDate": "2023-01-08", + "acceptedFileExtensions": [ + "json", + "7z" + ], + "processSubFolders": true, + "fileFilters": [ + "JsonDump" + ] + }, + "processorConfig": { + "spawnPointToleranceForForced": 99.5 + }, + "writerConfig": { + "outputLocation": "D:\\Spt Stuff\\Lootgenerator\\dumps\\output" + } +} \ No newline at end of file diff --git a/Config/forced_loose.yaml b/Config/forced_loose.yaml new file mode 100644 index 0000000..08f04ec --- /dev/null +++ b/Config/forced_loose.yaml @@ -0,0 +1,97 @@ +--- +Customs: +- 5938188786f77474f723e87f # Case 0031 +- 5c12301c86f77419522ba7e4 # Flash drive with fake info +- 593965cf86f774087a77e1b6 # Case 0048 +- 591092ef86f7747bb8703422 # Secure folder 0022 in big red offices +- 590c62a386f77412b0130255 # Sliderkey Secure Flash drive in Dorms 2-way room 220 +- 5939e9b286f77462a709572c # Sealed letter (Terragroup) +- 5ac620eb86f7743a8e6e0da0 # Package of graphics cards in big red offices +- 590dde5786f77405e71908b2 # Bank case +- 5910922b86f7747d96753483 # Carbon case +- 5937fd0086f7742bf33fc198 # Bronze pocket watch on a chain +- 5939a00786f7742fe8132936 # Golden Zibbo lighter +- 5939e5a786f77461f11c0098 # Secure Folder 0013 +#- 64bd1abff3a668f08805ce4f # Secure Flash drive V4 REMOVED BY BSG + +Woods: +- 5938878586f7741b797c562f # Case 0052 +- 5d3ec50586f774183a607442 # Jaeger's message Underneath the wooden lookout post. +- 5af04e0a86f7743a532b79e2 # Single-axis Fiber Optic Gyroscope: item_barter_electr_gyroscope +- 5a687e7886f7740c4a5133fb # Blood sample +- 5af04c0b86f774138708f78e # Motor Controller: item_barter_electr_controller +#- 64bde2248f3a947a990aa4a5 # Sliderkey Secure Flash drive #1 REMOVED BY BSG +#- 64bde265807321a9b905f076 # Sliderkey Secure Flash drive #2 REMOVED BY BSG + +Shoreline: +- 5a294d7c86f7740651337cf9 # Drone 1 SAS disk +- 5a294d8486f774068638cd93 # Drone 2 SAS disk: ambiguous with itemTpl 5a294f1686f774340c7b7e4a +- 5efdafc1e70b5e33f86de058 # Sanitar's Surgery kit marked with a blue symbol +- 5939e5a786f77461f11c0098 # Secure folder 0013 +- 5a6860d886f77411cd3a9e47 # Secure folder 0060 +- 5a29357286f77409c705e025 # Sliderkey Flash drive +- 5efdaf6de6a30218ed211a48 # Sanitar's Ophthalmoscope In potted plant on dining room table. +- 5d357d6b86f7745b606e3508 # Photo album in west wing room 303 +- 5b4c72b386f7745b453af9c0 # Motor Controller: item_barter_electr_controller2 +- 5a0448bc86f774736f14efa8 # Key to the closed premises of the Health Resort +- 5a29276886f77435ed1b117c # Working hard drive +- 5b4c72fb86f7745cef1cffc5 # Single-axis Fiber Optic Gyroscope: item_barter_electr_gyroscope2 +- 5b4c72c686f77462ac37e907 # Motor Controller: item_barter_electr_controller3 +- 5b43237186f7742f3a4ab252 # Chemical container: item_quest_chem_container +- 5a29284f86f77463ef3db363 # Toughbook reinforced laptop + +Interchange: +- 5ae9a18586f7746e381e16a3 # OLI cargo manifests +- 5ae9a0dd86f7742e5f454a05 # Goshan cargo manifests +- 5ae9a1b886f77404c8537c62 # Idea cargo manifests +- 5ae9a25386f7746dd946e6d9 # OLI cargo route documents (locked) +- 5ae9a3f586f7740aab00e4e6 # Clothes design handbook - Part 1 +- 5ae9a4fc86f7746e381e1753 # Clothes design handbook - Part 2 +- 5b4c81a086f77417d26be63f # Chemical container item_quest_chem_container2 +- 5b4c81bd86f77418a75ae159 # Chemical container item_quest_chem_container3 + +Factory: +- 591093bb86f7747caa7bb2ee # On the neck of the dead scav in the bunker (Postman Pat Part 2) +- 593a87af86f774122f54a951 # Syringe with a chemical + +Lighthouse: +- 61904c9df62c89219a56e034 # The message is tucked under the bottom of the door to the cabin. +- 619268ad78f4fa33f173dbe5 # Water pump operation data On the desk between other documents in the upper office. +- 619268de2be33f2604340159 # Pumping Station Operation Data In the upper floor office on the shelf. +- 61a00bcb177fb945751bbe6a # Stolen military documents On the back corner of the dining room table on the third floor at Chalet. +- 619252352be33f26043400a7 # Laptop with information +- 628393620d8524273e7eb028 # Working hard drive +- 6331bb0d1aa9f42b804997a6 # V3 Flash Drive +- 6398a0861c712b1e1d4dadf1 # Forged Lightkeeper intelligence (Snatch) +- 6399f54b0a36db13c823ad21 # Radio transmitter body (Key to the Tower) +# - 64b91627dd13d43b9d01d6d1 # Toughbook reinforced laptop (Event quest) REMOVED BY BSG + +ReserveBase: +- 60915994c49cf53e4772cc38 # Military documents 1 on the table inside bunker control room (Documents) +- 60a3b6359c427533db36cf84 # Military documents 2 On the bottom shelf of the cupboard near the corner. +- 60a3b65c27adf161da7b6e14 # Military documents 3 Inside the cupboard next to the 4x4 Weapon Box. +- 608c22a003292f4ba43f8a1a # Medical record 1 (locked by RB-KSM key) (Disease history) +- 60a3b5b05f84d429b732e934 # Medical record 2 (locked by RB-SMP key) Disease history) +- 609267a2bb3f46069c3e6c7d # T-90M Commander Control Panel +- 60c080eb991ac167ad1c3ad4 # MBT Integrated Navigation System +- 6398a072e301557ae24cec92 # Original Lightkeeper Intelligence (Snatch) + +Laboratory: +- 5eff135be0d3331e9d282b7b # Flash drive marked with blue tape (TerraGroup employee) +- 6398a4cfb5992f573c6562b3 # Secured tape +#- 64bdcfed8f3a947a990aa49a # Hermetic container for storing various chemicals #1 REMOVED BY BSG +#- 64bdd008b0bf3baa6702f35f # Hermetic container for storing various chemicals #2 REMOVED BY BSG +#- 64bdd014f3a668f08805ce64 # Hermetic container for storing various chemicals #3 REMOVED BY BSG + +Streets of Tarkov: +- 63a943cead5cc12f22161ff7 # Accountant's notes (Audit) +- 638cbc68a63f1b49be6a3010 # Registered letter (Youve Got Mail) +- 638df4cc7b560b03794a18d2 # AG guitar pick (Audiophile) +- 638e0057ab150a5f56238960 # Housing office journal (Population Census) +- 63927b29c115f907b14700b9 # Chemical container with samples (Urban Medicine) +- 638dfc803083a019d447768e # Working hard drive (Surveillance) +- 638e9d5536b3b72c944e2fc7 # Flash drive with recordings (Watching You) +- 6393262086e646067c176aa2 # Medical observation record (?) +- 63989ced706b793c7d60cfef # Informant's journal (Missing Informant) +- 638cbb3ba63f1b49be6a300e # Secure Flash drive (Your Car Needs a Service) +- 63a39e1d234195315d4020bd # Primorsky 46-48 skybridge key diff --git a/Config/forced_static.yaml b/Config/forced_static.yaml new file mode 100644 index 0000000..486a9a1 --- /dev/null +++ b/Config/forced_static.yaml @@ -0,0 +1,16 @@ +--- +static_weapon_ids: + # ids for static weapons + - 5d52cc5ba4b9367408500062 + - 5cdeb229d7f00c000e7ce174 + +forced_items: + Customs: + # unknown key + - containerId: custom_multiScene_00058 + itemTpl: 593962ca86f774068014d9af + + Streets of Tarkov: + # Backup hideout key + - containerId: container_City_SE_02_Primorskiy_51_indoor_00001 + itemTpl: 6398fd8ad3de3849057f5128 \ No newline at end of file diff --git a/Config/map_directory_mapping.yaml b/Config/map_directory_mapping.yaml new file mode 100644 index 0000000..ad7226f --- /dev/null +++ b/Config/map_directory_mapping.yaml @@ -0,0 +1,29 @@ +--- +Customs: + name: + - bigmap +Factory: + name: + - factory4_day + - factory4_night +Interchange: + name: + - interchange +Laboratory: + name: + - laboratory +Lighthouse: + name: + - lighthouse +ReserveBase: + name: + - rezervbase +Shoreline: + name: + - shoreline +Woods: + name: + - woods +Streets of Tarkov: + name: + - tarkovstreets \ No newline at end of file diff --git a/GCHandler.cs b/GCHandler.cs new file mode 100644 index 0000000..87a3f35 --- /dev/null +++ b/GCHandler.cs @@ -0,0 +1,12 @@ +namespace LootDumpProcessor; + +public class GCHandler +{ + public static void Collect() + { + if (LootDumpProcessorContext.GetConfig().ManualGarbageCollectionCalls) + { + GC.Collect(); + } + } +} \ No newline at end of file diff --git a/Logger/ILogger.cs b/Logger/ILogger.cs new file mode 100644 index 0000000..3e410d1 --- /dev/null +++ b/Logger/ILogger.cs @@ -0,0 +1,8 @@ +namespace LootDumpProcessor.Logger; + +public interface ILogger +{ + void Setup(); + void Log(string message, LogLevel level); + void Stop(); +} \ No newline at end of file diff --git a/Logger/LogLevel.cs b/Logger/LogLevel.cs new file mode 100644 index 0000000..12972cc --- /dev/null +++ b/Logger/LogLevel.cs @@ -0,0 +1,9 @@ +namespace LootDumpProcessor.Logger; + +public enum LogLevel +{ + Error, + Warning, + Info, + Debug +} \ No newline at end of file diff --git a/Logger/LoggerFactory.cs b/Logger/LoggerFactory.cs new file mode 100644 index 0000000..71ae33a --- /dev/null +++ b/Logger/LoggerFactory.cs @@ -0,0 +1,14 @@ +namespace LootDumpProcessor.Logger; + +public static class LoggerFactory +{ + private static ILogger? _logger; + + public static ILogger GetInstance() + { + if (_logger == null) + _logger = new QueueLogger(); + // TODO: implement factory + return _logger; + } +} \ No newline at end of file diff --git a/Logger/QueueLogger.cs b/Logger/QueueLogger.cs new file mode 100644 index 0000000..6511201 --- /dev/null +++ b/Logger/QueueLogger.cs @@ -0,0 +1,109 @@ +using System.Collections.Concurrent; + +namespace LootDumpProcessor.Logger; + +public class QueueLogger : ILogger +{ + private BlockingCollection queuedMessages = new BlockingCollection(); + private Task? loggerThread; + private bool isRunning; + private int logLevel; + private static readonly int _logTerminationTimeoutMs = 1000; + private static readonly int _logTerminationRetryCount = 3; + + public void Setup() + { + SetLogLevel(); + isRunning = true; + loggerThread = Task.Factory.StartNew(() => + { + while (isRunning) + { + while (queuedMessages.TryTake(out var value)) + { + Console.ResetColor(); + switch (value.LogLevel) + { + case LogLevel.Error: + Console.BackgroundColor = ConsoleColor.Red; + Console.ForegroundColor = ConsoleColor.Black; + break; + case LogLevel.Warning: + Console.BackgroundColor = ConsoleColor.Yellow; + Console.ForegroundColor = ConsoleColor.Black; + break; + case LogLevel.Debug: + Console.ForegroundColor = ConsoleColor.DarkCyan; + break; + case LogLevel.Info: + default: + break; + } + + Console.WriteLine(value.Message); + } + + Thread.Sleep( + TimeSpan.FromMilliseconds(LootDumpProcessorContext.GetConfig().LoggerConfig.QueueLoggerPoolingTimeoutMs)); + } + }, TaskCreationOptions.LongRunning); + } + + private void SetLogLevel() + { + logLevel = GetLogLevel(LootDumpProcessorContext.GetConfig().LoggerConfig.LogLevel); + } + + private int GetLogLevel(LogLevel level) + { + switch (level) + { + case LogLevel.Error: + return 1; + case LogLevel.Warning: + return 2; + case LogLevel.Info: + return 3; + case LogLevel.Debug: + return 4; + default: + throw new ArgumentOutOfRangeException(); + } + } + + public void Log(string message, LogLevel level) + { + if (GetLogLevel(level) <= logLevel) + queuedMessages.Add(new LoggedMessage { Message = message, LogLevel = level }); + } + + // Wait for graceful termination of the logging thread + public void Stop() + { + isRunning = false; + if (loggerThread != null) + { + Console.ResetColor(); + int retryCount = 0; + while (!loggerThread.IsCompleted) + { + if (retryCount == _logTerminationRetryCount) + { + Console.WriteLine( + $"Logger thread did not terminate by itself after {retryCount} retries. Some log messages may be lost."); + break; + } + + Console.WriteLine($"Waiting {_logTerminationTimeoutMs}ms for logger termination"); + Thread.Sleep(_logTerminationTimeoutMs); + retryCount++; + } + } + } + + class LoggedMessage + { + public string Message { get; init; } + public LogLevel LogLevel { get; init; } + } +} \ No newline at end of file diff --git a/LootDumpProcessor.csproj b/LootDumpProcessor.csproj new file mode 100644 index 0000000..c5ee579 --- /dev/null +++ b/LootDumpProcessor.csproj @@ -0,0 +1,36 @@ + + + + Exe + net7.0 + enable + enable + true + true + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/LootDumpProcessor.sln b/LootDumpProcessor.sln new file mode 100644 index 0000000..543a87e --- /dev/null +++ b/LootDumpProcessor.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LootDumpProcessor", "LootDumpProcessor.csproj", "{887819E1-72BF-4F10-9246-77D8088AC7D2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {887819E1-72BF-4F10-9246-77D8088AC7D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {887819E1-72BF-4F10-9246-77D8088AC7D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {887819E1-72BF-4F10-9246-77D8088AC7D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {887819E1-72BF-4F10-9246-77D8088AC7D2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {39C0A9FF-B0F5-4C3F-AAA7-F9E9225AE70F} + EndGlobalSection +EndGlobal diff --git a/LootDumpProcessorContext.cs b/LootDumpProcessorContext.cs new file mode 100644 index 0000000..47cb433 --- /dev/null +++ b/LootDumpProcessorContext.cs @@ -0,0 +1,127 @@ +using LootDumpProcessor.Model.Config; +using LootDumpProcessor.Model.Output.StaticContainer; +using LootDumpProcessor.Process; +using LootDumpProcessor.Serializers.Json; +using LootDumpProcessor.Serializers.Yaml; + +namespace LootDumpProcessor; + +public class LootDumpProcessorContext +{ + private static Config? _config; + private static readonly object _configLock = new object(); + private static ForcedStatic? _forcedStatic; + private static readonly object _forcedStaticLock = new object(); + private static Dictionary? _mapDirectoryMappings; + private static readonly object _mapDirectoryMappingsLock = new object(); + private static HashSet? _staticWeaponIds; + private static readonly object _staticWeaponIdsLock = new object(); + private static Dictionary>? _forcedItems; + private static readonly object _forcedItemsLock = new object(); + private static Dictionary>? _forcedLoose; + private static readonly object _forcedLooseLock = new object(); + private static TarkovItems? _tarkovItems; + private static readonly object _tarkovItemsLock = new object(); + + public static Config GetConfig() + { + lock (_configLock) + { + if (_config == null) + { + // This is the only instance where manual selection of the serializer is required + // after this, GetInstance() for the JsonSerializerFactory should used without + // parameters + _config = JsonSerializerFactory.GetInstance(JsonSerializerTypes.DotNet) + .Deserialize(File.ReadAllText("./Config/config.json")); + } + } + + return _config; + } + + public static ForcedStatic GetForcedStatic() + { + lock (_forcedStaticLock) + { + if (_forcedStatic == null) + { + _forcedStatic = YamlSerializerFactory.GetInstance() + .Deserialize(File.ReadAllText("./Config/forced_static.yaml")); + } + } + + return _forcedStatic; + } + + public static Dictionary GetDirectoryMappings() + { + lock (_mapDirectoryMappingsLock) + { + if (_mapDirectoryMappings == null) + { + _mapDirectoryMappings = YamlSerializerFactory.GetInstance() + .Deserialize>( + File.ReadAllText("./Config/map_directory_mapping.yaml")); + } + } + + return _mapDirectoryMappings; + } + + public static HashSet GetStaticWeaponIds() + { + lock (_staticWeaponIdsLock) + { + if (_staticWeaponIds == null) + { + _staticWeaponIds = GetForcedStatic().StaticWeaponIds.ToHashSet(); + } + } + + return _staticWeaponIds; + } + + public static Dictionary> GetForcedItems() + { + lock (_forcedItemsLock) + { + if (_forcedItems == null) + { + _forcedItems = GetForcedStatic().ForcedItems; + } + } + + return _forcedItems; + } + + public static Dictionary> GetForcedLooseItems() + { + lock (_forcedLooseLock) + { + if (_forcedLoose == null) + { + _forcedLoose = YamlSerializerFactory.GetInstance().Deserialize>>( + File.ReadAllText("./Config/forced_loose.yaml")); + } + } + + return _forcedLoose; + } + + public static TarkovItems GetTarkovItems() + { + lock (_tarkovItemsLock) + { + if (_tarkovItems == null) + { + _tarkovItems = new TarkovItems( + $"{GetConfig().ServerLocation}/project/assets/database/templates/items.json", + $"{GetConfig().ServerLocation}/project/assets/database/templates/handbook.json" + ); + } + } + + return _tarkovItems; + } +} \ No newline at end of file diff --git a/Model/ComposedKey.cs b/Model/ComposedKey.cs new file mode 100644 index 0000000..3ed052e --- /dev/null +++ b/Model/ComposedKey.cs @@ -0,0 +1,41 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Model.Processing; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model; + +public class ComposedKey +{ + [JsonProperty("key")] + [JsonPropertyName("key")] + public string Key { get; init; } + + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public Item? FirstItem { get; } + + public ComposedKey(Template template) : this(template.Items) + { + } + + public ComposedKey(List? items) + { + Key = items?.Select(i => i.Tpl) + .Where(i => !string.IsNullOrEmpty(i) && + !LootDumpProcessorContext.GetTarkovItems().IsBaseClass(i, BaseClasses.Ammo)) + .Cast() + .Select(i => (double)i.GetHashCode()) + .Sum() + .ToString() ?? Guid.NewGuid().ToString(); + FirstItem = items?[0]; + } + + public override bool Equals(object? obj) + { + if (obj is not ComposedKey key) + return false; + return this.Key == key.Key; + } + + public override int GetHashCode() => Key.GetHashCode(); +} \ No newline at end of file diff --git a/Model/Config/Config.cs b/Model/Config/Config.cs new file mode 100644 index 0000000..e888406 --- /dev/null +++ b/Model/Config/Config.cs @@ -0,0 +1,48 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Serializers.Json; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class Config +{ + [JsonProperty("serverLocation")] + [JsonPropertyName("serverLocation")] + public string? ServerLocation { get; set; } + + [JsonProperty("threads")] + [JsonPropertyName("threads")] + public int Threads { get; set; } = 6; + + [JsonProperty("threadPoolingTimeoutMs")] + [JsonPropertyName("threadPoolingTimeoutMs")] + public int ThreadPoolingTimeoutMs { get; set; } = 1000; + + [JsonProperty("jsonSerializer")] + [JsonPropertyName("jsonSerializer")] + public JsonSerializerTypes JsonSerializer { get; set; } = JsonSerializerTypes.DotNet; + + [JsonProperty("manualGarbageCollectionCalls")] + [JsonPropertyName("manualGarbageCollectionCalls")] + public bool ManualGarbageCollectionCalls { get; set; } + + [JsonProperty("dataStorageConfig")] + [JsonPropertyName("dataStorageConfig")] + public DataStorageConfig DataStorageConfig { get; set; } + + [JsonProperty("loggerConfig")] + [JsonPropertyName("loggerConfig")] + public LoggerConfig LoggerConfig { get; set; } + + [JsonProperty("readerConfig")] + [JsonPropertyName("readerConfig")] + public ReaderConfig ReaderConfig { get; set; } + + [JsonProperty("processorConfig")] + [JsonPropertyName("processorConfig")] + public ProcessorConfig ProcessorConfig { get; set; } + + [JsonProperty("writerConfig")] + [JsonPropertyName("writerConfig")] + public WriterConfig WriterConfig { get; set; } +} \ No newline at end of file diff --git a/Model/Config/DataStorageConfig.cs b/Model/Config/DataStorageConfig.cs new file mode 100644 index 0000000..c8a7c23 --- /dev/null +++ b/Model/Config/DataStorageConfig.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Storage; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class DataStorageConfig +{ + [JsonProperty("dataStorageType")] + [JsonPropertyName("dataStorageType")] + public DataStorageTypes DataStorageType { get; set; } = DataStorageTypes.File; + + [JsonProperty("fileDataStorageTempLocation")] + [JsonPropertyName("fileDataStorageTempLocation")] + public string? FileDataStorageTempLocation { get; set; } +} \ No newline at end of file diff --git a/Model/Config/ForcedStatic.cs b/Model/Config/ForcedStatic.cs new file mode 100644 index 0000000..bfe6928 --- /dev/null +++ b/Model/Config/ForcedStatic.cs @@ -0,0 +1,12 @@ +using LootDumpProcessor.Model.Output.StaticContainer; +using YamlDotNet.Serialization; + +namespace LootDumpProcessor.Model.Config; + +public class ForcedStatic +{ + [YamlMember(Alias = "static_weapon_ids")] + public List StaticWeaponIds { get; set; } + + [YamlMember(Alias = "forced_items")] public Dictionary> ForcedItems { get; set; } +} \ No newline at end of file diff --git a/Model/Config/IntakeReaderConfig.cs b/Model/Config/IntakeReaderConfig.cs new file mode 100644 index 0000000..b3e820f --- /dev/null +++ b/Model/Config/IntakeReaderConfig.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Process.Reader; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class IntakeReaderConfig +{ + [JsonProperty("readerType")] + [JsonPropertyName("readerType")] + public IntakeReaderTypes IntakeReaderType { get; set; } = IntakeReaderTypes.Json; + + [JsonProperty("ignoredDumpLocations")] + [JsonPropertyName("ignoredDumpLocations")] + public List IgnoredDumpLocations { get; set; } = new List(); +} \ No newline at end of file diff --git a/Model/Config/LoggerConfig.cs b/Model/Config/LoggerConfig.cs new file mode 100644 index 0000000..40f22bf --- /dev/null +++ b/Model/Config/LoggerConfig.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Logger; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class LoggerConfig +{ + [JsonProperty("logLevel")] + [JsonPropertyName("logLevel")] + public LogLevel LogLevel { get; set; } = LogLevel.Info; + + [JsonProperty("queueLoggerPoolingTimeoutMs")] + [JsonPropertyName("queueLoggerPoolingTimeoutMs")] + public int QueueLoggerPoolingTimeoutMs { get; set; } = 1000; +} \ No newline at end of file diff --git a/Model/Config/MapDirectoryMapping.cs b/Model/Config/MapDirectoryMapping.cs new file mode 100644 index 0000000..c2d1feb --- /dev/null +++ b/Model/Config/MapDirectoryMapping.cs @@ -0,0 +1,11 @@ +using YamlDotNet.Serialization; + +namespace LootDumpProcessor.Model.Config; + +public class MapDirectoryMapping +{ + [YamlMember(Alias = "name")] + public List Name { get; set; } + [YamlMember(Alias = "threshold_date")] + public string ThresholdDate { get; set; } +} \ No newline at end of file diff --git a/Model/Config/PreProcessorConfig.cs b/Model/Config/PreProcessorConfig.cs new file mode 100644 index 0000000..83cd608 --- /dev/null +++ b/Model/Config/PreProcessorConfig.cs @@ -0,0 +1,20 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Process.Reader.PreProcess; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class PreProcessorConfig +{ + [JsonProperty("preProcessors")] + [JsonPropertyName("preProcessors")] + public List? PreProcessors { get; set; } + + [JsonProperty("preProcessorTempFolder")] + [JsonPropertyName("preProcessorTempFolder")] + public string? PreProcessorTempFolder { get; set; } + + [JsonProperty("cleanupTempFolderAfterProcess")] + [JsonPropertyName("cleanupTempFolderAfterProcess")] + public bool CleanupTempFolderAfterProcess { get; set; } = true; +} \ No newline at end of file diff --git a/Model/Config/ProcessorConfig.cs b/Model/Config/ProcessorConfig.cs new file mode 100644 index 0000000..004f475 --- /dev/null +++ b/Model/Config/ProcessorConfig.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class ProcessorConfig +{ + [JsonProperty("spawnPointToleranceForForced")] + [JsonPropertyName("spawnPointToleranceForForced")] + public double SpawnPointToleranceForForced { get; set; } = 99D; +} \ No newline at end of file diff --git a/Model/Config/ReaderConfig.cs b/Model/Config/ReaderConfig.cs new file mode 100644 index 0000000..d37f157 --- /dev/null +++ b/Model/Config/ReaderConfig.cs @@ -0,0 +1,36 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Process.Reader.Filters; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class ReaderConfig +{ + [JsonProperty("intakeReaderConfig")] + [JsonPropertyName("intakeReaderConfig")] + public IntakeReaderConfig? IntakeReaderConfig { get; set; } + + [JsonProperty("preProcessorConfig")] + [JsonPropertyName("preProcessorConfig")] + public PreProcessorConfig? PreProcessorConfig { get; set; } + + [JsonProperty("dumpFilesLocation")] + [JsonPropertyName("dumpFilesLocation")] + public List? DumpFilesLocation { get; set; } + + [JsonProperty("thresholdDate")] + [JsonPropertyName("thresholdDate")] + public string? ThresholdDate { get; set; } + + [JsonProperty("acceptedFileExtensions")] + [JsonPropertyName("acceptedFileExtensions")] + public List AcceptedFileExtensions { get; set; } = new List(); + + [JsonProperty("processSubFolders")] + [JsonPropertyName("processSubFolders")] + public bool ProcessSubFolders { get; set; } + + [JsonProperty("fileFilters")] + [JsonPropertyName("fileFilters")] + public List? FileFilters { get; set; } +} \ No newline at end of file diff --git a/Model/Config/WriterConfig.cs b/Model/Config/WriterConfig.cs new file mode 100644 index 0000000..fd6042b --- /dev/null +++ b/Model/Config/WriterConfig.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Config; + +public class WriterConfig +{ + [JsonProperty("outputLocation")] + [JsonPropertyName("outputLocation")] + public string? OutputLocation { get; set; } +} \ No newline at end of file diff --git a/Model/FireMode.cs b/Model/FireMode.cs new file mode 100644 index 0000000..ba76a80 --- /dev/null +++ b/Model/FireMode.cs @@ -0,0 +1,20 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model +{ + public class FireMode : ICloneable + { + [JsonProperty("FireMode", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("FireMode")] + public string? FireModeType { get; set; } + + public object Clone() + { + return new FireMode + { + FireModeType = this.FireModeType + }; + } + } +} \ No newline at end of file diff --git a/Model/Foldable.cs b/Model/Foldable.cs new file mode 100644 index 0000000..848faf2 --- /dev/null +++ b/Model/Foldable.cs @@ -0,0 +1,20 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model +{ + public class Foldable : ICloneable + { + [JsonProperty("Folded", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Folded")] + public bool? Folded { get; set; } + + public object Clone() + { + return new Foldable + { + Folded = this.Folded + }; + } + } +} \ No newline at end of file diff --git a/Model/GroupPosition.cs b/Model/GroupPosition.cs new file mode 100644 index 0000000..07ef0f5 --- /dev/null +++ b/Model/GroupPosition.cs @@ -0,0 +1,36 @@ +using System.Text.Json.Serialization; +using LootDumpProcessor.Process.Processor; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model +{ + public class GroupPosition : ICloneable + { + [JsonProperty("Name", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Name")] + public string? Name { get; set; } + + [JsonProperty("Weight", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Weight")] + public int? Weight { get; set; } + + [JsonProperty("Position", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Position")] + public Vector3? Position { get; set; } + + [JsonProperty("Rotation", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Rotation")] + public Vector3? Rotation { get; set; } + + public object Clone() + { + return new GroupPosition + { + Name = this.Name, + Weight = this.Weight, + Position = ProcessorUtil.Copy(this.Position), + Rotation = ProcessorUtil.Copy(this.Rotation) + }; + } + } +} \ No newline at end of file diff --git a/Model/Input/AirdropParameter.cs b/Model/Input/AirdropParameter.cs new file mode 100644 index 0000000..85648b3 --- /dev/null +++ b/Model/Input/AirdropParameter.cs @@ -0,0 +1,48 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Input +{ + public class AirdropParameter + { + [JsonProperty("PlaneAirdropStartMin", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropStartMin")] + public int? PlaneAirdropStartMin { get; set; } + + [JsonProperty("PlaneAirdropStartMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropStartMax")] + public int? PlaneAirdropStartMax { get; set; } + + [JsonProperty("PlaneAirdropEnd", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropEnd")] + public int? PlaneAirdropEnd { get; set; } + + [JsonProperty("PlaneAirdropChance", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropChance")] + public double? PlaneAirdropChance { get; set; } + + [JsonProperty("PlaneAirdropMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropMax")] + public int? PlaneAirdropMax { get; set; } + + [JsonProperty("PlaneAirdropCooldownMin", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropCooldownMin")] + public int? PlaneAirdropCooldownMin { get; set; } + + [JsonProperty("PlaneAirdropCooldownMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PlaneAirdropCooldownMax")] + public int? PlaneAirdropCooldownMax { get; set; } + + [JsonProperty("AirdropPointDeactivateDistance", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AirdropPointDeactivateDistance")] + public int? AirdropPointDeactivateDistance { get; set; } + + [JsonProperty("MinPlayersCountToSpawnAirdrop", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MinPlayersCountToSpawnAirdrop")] + public int? MinPlayersCountToSpawnAirdrop { get; set; } + + [JsonProperty("UnsuccessfulTryPenalty", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("UnsuccessfulTryPenalty")] + public int? UnsuccessfulTryPenalty { get; set; } + } +} \ No newline at end of file diff --git a/Model/Input/Banner.cs b/Model/Input/Banner.cs new file mode 100644 index 0000000..d003249 --- /dev/null +++ b/Model/Input/Banner.cs @@ -0,0 +1,14 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Input +{ + public class Banner + { + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] [JsonPropertyName("id")] + public string? Id { get; set; } + + [JsonProperty("pic")] [JsonPropertyName("pic")] + public Preview? Pic { get; set; } + } +} diff --git a/Model/Input/BotLocationModifier.cs b/Model/Input/BotLocationModifier.cs new file mode 100644 index 0000000..d9415cb --- /dev/null +++ b/Model/Input/BotLocationModifier.cs @@ -0,0 +1,28 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Input +{ + public class BotLocationModifier + { + [JsonProperty("AccuracySpeed", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AccuracySpeed")] + public double? AccuracySpeed { get; set; } + + [JsonProperty("Scattering", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Scattering")] + public double? Scattering { get; set; } + + [JsonProperty("GainSight", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("GainSight")] + public double? GainSight { get; set; } + + [JsonProperty("MarksmanAccuratyCoef", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MarksmanAccuratyCoef")] + public double? MarksmanAccuratyCoef { get; set; } + + [JsonProperty("VisibleDistance", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("VisibleDistance")] + public double? VisibleDistance { get; set; } + } +} \ No newline at end of file diff --git a/Model/Input/ColliderParams.cs b/Model/Input/ColliderParams.cs new file mode 100644 index 0000000..cb04740 --- /dev/null +++ b/Model/Input/ColliderParams.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Input +{ + public class ColliderParams + { + [JsonProperty("_parent", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("_parent")] + public string? Parent { get; set; } + + [JsonProperty("_props", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("_props")] + public Props? Props { get; set; } + } +} \ No newline at end of file diff --git a/Model/Input/Data.cs b/Model/Input/Data.cs new file mode 100644 index 0000000..051ffe0 --- /dev/null +++ b/Model/Input/Data.cs @@ -0,0 +1,320 @@ +using System.Text.Json.Serialization; +using Newtonsoft.Json; + +namespace LootDumpProcessor.Model.Input +{ + public class Data + { + [JsonProperty("Enabled", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Enabled")] + public bool? Enabled { get; set; } + + [JsonProperty("EnableCoop", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("EnableCoop")] + public bool? EnableCoop { get; set; } + + [JsonProperty("Locked", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Locked")] + public bool? Locked { get; set; } + + [JsonProperty("Insurance", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Insurance")] + public bool? Insurance { get; set; } + + [JsonProperty("SafeLocation", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("SafeLocation")] + public bool? SafeLocation { get; set; } + + [JsonProperty("Name", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Name")] + public string? Name { get; set; } + + [JsonProperty("Description", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Description")] + public string? Description { get; set; } + + [JsonProperty("Scene", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Scene")] + public Preview? Scene { get; set; } + + [JsonProperty("Area", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Area")] + public double? Area { get; set; } + + [JsonProperty("RequiredPlayerLevel", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("RequiredPlayerLevel")] + public int? RequiredPlayerLevel { get; set; } + + [JsonProperty("PmcMaxPlayersInGroup", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("PmcMaxPlayersInGroup")] + public int? PmcMaxPlayersInGroup { get; set; } + + [JsonProperty("ScavMaxPlayersInGroup", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("ScavMaxPlayersInGroup")] + public int? ScavMaxPlayersInGroup { get; set; } + + [JsonProperty("MinPlayers", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MinPlayers")] + public int? MinPlayers { get; set; } + + [JsonProperty("MaxPlayers", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MaxPlayers")] + public int? MaxPlayers { get; set; } + + [JsonProperty("MaxCoopGroup", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MaxCoopGroup")] + public int? MaxCoopGroup { get; set; } + + [JsonProperty("exit_count", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("exit_count")] + public int? ExitCount { get; set; } + + [JsonProperty("exit_access_time", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("exit_access_time")] + public int? ExitAccessTime { get; set; } + + [JsonProperty("exit_time", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("exit_time")] + public int? ExitTime { get; set; } + + [JsonProperty("Preview", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Preview")] + public Preview? Preview { get; set; } + + [JsonProperty("IconX", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("IconX")] + public int? IconX { get; set; } + + [JsonProperty("IconY", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("IconY")] + public int? IconY { get; set; } + + [JsonProperty("filter_ex", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("filter_ex")] + public List? FilterEx { get; set; } + + [JsonProperty("waves", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("waves")] + public List? Waves { get; set; } + + [JsonProperty("limits", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("limits")] + public List? Limits { get; set; } + + [JsonProperty("AveragePlayTime", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AveragePlayTime")] + public int? AveragePlayTime { get; set; } + + [JsonProperty("AveragePlayerLevel", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AveragePlayerLevel")] + public int? AveragePlayerLevel { get; set; } + + [JsonProperty("EscapeTimeLimit", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("EscapeTimeLimit")] + public int? EscapeTimeLimit { get; set; } + + [JsonProperty("EscapeTimeLimitCoop", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("EscapeTimeLimitCoop")] + public int? EscapeTimeLimitCoop { get; set; } + + [JsonProperty("Rules", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Rules")] + public string? Rules { get; set; } + + [JsonProperty("IsSecret", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("IsSecret")] + public bool? IsSecret { get; set; } + + [JsonProperty("doors", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("doors")] + public List? Doors { get; set; } + + [JsonProperty("tmp_location_field_remove_me", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("tmp_location_field_remove_me")] + public int? TmpLocationFieldRemoveMe { get; set; } + + [JsonProperty("MinDistToExitPoint", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MinDistToExitPoint")] + public int? MinDistToExitPoint { get; set; } + + [JsonProperty("MaxDistToFreePoint", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MaxDistToFreePoint")] + public int? MaxDistToFreePoint { get; set; } + + [JsonProperty("MinDistToFreePoint", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MinDistToFreePoint")] + public int? MinDistToFreePoint { get; set; } + + [JsonProperty("MaxBotPerZone", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MaxBotPerZone")] + public int? MaxBotPerZone { get; set; } + + [JsonProperty("OpenZones", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("OpenZones")] + public string? OpenZones { get; set; } + + [JsonProperty("OcculsionCullingEnabled", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("OcculsionCullingEnabled")] + public bool? OcculsionCullingEnabled { get; set; } + + [JsonProperty("GlobalLootChanceModifier", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("GlobalLootChanceModifier")] + public double? GlobalLootChanceModifier { get; set; } + + [JsonProperty("OldSpawn", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("OldSpawn")] + public bool? OldSpawn { get; set; } + + [JsonProperty("NewSpawn", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("NewSpawn")] + public bool? NewSpawn { get; set; } + + [JsonProperty("BotMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotMax")] + public int? BotMax { get; set; } + + [JsonProperty("BotStart", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotStart")] + public int? BotStart { get; set; } + + [JsonProperty("BotStop", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotStop")] + public int? BotStop { get; set; } + + [JsonProperty("BotMaxTimePlayer", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotMaxTimePlayer")] + public int? BotMaxTimePlayer { get; set; } + + [JsonProperty("BotSpawnTimeOnMin", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotSpawnTimeOnMin")] + public int? BotSpawnTimeOnMin { get; set; } + + [JsonProperty("BotSpawnTimeOnMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotSpawnTimeOnMax")] + public int? BotSpawnTimeOnMax { get; set; } + + [JsonProperty("BotSpawnTimeOffMin", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotSpawnTimeOffMin")] + public int? BotSpawnTimeOffMin { get; set; } + + [JsonProperty("BotSpawnTimeOffMax", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotSpawnTimeOffMax")] + public int? BotSpawnTimeOffMax { get; set; } + + [JsonProperty("BotMaxPlayer", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotMaxPlayer")] + public int? BotMaxPlayer { get; set; } + + [JsonProperty("BotEasy", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotEasy")] + public int? BotEasy { get; set; } + + [JsonProperty("BotNormal", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotNormal")] + public int? BotNormal { get; set; } + + [JsonProperty("BotHard", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotHard")] + public int? BotHard { get; set; } + + [JsonProperty("BotImpossible", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotImpossible")] + public int? BotImpossible { get; set; } + + [JsonProperty("BotAssault", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotAssault")] + public int? BotAssault { get; set; } + + [JsonProperty("BotMarksman", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotMarksman")] + public int? BotMarksman { get; set; } + + [JsonProperty("DisabledScavExits", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("DisabledScavExits")] + public string? DisabledScavExits { get; set; } + + [JsonProperty("AccessKeys", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AccessKeys")] + public List? AccessKeys { get; set; } + + [JsonProperty("UnixDateTime", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("UnixDateTime")] + public int? UnixDateTime { get; set; } + + [JsonProperty("users_gather_seconds", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("users_gather_seconds")] + public int? UsersGatherSeconds { get; set; } + + [JsonProperty("users_spawn_seconds_n", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("users_spawn_seconds_n")] + public int? UsersSpawnSecondsN { get; set; } + + [JsonProperty("users_spawn_seconds_n2", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("users_spawn_seconds_n2")] + public int? UsersSpawnSecondsN2 { get; set; } + + [JsonProperty("users_summon_seconds", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("users_summon_seconds")] + public int? UsersSummonSeconds { get; set; } + + [JsonProperty("sav_summon_seconds", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("sav_summon_seconds")] + public int? SavSummonSeconds { get; set; } + + [JsonProperty("matching_min_seconds", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("matching_min_seconds")] + public int? MatchingMinSeconds { get; set; } + + [JsonProperty("GenerateLocalLootCache", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("GenerateLocalLootCache")] + public bool? GenerateLocalLootCache { get; set; } + + [JsonProperty("MinMaxBots", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("MinMaxBots")] + public List? MinMaxBots { get; set; } + + [JsonProperty("BotLocationModifier", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("BotLocationModifier")] + public BotLocationModifier? BotLocationModifier { get; set; } + + [JsonProperty("exits", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("exits")] + public List? Exits { get; set; } + + [JsonProperty("DisabledForScav", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("DisabledForScav")] + public bool? DisabledForScav { get; set; } + + [JsonProperty("ExitZones", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("ExitZones")] + public ExitZones? ExitZones { get; set; } + + [JsonProperty("SpawnPointParams", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("SpawnPointParams")] + public List? SpawnPointParams { get; set; } + + [JsonProperty("AirdropParameters", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("AirdropParameters")] + public List? AirdropParameters { get; set; } + + [JsonProperty("Id", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Id")] + public string? Id { get; set; } + + [JsonProperty("_Id", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("_Id")] + public string? _Id { get; set; } + + [JsonProperty("Loot", NullValueHandling = NullValueHandling.Ignore)] + [JsonPropertyName("Loot")] + public List