Base implementation of /datum/persistent_client (#89449)

Converts `/datum/player_details` into `/datum/persistent_client`.
Persistent Clients persist across connections. The only time a mob's
persistent client will change is if the ckey it's bound to logs into a
different mob, or the mob is deleted (duh).

Also adds PossessByPlayer() so that transfering mob control is cleaner
and makes more immediate sense if you don't know byond-fu.

Clients are an abstract representation of a connection that can be
dropped at almost any moment so putting things that should be stable to
access at any time onto an undying object is ideal. This allows for
future expansions like abstracting away client.screen and managing
everything cleanly.
This commit is contained in:
Kapu1178
2025-02-25 14:52:24 -05:00
committed by Roxy
parent 277ea6bb6c
commit b9c803a9d8
87 changed files with 225 additions and 175 deletions

View File

@@ -378,7 +378,7 @@
if(chosen_one)
to_chat(target, span_boldnotice("You have been noticed by a ghost and it has possessed you!"))
var/mob/dead/observer/ghosted_target = target.ghostize(FALSE)
target.key = chosen_one.key
target.PossessByPlayer(chosen_one.key)
trauma.add_friend(ghosted_target)
else
to_chat(target, span_notice("Your mind has managed to go unnoticed in the spirit world."))