diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm index 7c6b9e97373..08e873e526f 100644 --- a/code/datums/components/butchering.dm +++ b/code/datums/components/butchering.dm @@ -309,6 +309,7 @@ /datum/component/butchering/proc/create_replacement_limb(obj/item/bodypart/target, drop_loc) var/drop_type = target.butcher_replacement var/obj/item/bodypart/replacement = new drop_type(drop_loc) + replacement.bodyshape = target.bodyshape replacement.set_initial_damage(target.brute_dam, target.burn_dam) if (IS_ORGANIC_LIMB(replacement) && target.owner) replacement.blood_dna_info = target.owner.get_blood_dna_list() diff --git a/code/modules/religion/burdened/psyker.dm b/code/modules/religion/burdened/psyker.dm index 014c5b76998..8930450f226 100644 --- a/code/modules/religion/burdened/psyker.dm +++ b/code/modules/religion/burdened/psyker.dm @@ -73,6 +73,10 @@ var/obj/item/bodypart/head/psyker/psyker_head = new() if(!psyker_head.replace_limb(src)) return FALSE + psyker_head.species_id = dna?.species?.id + var/list/our_drops = psyker_head.get_butcher_drops(force = TRUE) + if (length(our_drops)) + psyker_head.butcher_drops = string_list(our_drops) qdel(old_head) var/obj/item/organ/brain/psyker/psyker_brain = new() /// turns out if you make a flashing monochromatic outline against black background that refreshes on inconsistant intervals, it hurts peoples eyes. Who'da thunk. if(is_blinding) diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 475cb1ffcd3..ca031ab518f 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -49,6 +49,8 @@ var/is_invisible = FALSE ///The ID of a species used to generate the icon. Needs to match the icon_state portion in the limbs file! var/limb_id = SPECIES_HUMAN + ///ID of a species to use as an override for species-based biological logic, such as what species to pull the meat from, if our limb_id doesn't match + var/species_id = null //Defines what sprite the limb should use if it is also sexually dimorphic. var/limb_gender = "m" ///Is there a sprite difference between male and female? @@ -314,12 +316,14 @@ return FALSE return ..() -/obj/item/bodypart/proc/get_butcher_drops() - if(!isnull(butcher_drops)) +/// Returns an assoc list of items dropped when the limb is butchered +/// force - Force an update of drops ignoring the cache +/obj/item/bodypart/proc/get_butcher_drops(force = FALSE) + if(!isnull(butcher_drops) && !force) return butcher_drops - if (butcher_drop_cache[type]) + if (butcher_drop_cache[type] && !force) return butcher_drop_cache[type] - var/datum/species/species = GLOB.species_list[limb_id] + var/datum/species/species = GLOB.species_list[species_id || limb_id] if (!species || !species.meat || !base_meat_amount) return null return list(species.meat = base_meat_amount) diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index 9e59cb744ec..02dff71c3a9 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -106,10 +106,12 @@ QDEL_NULL(worn_face_offset) return ..() -/obj/item/bodypart/head/get_butcher_drops() - if(butcher_drops) +/obj/item/bodypart/head/get_butcher_drops(force = FALSE) + if(!isnull(butcher_drops) && !force) return butcher_drops - var/datum/species/species = GLOB.species_list[limb_id] + if (butcher_drop_cache[type] && !force) + return butcher_drop_cache[type] + var/datum/species/species = GLOB.species_list[species_id || limb_id] if (!species || !species.skinned_type) return null return list(species.skinned_type = 1) diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 026fb0b268b..4424cd90bad 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -38,11 +38,11 @@ /// Which functional (i.e. flightpotion) wing types (if any) does this bodypart support? If count is >1 a radial menu is used to choose between all icons in list var/list/wing_types = list(/obj/item/organ/wings/functional/angel) -/obj/item/bodypart/chest/get_butcher_drops() +/obj/item/bodypart/chest/get_butcher_drops(force = FALSE) . = ..() - if(butcher_drops) + if(!isnull(butcher_drops) && !force) return - var/datum/species/species = GLOB.species_list[limb_id] + var/datum/species/species = GLOB.species_list[species_id || limb_id] if (!species || !species.skinned_type) return if (!islist(.)) diff --git a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm index d8d1ed59774..45889011818 100644 --- a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm @@ -78,6 +78,7 @@ /obj/item/bodypart/leg/left/digitigrade icon_greyscale = 'icons/mob/human/species/lizard/bodyparts.dmi' limb_id = BODYPART_ID_DIGITIGRADE + species_id = SPECIES_LIZARD bodyshape = BODYSHAPE_HUMANOID | BODYSHAPE_DIGITIGRADE footprint_sprite = FOOTPRINT_SPRITE_CLAWS footstep_type = FOOTSTEP_MOB_CLAW @@ -89,6 +90,7 @@ /obj/item/bodypart/leg/right/digitigrade icon_greyscale = 'icons/mob/human/species/lizard/bodyparts.dmi' limb_id = BODYPART_ID_DIGITIGRADE + species_id = SPECIES_LIZARD bodyshape = BODYSHAPE_HUMANOID | BODYSHAPE_DIGITIGRADE footprint_sprite = FOOTPRINT_SPRITE_CLAWS footstep_type = FOOTSTEP_MOB_CLAW diff --git a/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm index c504f51c38a..acb4b65a821 100644 --- a/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm @@ -481,6 +481,10 @@ . = ..() AddElement(/datum/element/blood_limb_overlay) +/obj/item/bodypart/leg/left/skeleton/nonfunctional/update_limb(dropping_limb = FALSE, is_creating = FALSE) + . = ..() + limb_id = ((bodyshape & BODYSHAPE_DIGITIGRADE) && owner?.is_digitigrade_squished()) ? initial(limb_id) : "[initial(limb_id)]_[BODYPART_ID_DIGITIGRADE]" + /obj/item/bodypart/leg/right/skeleton/nonfunctional limb_id = BODYPART_ID_BONE disabling_threshold_percentage = 0 @@ -489,6 +493,10 @@ . = ..() AddElement(/datum/element/blood_limb_overlay) +/obj/item/bodypart/leg/right/skeleton/nonfunctional/update_limb(dropping_limb = FALSE, is_creating = FALSE) + . = ..() + limb_id = ((bodyshape & BODYSHAPE_DIGITIGRADE) && owner?.is_digitigrade_squished()) ? initial(limb_id) : "[initial(limb_id)]_[BODYPART_ID_DIGITIGRADE]" + ///MUSHROOM /obj/item/bodypart/head/mushroom limb_id = SPECIES_MUSHROOM @@ -741,6 +749,9 @@ ADD_TRAIT(src, TRAIT_IGNORED_BY_LIVING_FLESH, BODYPART_TRAIT) AddElement(/datum/element/living_limb_initialiser) +/obj/item/bodypart/arm/left/flesh/get_butcher_drops() + return list(/obj/item/food/meat/slab/synthmeat = 1) + /obj/item/bodypart/arm/right/flesh limb_id = BODYPART_ID_MEAT should_draw_greyscale = FALSE @@ -750,6 +761,9 @@ ADD_TRAIT(src, TRAIT_IGNORED_BY_LIVING_FLESH, BODYPART_TRAIT) AddElement(/datum/element/living_limb_initialiser) +/obj/item/bodypart/arm/right/flesh/get_butcher_drops() + return list(/obj/item/food/meat/slab/synthmeat = 1) + /obj/item/bodypart/leg/left/flesh limb_id = BODYPART_ID_MEAT should_draw_greyscale = FALSE @@ -759,6 +773,9 @@ ADD_TRAIT(src, TRAIT_IGNORED_BY_LIVING_FLESH, BODYPART_TRAIT) AddElement(/datum/element/living_limb_initialiser) +/obj/item/bodypart/leg/left/flesh/get_butcher_drops() + return list(/obj/item/food/meat/slab/synthmeat = 1) + /obj/item/bodypart/leg/right/flesh limb_id = BODYPART_ID_MEAT should_draw_greyscale = FALSE @@ -767,3 +784,6 @@ . = ..() ADD_TRAIT(src, TRAIT_IGNORED_BY_LIVING_FLESH, BODYPART_TRAIT) AddElement(/datum/element/living_limb_initialiser) + +/obj/item/bodypart/leg/right/flesh/get_butcher_drops() + return list(/obj/item/food/meat/slab/synthmeat = 1) diff --git a/icons/mob/human/bodyparts.dmi b/icons/mob/human/bodyparts.dmi index b37d44f6f8b..d1372fe5d4d 100644 Binary files a/icons/mob/human/bodyparts.dmi and b/icons/mob/human/bodyparts.dmi differ