Carpet

Carpet

2M Downloads

[Scarpet Suggestion] Shared between worlds storage for app files

altrisi opened this issue ยท 1 comments

commented

Since Scarpet apps now can be added globally to any single player world, I think being able to store data inside some folder that is shared between worlds would be a good idea to add to Scarpet.

In my mind, this would be another api call or (better) parameter to choose whether to store per-world or globally.

Use cases for this:

  • Saving user preferences for every world, since some may not be world-dependant
  • Saving files to use them easily in other worlds, such as data logs or structures
  • Loading language files globally without having to add them to every world

I'd say that API would just save info to the world's app data in case the app isn't a global app, but there may be some use-cases in allowing those to save globally (although the latest could produce a bit more confusion for users about "where do I save file x" when installing an app per world, since maybe extra files would need to be in the global storage while the app is in the world's storage).

commented

technically you don't need a separate API call, just reuse existing 'shared_' mnemonic adding its own hierarchy, like 'system_'. I would not suggest app-isolated system location, since it doesn't make sense assuming storage for apps in the mc config files is 'whatever' not 'flat' meaning you want to disable accessing of private files of one app using another app, if apps are placed in an unlucky fashion. In that case the 'system_' location would need to be separate from /config/carpet/scripts, maybe /config/carpet/data and would point to the same location as shared_ for servers (or rather not - to provide the same functionality.

Thoughts?