Husked mobs now keep some of their bodypart overlays (#95155)

## About The Pull Request

(Some) tails, snouts, horns and other "solid" bodypart overlays are now
preserved on husked mobs, meaning that lizards or fishpeople will no
longer suddenly lose a chunk of their body when husked. Cybernetic
implants, being inorganic, are not colored and preserver their visuals
in full.

<img width="70" height="97" alt="dreamseeker_8CYayvB8ck"
src="https://github.com/user-attachments/assets/32df4ef4-4d20-4d46-8bf8-ccf043cab3ec"
/>

<img width="95" height="104" alt="image"
src="https://github.com/user-attachments/assets/47171a11-2228-4ef8-9d60-e169794fa6fd"
/>

## Why It's Good For The Game

Husking hasn't been an effective method of anonymizing corpses for a
very long while, and I think that visual consistency here doesn't hurt
it much more while making the game feel more immersive and cohesive.

## Changelog
🆑
balance: Husked mobs now keep some of their bodypart overlays, such as
snouts, tails and horns
/🆑
This commit is contained in:
SmArtKar
2026-02-23 17:50:53 -05:00
committed by GitHub
parent ab4a64651c
commit 2b24732b9d
18 changed files with 84 additions and 50 deletions
+13 -11
View File
@@ -96,7 +96,7 @@ Unlike normal organs, we're actually inside a persons limbs at all times
//Build the mob sprite and use it as our overlay
for(var/external_layer in bodypart_overlay.all_layers)
if(bodypart_overlay.layers & external_layer)
. += bodypart_overlay.get_overlay(external_layer, bodypart_owner)
. += bodypart_overlay.get_overlay(external_layer, bodypart_owner, bodypart_owner?.is_husked)
///The horns of a lizard!
/obj/item/organ/horns
@@ -118,9 +118,10 @@ Unlike normal organs, we're actually inside a persons limbs at all times
layers = EXTERNAL_ADJACENT
feature_key = FEATURE_HORNS
dyable = TRUE
draw_on_husks = HUSK_OVERLAY_NORMAL
/datum/bodypart_overlay/mutant/horns/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
/datum/bodypart_overlay/mutant/horns/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
///The frills of a lizard (like weird fin ears)
/obj/item/organ/frills
@@ -142,8 +143,8 @@ Unlike normal organs, we're actually inside a persons limbs at all times
layers = EXTERNAL_ADJACENT
feature_key = FEATURE_FRILLS
/datum/bodypart_overlay/mutant/frills/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEEARS)
/datum/bodypart_overlay/mutant/frills/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEEARS)
///Guess what part of the lizard this is?
/obj/item/organ/snout
@@ -184,9 +185,10 @@ Unlike normal organs, we're actually inside a persons limbs at all times
/datum/bodypart_overlay/mutant/snout
layers = EXTERNAL_ADJACENT
feature_key = FEATURE_SNOUT
draw_on_husks = HUSK_OVERLAY_GRAYSCALE
/datum/bodypart_overlay/mutant/snout/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDESNOUT)
/datum/bodypart_overlay/mutant/snout/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDESNOUT)
///A moth's antennae
/obj/item/organ/antennae
@@ -266,8 +268,8 @@ Unlike normal organs, we're actually inside a persons limbs at all times
/datum/bodypart_overlay/mutant/antennae/get_base_icon_state()
return burnt ? burn_datum.icon_state : sprite_datum.icon_state
/datum/bodypart_overlay/mutant/antennae/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEANTENNAE)
/datum/bodypart_overlay/mutant/antennae/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEANTENNAE)
///The leafy hair of a podperson
/obj/item/organ/pod_hair
@@ -308,5 +310,5 @@ Unlike normal organs, we're actually inside a persons limbs at all times
else
overlay.color = null
/datum/bodypart_overlay/mutant/pod_hair/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
/datum/bodypart_overlay/mutant/pod_hair/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
+3 -2
View File
@@ -31,9 +31,10 @@
layers = EXTERNAL_ADJACENT|EXTERNAL_BEHIND
feature_key = FEATURE_SPINES
dyable = TRUE
draw_on_husks = HUSK_OVERLAY_GRAYSCALE
/datum/bodypart_overlay/mutant/spines/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/spines/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/spines/set_dye_color(new_color, obj/item/organ/tail/organ)
var/obj/item/organ/tail/tail = organ?.owner.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL)
+7 -4
View File
@@ -147,8 +147,8 @@
/datum/bodypart_overlay/mutant/tail/get_base_icon_state()
return "[wagging ? "wagging_" : ""][sprite_datum.icon_state]" //add the wagging tag if we be wagging
/datum/bodypart_overlay/mutant/tail/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/tail/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/obj/item/organ/tail/cat
name = "tail"
@@ -216,6 +216,7 @@
/datum/bodypart_overlay/mutant/tail/xeno
color_source = NONE
feature_key = FEATURE_TAIL_XENO
draw_on_husks = HUSK_OVERLAY_GRAYSCALE
imprint_on_next_insertion = FALSE
/// We don't want to bother writing this in DNA, just use this appearance
var/default_appearance = "Xeno"
@@ -242,6 +243,7 @@
///Lizard tail bodypart overlay datum
/datum/bodypart_overlay/mutant/tail/lizard
feature_key = FEATURE_TAIL_LIZARD
draw_on_husks = HUSK_OVERLAY_GRAYSCALE
/obj/item/organ/tail/lizard/fake
name = "fabricated lizard tail"
@@ -251,6 +253,7 @@
/datum/bodypart_overlay/mutant/tail_spines
layers = EXTERNAL_ADJACENT|EXTERNAL_BEHIND
feature_key = FEATURE_TAILSPINES
draw_on_husks = HUSK_OVERLAY_GRAYSCALE
///Spines wag when the tail does
var/wagging = FALSE
/// Key for tail spine states, depends on the shape of the tail. Defined in the tail sprite datum.
@@ -259,8 +262,8 @@
/datum/bodypart_overlay/mutant/tail_spines/get_base_icon_state()
return (!isnull(tail_spine_key) ? "[tail_spine_key]_" : "") + (wagging ? "wagging_" : "") + sprite_datum.icon_state // Select the wagging state if appropriate
/datum/bodypart_overlay/mutant/tail_spines/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/tail_spines/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/tail_spines/set_dye_color(new_color, obj/item/organ/organ)
dye_color = new_color //no update_body_parts() call, tail/set_dye_color will do it.
+1 -4
View File
@@ -97,6 +97,7 @@
/datum/bodypart_overlay/mutant/wings/moth
feature_key = FEATURE_MOTH_WINGS
layers = EXTERNAL_BEHIND | EXTERNAL_FRONT
slot_blocker = HIDEMUTWINGS
///Accessory datum of the burn sprite
var/datum/sprite_accessory/burn_datum = /datum/sprite_accessory/moth_wings/burnt_off
///Are we burned? If so we draw differently
@@ -104,12 +105,8 @@
/datum/bodypart_overlay/mutant/wings/moth/New()
. = ..()
burn_datum = fetch_sprite_datum(burn_datum)
/datum/bodypart_overlay/mutant/wings/moth/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEMUTWINGS)
/datum/bodypart_overlay/mutant/wings/moth/get_base_icon_state()
return burnt ? burn_datum.icon_state : sprite_datum.icon_state
+4 -2
View File
@@ -23,6 +23,8 @@
/datum/bodypart_overlay/mutant/wings
layers = ALL_EXTERNAL_OVERLAYS
feature_key = FEATURE_WINGS
/// Slot we check against
var/slot_blocker = HIDEJUMPSUIT
/datum/bodypart_overlay/mutant/wings/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
return !(bodypart_owner.owner?.obscured_slots & HIDEJUMPSUIT)
/datum/bodypart_overlay/mutant/wings/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner, mob/living/carbon/owner, is_husked = FALSE)
return ..() && !(bodypart_owner.owner?.obscured_slots & slot_blocker)