0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 06:50:45 -05:00

8 Commits

Author SHA1 Message Date
BlueXTX
f2fd256aac
Get rid of static and use dependency injection instead (#8)
* Improved thread safety and async processing in dump processor components

* Removed unused _processedDumps field and simplified variable scope in QueuePipeline

* Refactored service registration into dedicated extension methods

* Added configuration binding and environment variables support

* Refactored collector initialization to use dependency injection

* Refactored data storage to use dependency injection

* Refactored configuration models to use records and added validation

* Refactored static loot configuration to use dependency injection

The changes include:
- Moved static weapon IDs and forced items from LootDumpProcessorContext to ForcedStatic record
- Added ForcedStatic configuration injection in StaticLootProcessor and StaticContainerProcessor
- Improved immutability by using read-only collections in ForcedStatic model
- Simplified LootDumpProcessorContext by removing unused methods

* Refactored configuration access to use dependency injection consistently

* Fixed ForcedStatic configuration

* Refactored forced items configuration to use async provider pattern

The changes introduce a new `IForcedItemsProvider` abstraction to handle loading and caching of forced static and loose loot configurations. This improves the code by:

1. Making configuration loading asynchronous
2. Implementing caching of loaded configurations
3. Centralizing forced items configuration access
4. Removing direct file system dependencies from processors
5. Improving testability through dependency injection

The change also updates related processors and interfaces to use async/await pattern consistently.

* Refactored loose loot processor to use async forced items provider

* Reorganized processor and service components into dedicated namespaces
2025-01-13 17:05:36 +00:00
BlueXTX
3cb1be1ec9
Fix static loot output (#6)
* Improved thread safety and async processing in dump processor components

* Removed unused _processedDumps field and simplified variable scope in QueuePipeline
2025-01-12 23:19:41 +00:00
9e9933bd32 Refactored key generation and improved type safety across storage components 2025-01-11 11:50:02 +03:00
02802ddc10 Refactored storage layer to improve thread safety and code consistency 2025-01-11 11:26:11 +03:00
e52a8b2fad Removed unused GetAll method from storage interfaces and implementations 2025-01-11 11:08:37 +03:00
4003ca254b Refactored YAML serialization to use static Serializer/Deserializer instances 2025-01-11 11:02:43 +03:00
465ad95cb5 Refactored code to use System.Text.Json and improved code style
The changes include:
- Replaced Newtonsoft.Json with System.Text.Json for serialization
- Removed redundant JsonProperty attributes and simplified model classes
- Converted static fields to constants where appropriate
- Improved code formatting and readability
- Simplified method bodies and expressions
- Removed unused imports and cleaned up namespaces
2025-01-11 10:52:23 +03:00
8cc4340340 Added source solution folder to organize project structure 2025-01-10 20:46:10 +03:00