Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to fix up behavior types in spritelab custom blocks #22500

Merged
merged 2 commits into from May 18, 2018

Conversation

balderdash
Copy link
Contributor

@balderdash balderdash commented May 18, 2018

Already ran this on levelbuilder, but committing in case I need to do something similar in the future.

This fixes all the custom blocks that accept or return behaviors to have the correct returnType/arg type.

@balderdash
Copy link
Contributor Author

@balderdash balderdash requested a review from Hamms May 18, 2018 18:19
Copy link
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

It'd be nice to have some comment in the file detailing what this is used for. Enough information that if we're auditing these oneoffs at some point in the future we'll be able to decide whether or not we still need this

end
end
File.write('/tmp/blocks-formatter.js', "console.log(JSON.stringify(#{JSON.pretty_generate blocks}, null, 2))")
new_blocks = `node /tmp/blocks-formatter.js`
Copy link
Contributor

Choose a reason for hiding this comment

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

why this and not JSON.pretty_generate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were some minor formatting differences in the generated JSON, which made it harder to manually verify the diff. e.g. for some reason args: [] became:

args: [

]

@balderdash balderdash merged commit bfb5656 into staging May 18, 2018
@balderdash balderdash deleted the behavior-editor branch May 18, 2018 23:54
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.

None yet

2 participants