Fix for player being unable to use most vehicle mounted tools in crafting #40383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Bugfixes "Adds default magazine with charge to vehicle PSEUDO items for finding nearby items available for crafting."
Purpose of change
Partial fix for #40203 for at least using vehicle mounted tools for crafting.
Describe the solution
The new inventory code expects the charges to be part of a magazine. I used ammo_set call to add default ammo with the appropriate vehicle battery charge to the 'PSEUDO' tool.
Describe alternatives you've considered
I considered instead changing the broader item code to check for the item charge details, but I believe this was intentionally changed to stop looking here.
Testing
I validated by spawning a vehicle, installing a welding rig, and attempting craft a recipe that required welding to validate.
Additional context
Please note that this did not fix direct vehicle item interaction. I was still looking into fixes for this problem. #40203