-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Metadata and Resource handling. #263
Comments
Ideally this is how we could've resolved issue #182, but Vee decided to go with adding a disambiguator to try and lower the odds. It can still be accomplished if someone were to intentionally try and sabotage someone's pack.
It's a good idea to have some organization, but we definitely shouldn't force how people should organize their scripts. That makes the structure not very flexible and it could make future updates much harder to implement.
I was also thinking about getting rid of the priority variable as well. It's very arbitrary and can be easily abused by pack developers. I don't think we should make it random though. We need to probably sort the things alphabetically so there is at least some order to it.
I really do like this. Not only that, but it also makes music playback replay safe, so it will play on the same segment that the player started their attempt on. The only problem is how will we still display the music information on the menu.
Really great to see this. This also means we can deprecate u_execScript completely if this can be set up properly. Good stuff |
It will not be any kind of "force" or issue since you can go back from that folder by doing |
Oh wait nvm, I misread what you meant by the possible issues, well, I also just rechecked how exactly level.json get the main script and it's something like this: Will edit. |
Here's a new and much better in use pack's resource handling and how code loads it:
How OH should handle loading and the use of recourses in Lua:
Load each pack in their separate handlers named after their folder names, which are the unique IDs
For a currently made handler for a pack Recursively go through its files and add everything to its handler's storage. So in C++ it would look like something like this maybe:
resourceManager[loaded_pack][folder_name][file_name_to_use]
In
pack1
in Lua when you use for exampleu_playSound("sound1.ogg")
it just simply picks from the SFX array that selected sound of the pack. In an array it could look like something like this:Some other ideas:
priority
variable that has no use whatsoever, just load packs in whatever order really.segments
in Music's metadata is redundant if we just could do that through lua inonLoad
anyway like this:execScript
with just Lua's build inrequire
, just set the pack's directory for script search inpackage.path
on load. It will simplify the process of making module alike scripts that's very useful in scripting in general andexecScript
doesn't allow us to do so and in general, the function is just completely redundant.The text was updated successfully, but these errors were encountered: