Commit Graph

368 Commits

Author SHA1 Message Date
Archangel 7e2e3db3fd Change property naming to be more consistent (#578) 2025-08-28 15:32:02 +02:00
Archangel d4ed6c3392 Update profile migration code 2025-08-26 20:11:03 +02:00
Chomp 0df0d95363 First pass at rest area hideout changes 2025-08-23 21:02:24 +01:00
Archangel 646211ef04 Push global bot settings models, breaks server 2025-08-23 17:44:17 +02:00
Chomp 1df80171eb Added new property to profiles 2025-08-23 14:34:53 +01:00
Chomp c40439d04f Updated core difficulty code to use JsonElement 2025-08-23 10:30:26 +01:00
Chomp 3312a5f28c Fixed Server serializing difficulty values incorrectly 2025-08-23 10:14:04 +01:00
Archangel d413a6e9c5 Remove TraderStore, use DatabaseService as the source of truth 2025-08-21 16:18:41 +02:00
Chomp 038f12ab6c Copy improvements over to AddItemToBotContainerFixedPosition 2025-08-20 14:12:17 +01:00
Chomp 5a5f80aa58 Extracted logic from TryAddItemToBotContainer into helper method + added guard clause 2025-08-20 12:20:47 +01:00
Chomp d8987d55f7 Renamed method to TryAddItemToBotContainer 2025-08-20 12:05:47 +01:00
Chomp 108e6d7512 Improved no container check inside AddItemToBotContainer 2025-08-20 11:58:19 +01:00
Chomp c7a27529bf Fixed AddItemToBotContainer not correctly finding container by index 2025-08-20 10:43:36 +01:00
Chomp 7e1960b939 Removed reflection from tests 2025-08-19 20:20:23 +01:00
Chris Adamson 1e2fb87908 added isside check and tests (#562)
* added isside check and tests

* csharpier
2025-08-19 19:05:05 +00:00
Chris Adamson 457e7cd36c Fix: Killing the client will no longer save your items (#557)
* alt-f4 is for timmys and rats, not chads like Chomp

* peer review fixes

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-08-19 16:39:20 +00:00
Chomp 8573e6ae02 Use string.empty and MongoId.Empty() where appropriate 2025-08-17 21:35:34 +01:00
Chomp 8b0445375b Revert 2025-08-17 20:06:38 +01:00
Chomp c1522c278e Validate profiles on server start, can be disabled via core.config 2025-08-17 19:56:59 +01:00
Archangel e4a80f1f42 Make main database properties immutable 2025-08-17 17:57:58 +02:00
Chomp c8108600ec Updated ProcessStaleOffer and FlagExpiredOffersAfterDate to use offer object extension method to check if its a trader offer 2025-08-17 16:40:42 +01:00
Chomp c87bace62c Made RagfairRequiredItemsService cache generate on use instead of every Update() 2025-08-17 16:28:58 +01:00
Chomp 3f0d68dbf6 Minor refresh of RagfairRequiredItemsService
Adding a new set + lookup is now atomic
Returns a readonly set, caller shouldn't be able to ever modify this data
Removed memory allocation when calling `GetRequiredOffersById` with a tpl that doesn't have any offerIds
2025-08-17 15:47:03 +01:00
Cj bb649e6748 Warning fixes and ProfileValidatorHelper cleanup (#551)
* Fix warnings in ProfileHelper.cs

* Refactor ProfileValidatorHelper.cs

* reduce nesting
2025-08-15 11:29:46 +00:00
Chomp 07504d406e Renamed TryFillContainerMapWithItem and changed output to better follow c# conventions 2025-08-15 11:24:10 +01:00
Chomp b061200803 Refactor of how bot loot has its position picked to improve performance (#548)
* Initial work on moving container space checks into new class

* Updated tests

Wired up service to save item into inventory when space is found

Updated `FillContainerMapWithItem` to return outcome and not throw exception on failure

Add containers to bot when generating bot equipment

Clean bot cache after completion of loot generation

Removed redundant code from `AddItemWithChildrenToEquipmentSlot`

Removed unnecessary Singleton status from `BotInventoryContainerService`

* Clean-up of service

* Add botId xml docs

* Updated documentation for `FillContainerMapWithItem`

* Code review fixes and improvements

* Remove TODO

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-08-13 15:35:57 +00:00
Chomp 2d780eb791 Fixed GetLootFromCache filtering out valid loot items 2025-08-13 12:41:29 +01:00
Jesse 60958b3d24 Merge pull request #544 from sp-tarkov/remove-warnings
Remove unused dependencies and improve code quality
2025-08-12 19:26:05 +02:00
Cj e54dcbd4d1 Fix more warnings... (#543)
* Fix more warnings...

* Fix mistake
2025-08-12 15:28:54 +00:00
Chomp 4a081a7ac3 Updated class param formatting 2025-08-11 21:08:55 +01:00
Archangel 860daee674 Improve prestige quest handling if quest does not exist 2025-08-11 15:41:49 +02:00
Chomp 6ad88a3c7a Improved item lookup safety inside FixShotgunDispersions 2025-08-09 11:53:03 +01:00
Lacyway d468848b0c Improve MongoIds (#537)
* Mongoid improvements pt1

* Format Style Fixes

* Fix incorrect string

* Fix != comparison

---------

Co-authored-by: sp-tarkov-bot <singleplayertarkov@gmail.com>
2025-08-09 11:50:49 +01:00
Chomp 0b91250c3d Used single TryGetValue instead of ContainsKey + direct access 2025-08-08 15:57:30 +01:00
Chomp 2f962ef6dc string to mongoId conversion 2025-08-07 15:08:37 +01:00
Chomp cdc9cd59e2 Replaced Wishlist property in profile with pure dictionary 2025-08-06 12:47:28 +01:00
Archangel c3b36f4c7d Handle invalid profiles on all IOnUpdate 2025-08-05 17:20:49 +02:00
Chomp 3b4bcaf910 Made use of AddUpd extension 2025-08-05 15:56:23 +01:00
Jesse c7e40deb90 Add support for partially loading invalid profiles (#533)
* Add support for partially loading invalid profiles

* Return early in exception
2025-08-05 15:25:47 +01:00
Chomp 98eae09034 Simplified logic inside ContainsActiveProfile and added comments 2025-08-05 13:53:17 +01:00
Archangel be289d590d Remove unecessary casting, handle sorting migrations in extension 2025-08-05 04:10:13 +02:00
Archangel 0b250161be If profile can't be loaded log the exception and throw 2025-08-05 03:51:18 +02:00
Chomp 3276c45e57 Hideout slot size check safety improvements 2025-08-04 19:17:26 +01:00
Chomp 443878e75a Cleaned up CheckForOrphanedModdedItems
Now deletes modded child items
Fixed values not being logged correctly
Only log error message once instead of for every invalid item, players don't read it anyway
2025-08-04 19:16:35 +01:00
Chomp f4210a3d15 Fixed Collection was modified exception inside CheckForOrphanedModdedItems 2025-08-04 17:55:19 +01:00
Archangel 4c66cbef36 Handle failed non restartable quests better 2025-08-04 16:22:12 +02:00
Chomp 9793cd25ed Improved key lookup inside ProcessPostRaidQuests() 2025-08-04 13:38:56 +01:00
Chomp e7fd757dce Improved how bots are generated to be less blocking
Updated `GenerateBotWaves` to return empty results when request data is empty

Cleaned up `GenerateBotWave` to not need a manual lock
Improved `botRelativeLevelDelta` value in pmc.config

Updated `MatchBotDetailsCacheService` to store PMCs primary weapon tpl
2025-08-04 13:25:19 +01:00
Chomp 0ea5269756 Updated profile SkillTypes property to use string to enum converter
Updated surrounding properties to not be null
Updated related code to reflect nullability change
2025-08-03 09:52:18 +01:00
Archangel cec47fefd2 Apply enforced file scoped namespacing 2025-07-31 15:23:32 +02:00