Skip to content

fix: use correct sb3 shadow types for numeric vs string inputs#2

Open
shx20140617 wants to merge 2 commits into
scratch-fuse:mainfrom
shx20140617:fix/sb3-shadow-types
Open

fix: use correct sb3 shadow types for numeric vs string inputs#2
shx20140617 wants to merge 2 commits into
scratch-fuse:mainfrom
shx20140617:fix/sb3-shadow-types

Conversation

@shx20140617

Copy link
Copy Markdown

Summary: Number literals now use [4, ...] shadow (math_number) instead of [10, ...] (text). Reporter blocks detect numeric opcodes (operator_*, data_lengthoflist, etc.) and use [4, ''] shadow. Handles numeric/boolean primitive values in serializeInput(). This prevents gray non-editable inputs in list index access and math operations.

- Treat numbers and booleans as literal values (convert to string) instead of trying to serialize them as reporter blocks
- Number literals use [4, ...] (math_number shadow) instead of [10, ...] (text shadow)
- Reporter blocks detect numeric opcodes (operator_*, data_lengthoflist, etc.) and use [4, ''] shadow
- String/boolean literals continue using [10, ...] shadow
- Prevents gray non-editable inputs in list index access and math operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant