diff --git a/code/datums/components/dullahan.dm b/code/datums/components/dullahan.dm index 09c65600f1..b3b2c44a63 100644 --- a/code/datums/components/dullahan.dm +++ b/code/datums/components/dullahan.dm @@ -12,9 +12,8 @@ dullahan_head = new(get_turf(H)) - if(length(H.name)) - dullahan_head.name = "[H.name]'s head" - dullahan_head.desc = "the decapitated head of [H.name]" + update_name() + dullahan_head.owner = H RegisterSignal(H, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head) @@ -60,6 +59,16 @@ dullahan_head.update_appearance() +/datum/component/dullahan/proc/update_name(retries = 0) + if(retries > 3) + return FALSE + var/mob/living/carbon/human/H = parent + if(length(H.name)) + dullahan_head.name = "[H.name]'s head" + dullahan_head.desc = "the decapitated head of [H.name]" + return TRUE + addtimer(CALLBACK(src, .proc/update_name, retries + 1), 2 SECONDS) + /datum/component/dullahan/proc/include_owner(datum/source, list/processing_list, list/hearers) if(!QDELETED(parent)) hearers += parent diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1e3c1defd4..8a9f122f43 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -3357,11 +3357,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(spawn_chair) // Makes spawning on the arrivals shuttle more consistent looking wheels.setDir(spawn_chair.dir) wheels.buckle_mob(character) - var/datum/component/dullahan/dullahan = character.GetComponent(/datum/component/dullahan) - // if you ready up, quirks are assigned first, very stupid - if(dullahan && dullahan.dullahan_head && length(dullahan.dullahan_head.name)) - dullahan.dullahan_head.name = "[character.name]'s head" - dullahan.dullahan_head.desc = "the decapitated head of [character.name]" /datum/preferences/proc/get_default_name(name_id) switch(name_id)