mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
## About The Pull Request Adds an option to the respawn config which forces you to pick another character (slot) before you respawn. ## Why It's Good For The Game Just an idea i'm throwing out there, not necessarily pushing for it to be enabled on any servers. Respawning as an alternative character can be a good way to make people less frustrated at dying, particularly if paired with the cooldown config that already exists: "Oh shucks, I died and got my head cut off and got absorbed and got spaced by some changeling. I won't be able to finish my project or whatever. At least in 15 minutes I may be able to join as my botanist character to try something else rather than having to wait an hour and a half for the round to tick over." Also nice for downstream support. (Obviously you can just, *ban* people who respawn as the same character, use an honor system, but codifying it seems better than not.) ## Changelog 🆑 Melbert config: Adds a config option for player respawning that enables respawns, but forces you pick a new character. config: "NORESPAWN" has been replaced with "ALLOW_RESPAWN 0". Unlimited respawns is "ALLOW_RESPAWN 1" and character limited respawns is "ALLOW_RESPAWN 2". /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
|
|
///assoc list of ckey -> /datum/player_details
|
|
GLOBAL_LIST_EMPTY(player_details)
|
|
|
|
/// Tracks information about a client between log in and log outs
|
|
/datum/player_details
|
|
/// Action datums assigned to this player
|
|
var/list/datum/action/player_actions = list()
|
|
/// Tracks client action logging
|
|
var/list/logging = list()
|
|
/// Callbacks invoked when this client logs in again
|
|
var/list/post_login_callbacks = list()
|
|
/// Callbacks invoked when this client logs out
|
|
var/list/post_logout_callbacks = list()
|
|
/// List of names this key played under this round
|
|
var/list/played_names = list()
|
|
/// Lazylist of preference slots this client has joined the round under
|
|
/// Numbers are stored as strings
|
|
var/list/joined_as_slots
|
|
/// Version of byond this client is using
|
|
var/byond_version = "Unknown"
|
|
/// Tracks achievements they have earned
|
|
var/datum/achievement_data/achievements
|
|
/// World.time this player last died
|
|
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
|