TurboWarp / extensions

User-contributed unsandboxed extension gallery for TurboWarp
https://extensions.turbowarp.org/
MIT License
114 stars 231 forks source link

Make "Open project from URL" block press green flag once loaded #1606

Open snowboyz0825 opened 1 month ago

snowboyz0825 commented 1 month ago

This is hyper-specific and if it is too specific please just close, however I created this system where we you have one packaged scratch project that can load in other scratch projects. I did this when I was figuring out how websites work on github and it was the first way I figured it out (and retrospectively the most difficult way I could probably do it.) Essentially, you have a sprite with a script who's soul goal is to load another SB3 based on whatever parameter you give it. fatherwhatismypurposeyouloadanotherproject This has the benefit of

  1. Taking ~2.2 MB less space of storage/"Web Page"
  2. Allowing me to easily display my source code
  3. Easier than packaging the project and renaming it index and creating a new folder for every (sub page?)
  4. Not having to put a turbowarp loading screen in between "Web pages," as customizing is entirely outside of my programming knowledge other than changing the background picture essentially The main issue is that once the new SB3 is loaded, it doesn't start. I know that there are a few blocks that can actually run without pressing the flag, so I create this autorun I save it as a sprite file put it in any projects that need to automatically start once loaded. It works, but it has a few issues.
  5. Cannot stop the project, so the editor always highlights the flag as if it's running and it seriously messes with my OCD
  6. Is mildly annoying to do, but slightly better than packaging each project individually
  7. To stop it from automatically running while editing I have to pause rather than stop
  8. I have to reset it every time the green flag is clicked manually I know this is likely impossible; the block is completely missing by the time the next project loads, but it feels like an intuitive behavior. I already have a solution for it, but I figured I might as well make my case for changing it.
snowboyz0825 commented 1 month ago

If you were wondering why I would bother having a separate SB3 for every page and not just having a single massive project, I'd like to one day host a collection of everything I make and being able to have separate links for everything as well as one main website that links to all of them just seems nice, even if no one ever really will see it.

veggiecan0419 commented 1 month ago

@snowboyz0825 Actually, (I think) it should be perfectly possible. I'll have a look at it.

veggiecan0419 commented 1 month ago

@snowboyz0825 Use ShovelUtils import project from URL [] block. It automatically clicks the green flag when the project has loaded. Lily's Asset Manager doesn't do that.

CubesterYT commented 1 month ago

Seems like something you guys can implement and put up a PR to modify Asset Manager