From 276143f5132524c6eda5f4e5e5faa6d6eab4933e Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 7 Aug 2022 23:17:49 +0100 Subject: [PATCH] Update dullahan.dm --- code/datums/components/dullahan.dm | 38 +++++++++++++----------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/code/datums/components/dullahan.dm b/code/datums/components/dullahan.dm index ce6c1e7eb7..9401d3d3d0 100644 --- a/code/datums/components/dullahan.dm +++ b/code/datums/components/dullahan.dm @@ -19,17 +19,19 @@ // make sure the brain can't decay or fall out var/obj/item/organ/brain/B = H.getorganslot(ORGAN_SLOT_BRAIN) - B.zone = "abstract" // it exists in the ethereal plain - B.organ_flags = ORGAN_NO_SPOIL | ORGAN_NO_DISMEMBERMENT | ORGAN_VITAL - dullahan_head.B = B + if(B) + B.zone = "abstract" // it exists in the ethereal plain + B.organ_flags = ORGAN_NO_SPOIL | ORGAN_NO_DISMEMBERMENT | ORGAN_VITAL + dullahan_head.B = B // the eyes get similar treatment var/obj/item/organ/eyes/dullahan/new_eyes = new() var/obj/item/organ/eyes/E = H.getorganslot(ORGAN_SLOT_EYES) - new_eyes.left_eye_color = E.left_eye_color - new_eyes.right_eye_color = E.right_eye_color - E.Remove() - qdel(E) + if(E) + new_eyes.left_eye_color = E.left_eye_color + new_eyes.right_eye_color = E.right_eye_color + E.Remove() + qdel(E) new_eyes.Insert(H) // make sure you handle the tongue correctly, too! @@ -40,10 +42,16 @@ var/obj/item/organ/tongue/dullahan/new_tongue = new() new_tongue.Insert(H) + // uh, eyes! + var/obj/item/organ/ears/dullahan_ears = H.getorganslot(ORGAN_SLOT_EARS) + if(dullahan_ears) + dullahan_ears.zone = "abstract" + // moving the brain's zone means we don't need the head to survive var/obj/item/bodypart/head/head = H.get_bodypart(BODY_ZONE_HEAD) - head.drop_limb() - qdel(head) + if(head) + head.drop_limb() + qdel(head) H.flags_1 &= ~(HEAR_1) @@ -85,18 +93,6 @@ owner.gib() . = ..() -// allow the 'fake' head to relay speech back to the mob -/obj/item/dullahan_head/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode) - if(owner) - var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]" - var/hrefpart = "" - var/treated_message = lang_treat(speaker, message_language, raw_message, spans, message_mode) - var/rendered = "[hrefpart][namepart] [treated_message]" - - if (owner.client?.prefs.chat_on_map && (owner.client.prefs.see_chat_non_mob || ismob(speaker))) - owner.create_chat_message(speaker, message_language, raw_message, spans, message_mode) - owner.show_message(rendered, "") - // update head sprite /obj/item/dullahan_head/proc/remove_head_overlays() overlays_standing = list()