-
Notifications
You must be signed in to change notification settings - Fork 52
sbeditor (Rival to project_json_capabilites) #295
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
Conversation
… to their blocks)
…sprites without a project)
…l functions to add sprites/blocks/vlbs/other stuff though
i might be able to say that this is more powerful that the original proejct_json_capabilites module except that it doesn't have much integration with scratchattach |
…obably want to make a function run when a sprite is assigned, instead of just calling the link function when necessary
What is Singleton in this context? |
its for a value that says that a block shape is not possible to determine with just opcode (control_stop) (maybe this should be changed) as well as a value that represents the abscence of a sprite so one is automatically assigned (if you are using a with statement with sprite) its a singleton so there is only 1 instance of these classes, so im using the 'is' keyword. i think there is a bit more tesing to do with it since the two singleton instances i mentioned at the start might be the same instance |
i should probably add a documentation so other people can understand the stuff because its not a perfectly intuitive system i guess |
just checked from scratchattach.editor.build_defaulting import SPRITE_DEFAULT
from scratchattach.editor.blockshape import YESNT
print(SPRITE_DEFAULT is YESNT) returns False: the singletons work as intended |
i think 'yesnt' should potentially be renamed |
Signed-off-by: faretek <107722825+FAReTek1@users.noreply.github.com>
# Conflicts: # scratchattach/other/other_apis.py
Signed-off-by: faretek <107722825+FAReTek1@users.noreply.github.com>
i keep merging incoming new commits into this branch which makes me worried that i might mess things up |
Signed-off-by: faretek <107722825+FAReTek1@users.noreply.github.com>
i'll rename yesnt and merge this maybe |
there are still more features to be added |
scratchattach.editor (sbeditor v2)
This is my response after seeing
project_json_capabilites.py
. Due to various code style issues mentioned in #291, this is an objectively cleaner version (with type hinting and a modular structure inspired byscratchattach.site
).I also call it sbeditor v2 because it is a revamp of my old, flawed
sbeditor
project.This pr will remain a draft until the project has reached the same level of capability as
project_json_capabilites.py
(it's getting close, and has other features as well).Advantages to
project_json_capabilites.py
[sound for sprite in self.sprites for sound in sprite.sounds] + [costume for sprite in self.sprites for costume in sprite.costumes]
prim
__init__
@staticmethod
and@property
And more