Page MenuHomeFeedback Tracker

[Bug] CreateInInventory broken behavior
Assigned, NormalPublic

Description

CreateInInventory method doesn't work as expected in cases when cargo contains an item with another restricted cargo (e.g. empty backpack / jeans / t-shirt, etc inside another backpack). Please see the screenshots. For the full demonstration, I've created items with cargo size 1x1 (12ga Rifled Slugs)
As on the screenshot with a Frying Pan CreateInInventory method will create bullets inside the pan until it's full. After that, the method will start to create bullets inside the bag. That's okay, that's how it should work.

In the second screenshot, I replace a frying pan with jeans. CreateInInventory will create the bullets until the t-shirt is full. Another attempt to call this method will return a null and an object won't be created.

The third screenshot is a demonstration of the player's inventory when CreateInInventory starts to return null

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
General
Steps To Reproduce
  1. Spawn a player
  2. Equip him with a T-shirt or any other top and backpack
  3. Add any "restricted cargo" (an item that has cargo, but cannot contain items inside when placed inside another cargo. jeans/tops/backpacks etc.)
  4. Spawn items inside the player's inventory using CreateInInventory method

Expected R.: CreateInInventory creates items inside the player's inventory until all his equipped items
Actual R.: CreateInInventory creates items until the root item with the "restricted cargo" item inside is fulfilled. Then it ignores any available slots and does nothing / returns null (see the third screenshot in the description)

Event Timeline

Geez changed the task status from New to Assigned.Mon, May 6, 10:50 AM