diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index ba2177ef64c..a6a888e07b9 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -458,6 +458,8 @@ DEFINE_BITFIELD(organ_flags, list( "ORGAN_VITAL" = ORGAN_VITAL, "ORGAN_EDIBLE" = ORGAN_EDIBLE, "ORGAN_UNREMOVABLE" = ORGAN_UNREMOVABLE, + "ORGAN_HIDDEN" = ORGAN_HIDDEN, + "ORGAN_VIRGIN" = ORGAN_VIRGIN, )) DEFINE_BITFIELD(respiration_type, list( diff --git a/code/modules/forensics/_forensics.dm b/code/modules/forensics/_forensics.dm index 75cbc55df28..6a06e549d26 100644 --- a/code/modules/forensics/_forensics.dm +++ b/code/modules/forensics/_forensics.dm @@ -230,11 +230,9 @@ /// Updates the blood displayed on parent /datum/forensics/proc/check_blood() - if(!parent || !isitem(parent.resolve())) - return - if(isorgan(parent.resolve())) // organs don't spawn with blood decals by default + var/obj/item/the_thing = parent.resolve() + if(!istype(the_thing) || isorgan(the_thing)) // organs don't spawn with blood decals by default return if(!length(blood_DNA)) return - var/atom/parent_atom = parent.resolve() - parent_atom.AddElement(/datum/element/decal/blood) + the_thing.AddElement(/datum/element/decal/blood) diff --git a/code/modules/surgery/organs/organ_movement.dm b/code/modules/surgery/organs/organ_movement.dm index bee717fb764..101bbc46c71 100644 --- a/code/modules/surgery/organs/organ_movement.dm +++ b/code/modules/surgery/organs/organ_movement.dm @@ -58,12 +58,12 @@ else replaced.forceMove(get_turf(receiver)) - if(!IS_ROBOTIC_ORGAN(src) && (organ_flags & ORGAN_VIRGIN)) - blood_dna_info = receiver.get_blood_dna_list() - // need to remove the synethic blood DNA that is initialized - // wash also adds the blood dna again - wash(CLEAN_TYPE_BLOOD) - organ_flags &= ~ORGAN_VIRGIN + if(!IS_ROBOTIC_ORGAN(src) && (organ_flags & ORGAN_VIRGIN)) + blood_dna_info = receiver.get_blood_dna_list() + // need to remove the synethic blood DNA that is initialized + // wash also adds the blood dna again + wash(CLEAN_TYPE_BLOOD) + organ_flags &= ~ORGAN_VIRGIN receiver.organs |= src receiver.organs_slot[slot] = src