Commit Graph

100 Commits

Author SHA1 Message Date
DrakiaXYZ d375879a3a Fix post-raid health (#661)
* Fix post-raid health
- Re-add death penalty for limbs
- Correctly set body part HP to 1 for cursed death only
- Use the server profile body part max HP for calculating penalties
- Never modify the body part max HP on the profile
- Remove ResetMaxLimbHp as it's unnecessary if we never update max HP elsewhere

* Formatting

* Remove unnecessary null coalescing

* Stupid formatting

---------

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
2025-10-26 08:47:40 +00:00
Cj 36b247d92e Move HideoutAreas to the Models.Enums.Hideout namespace 2025-09-29 18:14:59 -04:00
Chomp 7ec29e1e12 Converted FlagCultistCircleCraftAsComplete into extension method 2025-09-08 13:08:10 +01:00
Chomp 5d93d1cd6d Converted GetSkillBonusMultipliedBySkillLevel into extension method 2025-09-08 13:04:11 +01:00
Chomp 0b2843cff6 Converted ProfileMeetsTraderLoyaltyLevelToBuyOffer to extension method 2025-09-08 12:56:14 +01:00
Chomp 8177093b16 Updated EnsureItemHasValidStackCount to be an extension method 2025-09-08 12:48:06 +01:00
Archangel 7e2e3db3fd Change property naming to be more consistent (#578) 2025-08-28 15:32:02 +02:00
sp-tarkov-bot 6fbbc6f483 Format Style Fixes 2025-08-21 12:16:34 +00:00
Alex f617fa13f2 Added ObjectExtensions functions to deal with ExtensionData dictionaries within the project 2025-08-21 13:15:44 +01:00
clodanSPT d14e7cc155 Added ceciler patch to add jsonextensiondata (#565)
Co-authored-by: Alex <clodanSPT@hotmail.com>
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-08-21 09:45:07 +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
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
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 dea94255e4 Bot generation performance improvements
Trader assort generation performance improvements

Removed use of recursion inside `FindAndReturnChildrenByAssort`
Created extension method `CreateParentIdLookupCache`
2025-08-08 12:33:31 +01:00
Chomp ccfac42814 Improved performance of GetItemWithChildren()
Reduced number of enumerations of `itemWithChildren` inside AddItemWithChildrenToEquipmentSlot()` by converting children to list at start of method
Applied additional filtering to child items collection inside `GetContainerItemsWithChildren()`
2025-08-06 23:14:32 +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 460d359a0d Added AddUpd extension method 2025-08-05 14:09:54 +01:00
Archangel ffb7c72abc Re-add summary to sort method 2025-08-05 04:15:56 +02:00
Archangel be289d590d Remove unecessary casting, handle sorting migrations in extension 2025-08-05 04:10:13 +02: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 08815da10d Improved Fake PMC offer count fluctuations #527
Added fake PMC offer count index to `RagfairOfferHolder` and made use of it when checking if offer count is over desired count
2025-08-02 11:22:27 +01:00
Archangel cec47fefd2 Apply enforced file scoped namespacing 2025-07-31 15:23:32 +02:00
Archangel aec8420d53 Cleanup todos, run VS cleanup & enforce file scoped namespacing 2025-07-31 15:18:20 +02:00
Chomp c89c84dff3 Converted RemoveFiRStatusFromItemsInContainer into extension method
Improved performance of method by using breadth-first search to find children instead of loop
Wrote tests for method
2025-07-30 23:13:09 +01:00
Chomp 503967935b Improved declaration of _deathStates 2025-07-30 17:31:14 +01:00
Chomp 357c2f5dac Created EndRaidResultExtensions 2025-07-30 17:30:50 +01:00
sp-tarkov-bot b14b74bf24 Format Style Fixes 2025-07-28 19:39:29 +00:00
Chomp a1b1c6d815 Updated string to mongoId 2025-07-27 13:31:46 +01:00
R3ality 7733d2df96 Fix typo in locationMultipler 2025-07-27 13:15:37 +03:00
Chomp 34bd002876 list to ienumerable changes
Removed unused methods

strong to mongoId changes
2025-07-25 12:28:40 +01:00
Archangel 384381f57e Make ItemLacksSlotsCartridgesAndChambers more robust, migrate to extension 2025-07-24 22:46:23 +02:00
Chomp f562c634a7 Converted lists to hashsets where appropriate
Removed unnecessary uses of  ToList()
string to mongoId conversions
2025-07-24 13:26:34 +01:00
Chomp db34eaa501 Updated various methods to accept IEnumerable instead of List 2025-07-23 10:57:49 +01:00
Chomp 731b79519f Rename method to GetItemWithChildren 2025-07-22 20:43:08 +01:00
Jesse c852debf2b Bundle loader refactor (#502)
* Bundle loader refactor

- Made async
- Validate if bundle actually exists, if not throw warning into the console
- Updated mod example

* Cleanup unused var
2025-07-22 12:54:06 +01:00
Chomp 3901a91f45 Improved how ragfair offer creator status is checked - store creator type in offer
Converted `IsTraderOffer` into extension method
string to mongoid conversions
2025-07-21 13:36:51 +01:00
Chomp 9a92440b31 Simplified IsVertical() 2025-07-19 22:33:37 +01:00
Chomp 46638b1197 Refactored FindAndReturnChildrenAsItems method for better performance 2025-07-19 13:03:28 +01:00
Chomp d7f83e1b7d Micro-optimisations
Moved `GetInventoryItemHash` to extensions and rewrote to make better use of linq
2025-07-19 11:11:59 +01:00
Chomp 38fb2454c7 Various micro-optimisations 2025-07-18 16:05:29 +01:00
Chomp 80624ece4d Improved handling of null location id inside GetRoubleValue 2025-07-18 09:38:13 +01:00
Chomp 50f684537d Expanded max loot in pmc container systems
Now allows for per-map multipliers + pocket + vest loot uses same level-based value as backpack

labs multiplier = 2
labyrinth = 4

Removed nullability from some properties
2025-07-17 18:25:31 +01:00
Chomp f3482e28d9 Removed unnecessary nulls from Globals class 2025-07-16 12:20:19 +01:00
Chomp 38b1f648ce Added dictionary extensions 2025-07-16 10:13:33 +01:00
Chomp 040be2feaa More strings to MongoIds
Convert constructors into primary constructors

Simplified logic with use of ??, ??= and method groups

Cleaned up redundant conditional access qualifiers
2025-07-14 22:29:41 +01:00
Chomp 5ef2271a29 Converted collections to their frozen counterparts for improved lookup speed 2025-07-14 19:56:20 +01:00
Jesse a00b5c51d2 More prestige fixes (#471)
* Only send message if there's items to be sent

* Update variable name

* Fix up incrementing a null integer
2025-07-11 14:52:33 +01:00
Chomp 9e136fa664 Reset limb max value after a raid 2025-07-08 10:08:36 +01:00
Chomp 7bda1b525f Updated acceptableFileExtensions to be a frozenSet
Removed more boxing
2025-07-07 13:31:39 +01:00