The YCTIWY mod is already keeping track of offline player
positions, so allow admins to use those for teleportation. This
is sort of like the szutil_offlinepos mod, but as a standard
game feature now. It can be useful for admins to quickly locate
players who are trapped and need rescue, or suspected of griefing
and need to be confirmed.
We can't check initial conditions because the legacy mod would
load after this one (to detect that it needs to be disabled), so
we have to provide an API entry point for it instead.
There's a "soft disable" that just hides the entities
but keeps the database up to date, and a "hard
disable" that clears the database, keeping only
minimal data, until existing transactions (taken
items, dumped inventories) are flushed to the
world.
I had wanted this to be a standard feature of the
game for a while but put off merging it because:
- I had hoped to find a better visual design for the
ghost player entities that matched the bandolier
in nc_player_wield better, and
- I had scalability concerns with large servers with
thousands of offline players.
However, in practice it seems like the scalability
issues are not as critical, and the visuals are
acceptable as they are for now.
In making this a standard game feature, it
will probably also make sense to add an option
to effectively disable parts of it (e.g. avoiding
creating the ents, or even avoiding filling the
database except where players' items are already
taken).