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

Misc. fixes for vehicle part variants #55543

Merged
merged 3 commits into from
Feb 21, 2022

Conversation

dseguin
Copy link
Member

@dseguin dseguin commented Feb 21, 2022

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:

  • Don't include appliance parts when choosing a vehicle part variant.
  • Separate the base variant (different part id's with the same name) from variant shapes (possible shapes for a single part id). When multiple base variants are available, include the id to distinguish between them (they would otherwise all have the same name in this case).
  • Update the windshield parts to use distinct names.

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.

before_solar_panel
install_solar_panel
installed_solar_panel

Testing fix for #55511

While keeping the same name for windshield parts, installing a windshield prompts for a base part and a variant shape:

install_before
install_windshield
select_base
select_variant
install_after

With the names changed, the parts are separately installable:

separate_windshields

Additional context

@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Feb 21, 2022
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 21, 2022
@Maleclypse Maleclypse added <Bugfix> This is a fix for a bug (or closes open issue) Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON labels Feb 21, 2022
@kevingranade kevingranade merged commit a139c2e into CleverRaven:master Feb 21, 2022
@dseguin dseguin deleted the fix_veh_variants branch February 21, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
3 participants