diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 64840acd27c7..d35c02506d6b 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -36,6 +36,9 @@
var/mob/living/current
var/active = FALSE
+ /// A copy of a corpse appearance, set when transferring a mind to a brainmob.
+ var/mutable_appearance/body_appearance
+
///a list of /datum/memories. assoc type of memory = memory datum. only one type of memory will be stored, new ones of the same type overriding the last.
var/list/memories = list()
///reference to the memory panel tgui
diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm
index d7a939f18dea..bedee1a24d85 100644
--- a/code/datums/status_effects/debuffs/debuffs.dm
+++ b/code/datums/status_effects/debuffs/debuffs.dm
@@ -217,7 +217,7 @@
var/delta = world.time - last_dead_time
var/new_timeofdeath = owner.timeofdeath + delta
owner.timeofdeath = new_timeofdeath
- owner.tod = stationtime2text(reference_time=new_timeofdeath)
+ owner.timeofdeath_as_ingame = stationtime2text(reference_time=new_timeofdeath)
last_dead_time = null
if(owner.stat == DEAD)
last_dead_time = world.time
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 824fa48f376b..78335794f5af 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -786,15 +786,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
gas_scan = TRUE
/mob/dead/observer/proc/set_ghost_appearance(mob/living/to_copy)
- if(!to_copy || !to_copy.icon)
+ var/mutable_appearance/appearance = to_copy?.mind?.body_appearance || to_copy
+
+ if(!appearance || !appearance.icon)
icon = initial(icon)
icon_state = "ghost"
alpha = 255
overlays.Cut()
else
- icon = to_copy.icon
- icon_state = to_copy.icon_state
- overlays = to_copy.overlays
+ icon = appearance.icon
+ icon_state = appearance.icon_state
+ overlays = appearance.overlays
alpha = 127
/mob/dead/observer/canUseTopic(atom/movable/target, flags)
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index bc6e27d8a4ff..adca2e9fc94b 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -119,10 +119,12 @@
return
if(!L.mind)
return
+
brainmob = new(src)
brainmob.set_real_name(L.real_name)
brainmob.timeofhostdeath = L.timeofdeath
brainmob.suiciding = suicided
+
if(L.has_dna())
var/mob/living/carbon/C = L
if(!brainmob.stored_dna)
@@ -130,8 +132,12 @@
C.dna.copy_dna(brainmob.stored_dna)
if(HAS_TRAIT(L, TRAIT_BADDNA))
LAZYSET(brainmob.status_traits, TRAIT_BADDNA, L.status_traits[TRAIT_BADDNA])
+
if(L.mind && L.mind.current)
+ if(!QDELETED(L))
+ L.mind.body_appearance = L.appearance
L.mind.transfer_to(brainmob)
+
to_chat(brainmob, span_notice("You feel slightly disoriented. That's normal when you're just a brain."))
/obj/item/organ/brain/attackby(obj/item/O, mob/user, params)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 25165affa66e..c44cfe8eb6f3 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -75,7 +75,7 @@
died_as_name = name
timeofdeath = world.time
- tod = stationtime2text()
+ timeofdeath_as_ingame = stationtime2text()
// tgchat displays doc strings with formatting, so we do stupid shit instead
var/list/death_message = list(
@@ -97,8 +97,10 @@
var/turf/T = get_turf(src)
- if(mind && mind.name && mind.active && !istype(T.loc, /area/centcom/ctf))
- deadchat_broadcast(" has died at [get_area_name(T)].", "[mind.name]", follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
+ if(mind && mind.name && mind.active)
+ if(!istype(T.loc, /area/centcom/ctf))
+ deadchat_broadcast(" has died at [get_area_name(T)].", "[mind.name]", follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
+
if(SSlag_switch.measures[DISABLE_DEAD_KEYLOOP] && !client?.holder)
to_chat(src, span_deadsay(span_big("Observer freelook is disabled.\nPlease use Orbit, Teleport, and Jump to look around.")))
ghostize(TRUE)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 4ae25f4f7b56..6c87b3668707 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -64,13 +64,14 @@ DEFINE_INTERACTABLE(/mob/living)
var/hallucination = 0 ///Directly affects how long a mob will hallucinate for
var/last_special = 0 ///Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
+ /// Time of death as world.time
var/timeofdeath = 0
/// Helper vars for quick access to firestacks, these should be updated every time firestacks are adjusted
var/on_fire = FALSE
var/fire_stacks = 0
- /**
+ /** mind.mob_appearance = appearance
* Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
*
* FALSE is off, [INCORPOREAL_MOVE_BASIC] is normal, [INCORPOREAL_MOVE_SHADOW] is for ninjas
@@ -90,8 +91,8 @@ DEFINE_INTERACTABLE(/mob/living)
var/cameraFollow = null
- /// Time of death
- var/tod = null
+ /// Time of death in the in-game time format
+ var/timeofdeath_as_ingame = null
var/limb_destroyer = 0 //1 Sets AI behavior that allows mobs to target and dismember limbs with their basic attack.
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 2072d982deb6..b0c13b9e69c0 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -657,7 +657,7 @@
REMOVE_TRAIT(src, TRAIT_FAKEDEATH, source)
REMOVE_TRAIT(src, TRAIT_DEATHCOMA, source)
if(stat != DEAD)
- tod = null
+ timeofdeath_as_ingame = null
/// Induces fake death on a living mob.
/mob/living/proc/fakedeath(source, silent = FALSE)
@@ -667,7 +667,7 @@
emote("deathgasp")
ADD_TRAIT(src, TRAIT_FAKEDEATH, source)
ADD_TRAIT(src, TRAIT_DEATHCOMA, source)
- tod = stationtime2text()
+ timeofdeath_as_ingame = stationtime2text()
///Unignores all slowdowns that lack the IGNORE_NOSLOW flag.