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

Allow migrating from deleted variants #72717

Merged

Conversation

anothersimulacrum
Copy link
Member

@anothersimulacrum anothersimulacrum commented Mar 30, 2024

Summary

Bugfixes "Fix migrating from item variants when the variant has been deleted"

Purpose of change

Fixes #72607
Fixes #72602

Describe the solution

On loading a variant that is not a possible variant from the given item, try to search for a migration from that item with the variant that was loaded, and apply that migration if relevant.

Moved some code around so as to not duplicate it, which makes up most of the diff.

Also added a migration to fix #72602

Testing

Follow steps in #72607.

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions [JSON] Changes (can be) made in JSON labels Mar 30, 2024
On loading a variant that is not a possible variant for the given item,
search for a migration from that item with the variant that was loaded,
and apply that migration if relevant.
The variant moved from one shotgun to another, so add a migration.
In b9c4092
@anothersimulacrum anothersimulacrum force-pushed the migrate-from-dead-variants branch from 20b2dd4 to f3ad0e9 Compare March 30, 2024 11:39
@dseguin dseguin merged commit df6c8e3 into CleverRaven:master Mar 30, 2024
25 of 28 checks passed
@anothersimulacrum anothersimulacrum deleted the migrate-from-dead-variants branch March 30, 2024 15:01
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 30, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't migrate a deleted gun variant Missing migration for mossberg_500_security?
2 participants