casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 9 forks source link

Add a function to load custom spaces #525

Open KallynGowdy opened 1 month ago

KallynGowdy commented 1 month ago

Currently, there is an event that can load custom spaces, but there is no associated function to do so. This function should make it easy to load a shared space by recordName, inst, and branch. Something like os.addSharedSpace(recordName, inst, branch) should make it easy to load an additional shared space. Additionally, the space should be named whatever branch is named.

Finally, permissions might be a little weird with this, but we'll have to just test it out. Key points include:

  1. Ensuring that public insts can't load private inst data without user authorization.
  2. Ensuring that local insts can't load private inst data without user authorization.
  3. Ensuring that private insts can't load private inst data without user authorization.

This means that during login, the inst that is loading the branch should have to be authorized.