Skip to content

assets: Update getSpriteValue to include target selection in sprite export#2561

Open
kanecoded wants to merge 4 commits into
TurboWarp:masterfrom
kanecoded:feat/scope-sprite-data-reporter-assets
Open

assets: Update getSpriteValue to include target selection in sprite export#2561
kanecoded wants to merge 4 commits into
TurboWarp:masterfrom
kanecoded:feat/scope-sprite-data-reporter-assets

Conversation

@kanecoded

Copy link
Copy Markdown

Adds a new target identifier in the "sprite [name/dataURI]" reporter block, to allow one sprite to query other sprites' names or data URIs.

@kanecoded kanecoded requested a review from a team as a code owner July 5, 2026 00:46
@kanecoded kanecoded changed the title assets: Update getSpriteValue to include target selection in sprite export assets: Update getSpriteValue to include target selection in sprite export Jul 5, 2026
@github-actions github-actions Bot added the pr: change existing extension Pull requests that change an existing extension label Jul 5, 2026
@SharkPool-SP

Copy link
Copy Markdown
Collaborator

You have to hide the old block and add your changes as a separate new block.

You have to do this since you're mutating the block arguments, which will result in broken blocks for old projects using this

@kanecoded

Copy link
Copy Markdown
Author

You have to hide the old block and add your changes as a separate new block.

You have to do this since you're mutating the block arguments, which will result in broken blocks for old projects using this

Whoops, sorry. I'm working on that now.

@kanecoded

Copy link
Copy Markdown
Author

Fixed in commit 7ca35c6.

@SharkPool-SP

Copy link
Copy Markdown
Collaborator

The old blocks behaviour can just call the new one for simplicity but with the sprite hardcoded

@kanecoded

kanecoded commented Jul 5, 2026

Copy link
Copy Markdown
Author

The old blocks behaviour can just call the new one for simplicity but with the sprite hardcoded

Fixed in commit 34d8668. The legacy method now calls the new method, with the target hard-coded to _myself_ (the caller sprite).

Comment thread extensions/Lily/Assets.js Outdated
disableMonitor: true,
opcode: "getSpriteValue2",
blockType: Scratch.BlockType.REPORTER,
text: Scratch.translate("sprite [TARGET] [EXPORT]"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the old string probably need to give translator context but this one even more so needs to do that

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit ebc96a3.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to resolve this conversation?

@GarboMuffin GarboMuffin Jul 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that wasn't really what i meant

today: translators just see this

image

what is [EXPORT]? they have no idea from here. we're adding another completely ambiguous input. you should tell them what [TARGET] and [EXPORT] are. are they an input? are they an image? are they a dropdown? what's in that dropdown? context matters

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for best results email thomas@turbowarp.org to get a quick review once you've addressed that

@GarboMuffin

Copy link
Copy Markdown
Member

can you disclose to what extent you wrote anything here vs. claude writing everything here?

you're not in trouble. it's actually pretty ok at it. but we would like to know

@kanecoded

kanecoded commented Jul 5, 2026

Copy link
Copy Markdown
Author

can you disclose to what extent you wrote anything here vs. claude writing everything here?

you're not in trouble. it's actually pretty ok at it. but we would like to know

These changes were made with Google Gemini 3.1 Pro, however all changes were manually tested by me, and I understand how the new code works. Some of the quick fixes were manually made by me.

@kanecoded

Copy link
Copy Markdown
Author

Just checking in to see if there is anything else I need to adjust here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: change existing extension Pull requests that change an existing extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants