Commit Graph

53 Commits

Author SHA1 Message Date
Cj edb1f8a6fc alphabetical order, rename var 2025-07-06 08:52:16 -04:00
Cj 14d2c53ba1 clean up FindBarterItems, remove underscore from injections, add locale for warning 2025-07-06 08:33:44 -04:00
Cj d1af6bf6e3 Service sessionIDs to mongoIDs (#454)
* Start updating service sessionIDs to mongoIDs

* Finish service conversion + fix other small issues
2025-07-06 13:08:07 +01:00
Chomp fa674d6add Converted RemapRootItemId into extension method 2025-07-05 17:46:58 +01:00
Chomp f140e1e106 Converted ReplaceIDs into extension method 2025-07-05 17:25:59 +01:00
Chomp 4f5571c2d4 Converted more ids to MongoId 2025-07-05 12:35:03 +01:00
Chomp 8253215410 Converted strings into MongoId type 2025-07-05 11:03:09 +01:00
Chomp 908635e272 Correctly init 2d array 2025-07-04 10:41:24 +01:00
Chomp c8b8669546 Cleaned up Inventory helper and improved readability 2025-07-04 09:23:41 +01:00
chompDev 973ea857f9 .NET Format Style Fixes 2025-07-03 22:06:04 +00:00
Archangel 79489eadce Handle ToLower neutrally across all locales (#412) 2025-07-03 18:28:36 +02:00
Chomp 4e2d4dc708 Rewrote container item space system to use 2 dimensional arrays (#442)
* Rewrote container item space system to use 2 dimensional arrays

* Moved container helper code into extension methods

* Reduced amount of parameters passed into `RowIsFull`

* Skip root trader items

* Remove debug

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-07-03 16:36:13 +01:00
Jesse ebe8f9ded5 Mongoid changes (#440)
* Remove old IsValidMongoId and Regex

* Convert more configs to MongoId, as well as BaseClasses

* Remove HashUtil.Generate(), replaced with new MongoId()
2025-07-03 15:42:16 +01:00
Chomp 82f555a754 Added MongoId type to various places 2025-07-03 10:04:09 +01:00
Chomp a8308248d6 Replaced hashutil.generate with new MongoId() 2025-07-02 12:47:00 +01:00
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