add upgrade rules for legacy animations and setter for z #6668
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.
fixes #6616
this adds two upgrade rules for very old projects and fixes an exception in another. the new rules are explained in the comments
this has actually been broken for a long time, but new blockly has surfaced the errors. old blockly used to be looser with field validation so it wouldn't overwrite invalid field values when the workspace loads, even though it wouldn't render correctly. for example, if you open the project in the linked issue in live you'll see that all of the blocks setting the
Sprite.z
property actually sayx
, but they still compile toz
because the invalid value isn't overwritten.new blockly doesn't allow invalid field values in dropdowns, and instead defaults to choosing the first available item in the list of options and overwriting the invalid value with it. the project ends up looking the same in beta but the properties compile to the displayed value
x
instead ofz
. same with the animation dropdowns