mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Lizard frills are hidden by HIDEHAIR rather than HIDEEARS / Lizard frills are masked like hair by hats (#95986)
This commit is contained in:
@@ -545,7 +545,7 @@
|
||||
for(var/datum/bodypart_overlay/overlay as anything in bodypart_overlays)
|
||||
if(!overlay.can_draw_on_bodypart(src, owner, is_husked))
|
||||
continue
|
||||
. += overlay.generate_icon_cache()
|
||||
. += overlay.generate_icon_cache(src)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
. += "[human_owner.mob_height]"
|
||||
@@ -574,7 +574,7 @@
|
||||
for(var/datum/bodypart_overlay/overlay as anything in bodypart_overlays)
|
||||
if(!overlay.can_draw_on_bodypart(src, owner, TRUE))
|
||||
continue
|
||||
. += overlay.generate_icon_cache()
|
||||
. += overlay.generate_icon_cache(src)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
. += "[human_owner.mob_height]"
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
if(item.hair_mask)
|
||||
LAZYADD(hair_masks, item.hair_mask)
|
||||
update_hair()
|
||||
update_body() // this is solely for lizard frills
|
||||
add_item_coverage(item)
|
||||
|
||||
/mob/living/carbon/has_unequipped(obj/item/item)
|
||||
@@ -185,6 +186,7 @@
|
||||
if(item.hair_mask)
|
||||
LAZYREMOVE(hair_masks, item.hair_mask)
|
||||
update_hair()
|
||||
update_body() // this is solely for lizard frills
|
||||
remove_item_coverage(item)
|
||||
|
||||
/mob/living/carbon/doUnEquip(obj/item/item_dropping, force, newloc, no_move, invdrop = TRUE, silent = FALSE)
|
||||
|
||||
+26
-1
@@ -144,7 +144,32 @@ Unlike normal organs, we're actually inside a persons limbs at all times
|
||||
feature_key = FEATURE_FRILLS
|
||||
|
||||
/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)
|
||||
return ..() && !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
|
||||
|
||||
/datum/bodypart_overlay/mutant/frills/generate_icon_cache(obj/item/bodypart/limb)
|
||||
. = ..()
|
||||
if(LAZYLEN(limb?.owner?.hair_masks))
|
||||
. += jointext(limb.owner.hair_masks, ",")
|
||||
|
||||
/datum/bodypart_overlay/mutant/frills/get_image(image_layer, obj/item/bodypart/limb)
|
||||
if(!LAZYLEN(limb?.owner?.hair_masks))
|
||||
return ..()
|
||||
|
||||
var/list/hair_masks_to_use = limb.owner.hair_masks
|
||||
var/icon_state_to_use = build_icon_state(image_layer, limb)
|
||||
var/frill_cache_key = "[sprite_datum.type]-[icon_state_to_use]-[jointext(hair_masks_to_use, ",")]"
|
||||
var/static/list/cached_frill_icons
|
||||
var/icon/cached_icon = LAZYACCESS(cached_frill_icons, frill_cache_key)
|
||||
if(isnull(cached_icon))
|
||||
cached_icon = icon(sprite_datum.icon, build_icon_state(image_layer, limb))
|
||||
for(var/datum/hair_mask/mask as anything in hair_masks_to_use)
|
||||
cached_icon.Blend(icon(mask::icon, mask::icon_state), ICON_ADD)
|
||||
LAZYSET(cached_frill_icons, frill_cache_key, cached_icon)
|
||||
|
||||
var/mutable_appearance/uncached_appearance = mutable_appearance(cached_icon, layer = image_layer)
|
||||
if(sprite_datum.center)
|
||||
center_image(uncached_appearance, sprite_datum.dimension_x, sprite_datum.dimension_y)
|
||||
return uncached_appearance
|
||||
|
||||
///Guess what part of the lizard this is?
|
||||
/obj/item/organ/snout
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
feature_key = initial(feature_key)
|
||||
set_appearance_from_name(sprite_datum.name)
|
||||
|
||||
/datum/bodypart_overlay/mutant/wings/functional/generate_icon_cache()
|
||||
/datum/bodypart_overlay/mutant/wings/functional/generate_icon_cache(obj/item/bodypart/limb)
|
||||
. = ..()
|
||||
. += wings_open ? "open" : "closed"
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
implant = null
|
||||
return ..()
|
||||
|
||||
/datum/bodypart_overlay/augment/generate_icon_cache()
|
||||
/datum/bodypart_overlay/augment/generate_icon_cache(obj/item/bodypart/limb)
|
||||
. = ..()
|
||||
. += implant.get_overlay_state()
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user