I'm browsing docs and code, trying to understand the "player spawn point" system. Here's what I have so far:
- There is a "static_spawn_point" setting in minetest.conf. That will cause all players to respawn at this point. Dunno if you can read this setting, but I'm not interested in a global spawn point.
- Mods (e.g. beds) "set a player's spawn point" by remembering a position in some internal variable, registering a handler on_respawn_player, and teleporting the player.
- There are /sethome and /home commands from Minetest Game (mod "sethome"). These are saved in a local variable, too, and inaccessible to other mods.
Is that it? Have I missed anything relevant? If not, can we talk about this? Because what I would like is a standardized way for mods to read and set a player's spawn point / home point.
I do realize that a player may not even have a fixed spawn point; for example, if we wanted to emulate World of Warcraft™ a bit more, players would respawn "at the nearest graveyard" (and have a hearthstone, with cooldown, instead of /home. But that's a different idea.)