Misc. fixes for vehicle part variants #55543
Merged
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
None
Purpose of change
Installing a vehicle part includes all parts with the same name as possible variant shapes. This includes appliance parts (
ap_solar_panel
vs.solar_panel
), which caused the issue in #55524.Describe the solution
This includes 3 separate fixes:
Describe alternatives you've considered
Just changing the names of these parts so they don't conflict when choosing a variant.
Testing
Testing fix for #55524
Attempting to install a solar panel skips the variant selection menu, since the only other part named "solar panel" is an appliance. No errors or debug messages.
Testing fix for #55511
While keeping the same name for windshield parts, installing a windshield prompts for a base part and a variant shape:
With the names changed, the parts are separately installable:
Additional context