Cull Item Variants on save, export and item copy #5662
Draft
+168
−66
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.
This culls an item so that the list of variants, as well as any mods with unused variants with unmodified ranges are not saved in the item raw
This cuts down the storage of these items, particularly things like watchers eyes and forbidden jewels, and makes it much easier to copy/paste them in places with limited text space
an example of a culled item:
This will not cull an item if any of the mods have been modified as it causes complications when reconstructing the item, and also updates the item if the unique gets updated with new variants
such that if its a generated unique it will find variants with the same name (if it can) and set the variant number to that, and if a new legacy version of a used variant is introduced it will set the variant to that instead