tworld icon indicating copy to clipboard operation
tworld copied to clipboard

A way to reset (or delete) your instances

Open erkyrath opened this issue 10 years ago • 2 comments

That is, go back to a pristine state.

This should be an in-world interface (not a build UI interface), because it must be available to non-builders. It'll be a special object in a personal-always world (like selfdesc).

The conditions for this are tricky to sort out. Obviously this should only be possible if you have FOUNDER access, and if nobody is in the instance. But does it screw up other people's links? (Are they retained as dead links?) What guarantees do we make about cross-world data and player-specific data? Is it sufficient to clear out the instance properties without deleting the instance entry? Ugly.

erkyrath avatar May 11 '14 00:05 erkyrath

Guest accounts will do this automatically: https://github.com/erkyrath/tworld/issues/157

erkyrath avatar May 11 '14 01:05 erkyrath

I think we want to delete the instance entry. This avoids confusion for the on_init hook, and also ensures that gentext based on the iid can change. (However, we do not touch the scope entry; scid is stable.)

Only permit reset if the instance is asleep and has no inhabitants. (So the in-world interface will need a "bootinstance" button.)

  • Drop the instances entry
  • Drop all instanceprop entries that match iid
  • Drop all iplayerprop entries that match iid
  • Drop portals that match iid (this is for shelves in the instance, not links to the instance)

We don't have to worry about in-progress porting (playstate.portto) because that's stored as wid/scid/locid. (Test it though.) Same goes for portals to the instance, actually.

Authors will have to think about the deletion case. It might mess up multi-player puzzle logic. Maybe. Or multi-world puzzle logic, if you reset only one of the world instances! Put a thing in the wiki about this.

erkyrath avatar Jun 15 '14 16:06 erkyrath