Skip to content

Conversation

@rschamp
Copy link
Contributor

@rschamp rschamp commented Nov 12, 2018

Resolves

What Github issue does this resolve (please include link)?
Resolves #1601

Proposed Changes

Describe what this Pull Request does
Adds a VM getter that returns all assets stored on all targets.

Reason for Changes

Explain why these changes should be made
Towards incremental saving, this gives a way for the GUI to save all the assets individually. For now, it is the responsibility of the consumer to determine if these assets should be saved or not. Otherwise the VM would need to be responsible for saving, which has been out of its scope. Does not include the project JSON since that would require knowledge of a project ID, which the VM has not been responsible for so far.

Test Coverage

Please show how you have added tests to cover your changes
Added unit tests for the function as well as the getter on the VM.

Resolves scratchfoundation#1601. Does not include the project JSON since that would require knowledge of a project ID, which the VM has not been responsible for so far.

For now, it is the responsibility of the consumer to determine if these assets should be saved or not. Otherwise the VM would need to be responsible for saving, which has been out of its scope.
Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

This looks fine to me, though I commented on a potential simplification...

@rschamp rschamp assigned rschamp and unassigned cwillisf Nov 15, 2018
@rschamp rschamp merged commit f2550d5 into scratchfoundation:develop Nov 15, 2018
@rschamp rschamp deleted the feature/sb3-json-assets branch November 15, 2018 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API for getting unsaved ("dirty") assets to be saved

3 participants