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

Make carried vehicle cargo available for storage #38681

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

jkraybill
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Make carried vehicle cargo available for storage"

Purpose of change

Fixes #38671 by allowing carried vehicle cargo to be usable in advanced inventory and when dropping items.

Describe the solution

The is_available() check was specifically excluding items with the carried flag, so I changed the check to use !is_broken() instead of is_available().

I couldn't think of a case where this would cause a problem, and I tested carrying lone parts like cargo carriers to make sure this didn't introduce some exploit and couldn't find one, but I would like feedback if I'm missing something.

Describe alternatives you've considered

I think this is the right solution.

Testing

Spawned motorbikes with storage and mounted on cars with bike racks, and then interacted with the storage using both AIM and by just dropping items in the carrier.

Additional context

As mentioned, I couldn't think of an exploit this would allow but let me know if you think of any.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Vehicles Vehicles, parts, mechanics & interactions labels Mar 10, 2020
@ZhilkinSerg ZhilkinSerg merged commit d1fbf1a into CleverRaven:master Mar 10, 2020
@jkraybill jkraybill deleted the 38671 branch March 10, 2020 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage parts of mounted vehicle have 0 storage space
2 participants