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

Macros #10

Open
towerofnix opened this issue Dec 11, 2016 · 14 comments
Open

Macros #10

towerofnix opened this issue Dec 11, 2016 · 14 comments

Comments

@towerofnix
Copy link
Owner

From birdoftheday:

Suggestion: macros

@birdoftheday ahem not enough design or info!! !!!!

@birdoftheday
Copy link

Ok so it's like this!!!

When you have a pie
When you have a piece of code using a block or structure that's not in Scratch you can have different kind of like find and replace things that change it into different Scratch code without adding any new blocks and you can make the macros yourself

@towerofnix
Copy link
Owner Author

Ok quick question!!!

  1. How are these different from custom blocks sorry
  2. How can I implement them into the project.json format without changing any of Scratch's format? Comments I guess

@joker314
Copy link

To answer 2, you cannot add comments into JSON (comments do not exits in JSON), but you can create extra key-value pairs that Scratch will hopefully ignore. e.g. "scrap-mod-data" : ... or something?

@towerofnix
Copy link
Owner Author

Oh, I mean Scratch comments :P – since nobody uses them (literally nobody, with this mod, since I basically removed the ability to see comments) – plus, if you save the project from Scratch, the comment won't be removed, since it's a thing normal to have in Scratch.

@towerofnix towerofnix changed the title Idea: macros Macros Feb 17, 2017
@djsrv
Copy link

djsrv commented Feb 18, 2017

Scratch doesn't actually follow the JSON spec, and it allows JSON to contain comments. You'd just have to modify skipComment.

@towerofnix
Copy link
Owner Author

towerofnix commented Feb 18, 2017

That's cool!

Comments would still probably need to be the method of data storage, though. I imagine if you save the project in Scratch, those "JSON" comments would disappear.

@bates64
Copy link

bates64 commented Feb 18, 2017

I imagine if you save the project in Scratch, those "JSON" comments would disappear.

@liam4 you'd better test that

@djsrv
Copy link

djsrv commented Feb 18, 2017

It would discard the JSON comments.

Another data storage option would be the stage's info object. Scratch doesn't appear to discard anything in it, even if it isn't supposed to be there.

@card100
Copy link

card100 commented Feb 19, 2017

Would Scratch discard a extra JSON file?

@bates64
Copy link

bates64 commented Feb 19, 2017

Would Scratch discard a extra JSON file?

Let's see! ...

@towerofnix
Copy link
Owner Author

towerofnix commented Feb 19, 2017

Yes. :P

It creates a new SB2 file every time you save; it doesn't modify the opened SB2 file.

@bates64
Copy link

bates64 commented Feb 19, 2017

I created a scrap.json file in the sb2 and got this result @card100:

image

So yeah, it totally breaks it 😞

@card100
Copy link

card100 commented Feb 19, 2017

And you contacted the Scratch team...

@towerofnix
Copy link
Owner Author

..I'm 99.99% sure that doesn't actually notify the ST..

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

No branches or pull requests

6 participants