Up-port: Various runtimes (#15802)

* Various runtimes (#7873)

* Some more preferences setup runtimes (#7884)

* Bug in #7884 making markings not show (#7888)
This commit is contained in:
Raeschen
2024-03-10 09:40:08 +10:00
committed by GitHub
parent 34cf76b7a7
commit 484ffed97a
9 changed files with 118 additions and 60 deletions
+15 -4
View File
@@ -271,19 +271,30 @@
//DISCONNECT//
//////////////
/client/Del()
if(!gc_destroyed)
gc_destroyed = world.time
if (!QDELING(src))
stack_trace("Client does not purport to be QDELING, this is going to cause bugs in other places!")
GLOB.ahelp_tickets.ClientLogout(src)
GLOB.mhelp_tickets.ClientLogout(src)
// Yes this is the same as what's found in qdel(). Yes it does need to be here
// Get off my back
SEND_SIGNAL(src, COMSIG_PARENT_QDELETING, TRUE)
Destroy() //Clean up signals and timers.
return ..()
/client/Destroy()
if(holder)
holder.owner = null
GLOB.admins -= src
if (mentorholder)
mentorholder.owner = null
GLOB.mentors -= src
GLOB.ahelp_tickets.ClientLogout(src)
GLOB.mhelp_tickets.ClientLogout(src)
GLOB.directory -= ckey
GLOB.clients -= src
return ..()
/client/Destroy()
..()
return QDEL_HINT_HARDDEL_NOW
@@ -418,7 +418,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
for(var/BP in mark_datum.body_parts)
var/obj/item/organ/external/O = character.organs_by_name[BP]
if(O)
if(O && islist(O.markings) && islist(pref.body_markings[M]) && islist(pref.body_markings[M][BP]))
O.markings[M] = list("color" = pref.body_markings[M][BP]["color"], "datum" = mark_datum, "priority" = priority, "on" = pref.body_markings[M][BP]["on"])
character.markings_len = priority
@@ -91,7 +91,7 @@
preference = list(preference)
for(var/p in preference)
var/datum/client_preference/cp = get_client_preference(p)
if(!prefs || !cp || !(cp.key in prefs.preferences_enabled))
if(!prefs || !cp || !istype(cp, /datum/client_preference) || !(cp.key in prefs.preferences_enabled))
return FALSE
return TRUE