Skip to content

Commit

Permalink
Bodypart overlays provide emissive blockers (#85053)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Jan 23, 2025
1 parent 1740f7b commit 234c007
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions code/datums/bodypart_overlays/bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
///Key of the icon states of all the sprite_datums for easy caching
var/cache_key = ""

/// Whether the overlay blocks emissive light
var/blocks_emissive = EMISSIVE_BLOCK_UNIQUE

///Wrapper for getting the proper image, colored and everything
/datum/bodypart_overlay/proc/get_overlay(layer, obj/item/bodypart/limb)
layer = bitflag_to_layer(layer)
. = get_image(layer, limb)
color_image(., layer, limb)
var/image/main_image = get_image(layer, limb)
color_image(main_image, layer, limb)
if(blocks_emissive == EMISSIVE_BLOCK_NONE || !limb)
return main_image

var/list/all_images = list(
main_image,
emissive_blocker(main_image.icon, main_image.icon_state, limb, layer = main_image.layer, alpha = main_image.alpha)
)
return all_images

///Generate the image. Needs to be overriden
/datum/bodypart_overlay/proc/get_image(layer, obj/item/bodypart/limb)
Expand Down

0 comments on commit 234c007

Please sign in to comment.