erkyrath / tworld

A choice-based shared online text environment sandbox
MIT License
71 stars 13 forks source link

A way to reset (or delete) your instances #158

Open erkyrath opened 10 years ago

erkyrath commented 10 years ago

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 commented 10 years ago

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

erkyrath commented 10 years ago

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.)

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.