seisatsu / DennisMUD

Dennis MUD - A multiplayer text adventure sandbox engine where the players build the world with in-game commands.
https://dennismud.xyz/
MIT License
47 stars 6 forks source link

Breaking an item should unpair it from exits. #94

Open seisatsu opened 3 years ago

seisatsu commented 3 years ago

If an exit has a paired key, breaking that key item will not unpair it from the exit. The problem is that items don't have a record of the exit they're paired to. This will have to be changed, in order to prevent having to search through all exits in the database when an item is broken. That will also require removing the item's pairing record when an exit is broken.

This is not very high priority, because nothing will happen if an exit has a nonexistent key paired to it. We could even have the key get lazily unpaired the next time someone looks at or uses the exit and its key item is found to not exist.