Commit Graph

38 Commits

Author SHA1 Message Date
Chomp 5c26f47e2f Use correct new MongoId() instead of hashutil 2025-07-02 10:56:10 +01:00
Jesse 54f0d0779c Convert TemplateItem to MongoId (#436)
* Convert TemplateItem to MongoId

* Push new extensions

* Handle null mongoid's being passed to regex

* Handle null strings, fixes item events

* Updated loot generation to work with new property `composedKey`

Fixed typo in `SlotId`

* Fix missing method after merge

* Remove duplicately named MongoIDExtensions?

* Fixed location loot generation to handle impending loot json changes

* Updated location JSONs with new properties (excluding lighthouse loose loot)

* Fixed build issue with ItemTplGenerator

* use correct handing for new mongo ids

* Added helper method to improve readability

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-07-02 10:14:04 +01:00
Jesse 6ac747d18d Begin converting some id's to MongoId (#435)
* Begin converting some id's to MongoId

* Remove nullability on MongoId's

* Update trader MongoId's
2025-06-30 15:25:47 +01:00
Jesse 5686f4a486 Remove I18nService, migrate to renamed ServerLocalisationService (#433)
* Remove I18nService, migrate to renamed ServerLocalisationService

* Revert VS fuckup

* Update using

* Remove unused parameter, update comment

* Fix develop branch not building
2025-06-28 19:08:42 +01:00
chompDev d4d2ed0403 .NET Format Style Fixes 2025-06-28 15:15:48 +00:00
Jesse d0af6acbe6 Move MathUtil methods to extensions (#432)
* Begin moving MathUtil methods to Extensions

* Add missing extension
2025-06-28 16:15:11 +01:00
Chomp 42e79c981b Converted FindAndReturnChildrenAsItems into extension method 2025-06-28 12:38:34 +01:00
Jesse 22c71bee5b Helper methods extensions (#431)
* Remove unused model

* Start moving methods to extensions, cleanup code
2025-06-28 12:14:50 +01:00
Chomp a3dbd3176e Updated FindAndReturnChildrenByItems to be an extension method 2025-06-28 11:58:50 +01:00
Chomp 6126dc2394 Added item extensions 2025-06-28 10:04:52 +01:00
refringe 6e01428b2b .NET Format Style Fixes 2025-06-18 17:09:20 +00:00
Chomp 1f061cfe89 Refactor of airdrop code
Made forced loot aware of weapon and armors. Now adds their presets instead.
Made `GetLootThatFitsContainer` aware of items inside container and will fail when container is full
Fixed issue where split stacks were not added correctly to airdrops

Comment improvements
2025-06-14 18:56:19 +01:00
Chomp 1d5162c761 Various changes and fixes for things that have been bugging me
Removed/flagged unused props
Typo fixes
Use `FirstOrDefault` over direct index access
Log stacktrace on exception inside `CreateWeaponItems`
2025-06-08 10:40:40 +01:00
Chomp 112afd3391 Fixed flea logic that prevented offers being listed for complex items (items /w children)
`GetItemsToListOnFleaFromInventory` would not keep the root item at index 0, client requires this

`FindAndReturnChildrenAsItems` now inserts root item at index 0
`CreateMultiOffer` now looks for root item by its id

Updated `CreateSingleOffer` to not choose first inventory item as root, search for it instead

Fixes #318
2025-06-04 17:30:26 +01:00
Jesse ff1dfa54ae Do a small pass on SPT's config's to reduce warnings and cleanup (#348)
* Do a small pass on SPT's config's to reduce warnings and cleanup

* Revert

* Revert EFT models

* Set list as null
2025-06-04 14:46:52 +01:00
Chomp d88db583c1 Moved ItemSize into modules section, changed to record
Updated `GetItemSize` to accept `ICollection` instead of list
2025-05-21 11:34:02 +01:00
Chomp 8b3a5bbb90 Converted method comments to c# style
Made some protected properties readonly / static
2025-05-21 11:14:49 +01:00
Chomp 604137bad1 Improved various comments inside ItemHelper
Moved values out of `ArmorItemCanHoldMods` and into frozen set

Added Tpls to spelling dictionary

Changed list parameters to be `ienumerable` or `icollection` where possible

Made `ArmorItemHasRemovablePlateSlots` use class property directly

Made `ItemHasSlots` return false when checked item doesn't exist instead of throwing an unhandled exception

Folded `HasBuyRestrictions` logic into one line
2025-05-20 12:34:22 +01:00
Chomp c8ad685081 Improved HasItemWithTpl and GetItemFromPoolByTpl 2025-05-20 12:00:01 +01:00
Chomp a9c33e1dfc Improved IsAttachmentAttached comments 2025-05-20 10:54:32 +01:00
Chomp 7fe20a49c9 Use nameof inplace of toString for _slotsAsStrings values 2025-05-20 10:51:49 +01:00
hulkhan22 8ad9afebaa fix: Insurance removing unremovable parts - #196 (#260)
* Fix insurance removing unremovable parts

* Mini optimization
2025-05-20 10:50:27 +01:00
Alex 1499627d3c DI completely reworked to keep status of singletons on multi type components 2025-05-06 10:52:22 +01:00
CWX 7d3833c27f Update var naming to be easier to read 2025-05-03 13:07:05 +01:00
CWX 2490747921 fix weapon size calculation 2025-05-03 13:06:06 +01:00
Chomp 344ea6de35 Moved container methods around
Added code to validate items fit into airdrop crate

Updated `CreateForcedLoot` and `CreateRandomLoot` to return items with their children

Updated `SetFoundInRaid` to not add a upd to money/currency if it doesn't already have one
2025-05-02 19:48:28 +01:00
CWX a0bc2803f6 add upd check 2025-05-02 17:13:36 +01:00
Chomp 760f3e3c72 Revert "fixed error where itemlocation can be either a string or int" 2025-04-29 08:47:44 +01:00
Chris Adamson 723e616e80 fixes based on feedback 2025-04-28 12:43:11 -05:00
Chris Adamson 7ed081d305 fixed error where itemlocation can be either a string or int 2025-04-28 12:07:46 -05:00
CWX 7c7297f63c Code cleanup and format 2025-04-22 14:49:05 +01:00
Chomp 7fefc5d302 Run the dictionary key check first as it's faster compared to string compare 2025-04-12 13:56:40 +01:00
Chomp 7187ab999a Dont flag ammo or currency as FiR 2025-03-28 11:56:35 +00:00
Chomp bfd7b5a56b Made type non-static 2025-03-19 16:48:56 +00:00
Chomp 8c0470df36 Made various methods static + updated private methods to be protected 2025-03-14 19:16:26 +00:00
Chomp df8ffa2b16 Replaced various instances of dictionaries and hashsets with their frozen counterparts 2025-03-09 17:12:07 +00:00
Chomp 12ed501f9e made parameter on ReplaceIDs non-optional 2025-03-08 10:12:48 +00:00
clodan 270f095413 renamed projects and namespaces 2025-03-07 13:16:43 +00:00