mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-18 13:04:45 +00:00
## About The Pull Request Adds optional (disabled by default) respawn delay. If the player is observer and have a body, it will firstly check the body. If the body is destroyed or if there was none, then it will check observer's login time. ## Why It's Good For The Game Optional respawn delay is good, when you want players to comeback not only as a midround event, but don't want them to not care about their life. Also, if respawn is enabled, removes "money dupe" and other problems with 0 respawn delay. This proc can also be used for ghost-roles or anything else, where we need to check how much time has elapsed since their death, but is not implemented here. ## Changelog 🆑 add: Added optional respawn delay (disabled by default), which prevents returning to lobby while dead. /🆑
29 lines
720 B
Plaintext
29 lines
720 B
Plaintext
|
|
///assoc list of ckey -> /datum/player_details
|
|
GLOBAL_LIST_EMPTY(player_details)
|
|
|
|
/datum/player_details
|
|
var/list/player_actions = list()
|
|
var/list/logging = list()
|
|
var/list/post_login_callbacks = list()
|
|
var/list/post_logout_callbacks = list()
|
|
var/list/played_names = list() //List of names this key played under this round
|
|
var/byond_version = "Unknown"
|
|
var/datum/achievement_data/achievements
|
|
var/time_of_death = 0
|
|
|
|
/datum/player_details/New(key)
|
|
achievements = new(key)
|
|
|
|
/proc/log_played_names(ckey, ...)
|
|
if(!ckey)
|
|
return
|
|
if(args.len < 2)
|
|
return
|
|
var/list/names = args.Copy(2)
|
|
var/datum/player_details/P = GLOB.player_details[ckey]
|
|
if(P)
|
|
for(var/name in names)
|
|
if(name)
|
|
P.played_names |= name
|