Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only enumerate the contents of containers in advanced inventory #46203

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

kevingranade
Copy link
Member

Not magazines or magazine wells or anything else, just what you think of as ordinary pockets

Summary

SUMMARY: None

Purpose of change

Fixes #45829
Insightful comment about the actual problem in that issue, "Not trying to unload my worn gas mask in the first place.".
The problem here is that advanced inventory is introspecting into all pockets, not just standard ones, leading to situations as reported in the issue where it attempts to move contents of worn items that are not supported, in this case gas mask filters.

Describe the solution

Update the two locations in advanced inventory that enumerate the entire top level of the worn inventory and exclude non-CONTAINER pockets.

Describe alternatives you've considered

There might be a way to just exclude the kind of item that would fail instead of all non-standard pockets, but I don't see a reason to have advanced inventory operate on contents of worn magazines or other specialized containers, they frequently have different rules about how they are manipulated.

Testing

Loaded the attached save from #45829, the importent part of which is that the player is wearing a gas mask, AR-15, and headlamp.
Verify that /, does not cause a debugmsg (can also be verified pre-PR by simply attempting to move the gas mask cartridge).
Verify that the AR-15 ammunition, headlamp battery, and Gas mask filter are not listed in the AIM "Inventory" view.

Not magazines or magazine wells or anything else, just what you think of as ordinary pockets
@ZhilkinSerg ZhilkinSerg merged commit b4f02d9 into CleverRaven:master Dec 21, 2020
@anothersimulacrum anothersimulacrum added Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items: Containers Things that hold other things labels Dec 21, 2020
@kevingranade kevingranade deleted the fix-adv-inv-mag-rem branch December 25, 2020 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items: Containers Things that hold other things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid item (name gas mask cartridge) for reduce_charges on Move all items in AIM
3 participants