Teleporters
Closed this issue · 5 comments
Ideas / Brainstorming:
- Teleporters can be found randomly underground
- The player can set the Teleporter to an ID, the Teleporter will teleport the player to another random Teleporter with the same ID (if exists)
- This needs to be stored somehow
- Teleporters can be mined and placed
- This should be flexible
- Problem: why would the player need more than 2?
- -> Maybe Teleporters shouldn't be diggable
Could make it so they aren't retrievable once activated. That way the player still has the choice of where to put them, but doesn't get to reuse the same pair forever.
The ID can be stored in NodeMetaData, but how would you go about retrieving all nodes in the world with certain node metadata? Store them in a separate file (does that even work with mod security)?
Could make it so they aren't retrievable once activated
Would that work by returning false in on_dig if a certain condition is fulfilled (setup by player)?
Or 2 separate nodes for a deactivated and activated Teleporter. Activating converts from deactivated to activated node
I figure all the active teleporters are tracked in a table and persistency is ensured by storing the table in mod storage on each update. https://github.com/minetest/minetest/blob/5.6.0/doc/lua_api.txt#L6226 Where it then can be retrieved when the world reloads.
Two separate nodes would be better I think. That way they can be made visually distinctive, which is always a bonus.
all that should be organized into a mod mts_teleporters
I will take a stab at it.