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

Fix for player being unable to use most vehicle mounted tools in crafting #40383

Merged
merged 2 commits into from
May 9, 2020

Conversation

Resok
Copy link
Contributor

@Resok Resok commented May 9, 2020

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.

image

Additional context

Please note that this did not fix direct vehicle item interaction. I was still looking into fixes for this problem. #40203

@Resok Resok marked this pull request as ready for review May 9, 2020 10:56
@ifreund ifreund added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Containers Things that hold other things labels May 9, 2020
@ifreund ifreund requested a review from KorGgenT May 9, 2020 11:06
Copy link
Member

@KorGgenT KorGgenT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, works great. Clang tidy isn't done yet as i write this review or i'd have merged it already.

@KorGgenT KorGgenT merged commit 7f3d163 into CleverRaven:master May 9, 2020
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` Items: Containers Things that hold other things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants