Move lighting to it's own plane, fix observers

This commit is contained in:
tigercat2000
2018-10-25 15:48:03 -07:00
parent bd744965b0
commit 0c67ee398a
3 changed files with 6 additions and 5 deletions
@@ -6,6 +6,7 @@
anchored = 1
icon = LIGHTING_ICON
layer = LIGHTING_LAYER
plane = LIGHTING_PLANE
invisibility = INVISIBILITY_LIGHTING
color = LIGHTING_BASE_MATRIX
icon_state = "light1"
+1 -2
View File
@@ -48,8 +48,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
if(ishuman(body))
var/mob/living/carbon/human/H = body
icon = H.stand_icon
overlays = H.overlays_standing
appearance = H.appearance
else
icon = body.icon
icon_state = body.icon_state
@@ -7,6 +7,7 @@
var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(loc)
icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor.
if(length(args) > 1)
log_runtime(EXCEPTION("human/New called with more than 1 argument (REPORT THIS ENTIRE RUNTIME TO A CODER)"))
. = ..()
@@ -17,7 +18,6 @@
// Species name is handled by set_species()
set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE)
icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor.
..()
@@ -1528,8 +1528,9 @@
var/obj/item/organ/external/head/head_organ = get_organ("head")
var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style]
var/icon/hair = new /icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
return image(get_icon_difference(get_eyecon(), hair), layer = LIGHTING_LAYER + 1) //Cut the hair's pixels from the eyes icon so eyes covered by bangs stay hidden even while on a higher layer.
var/mutable_appearance/MA = mutable_appearance(get_icon_difference(get_eyecon(), hair), layer = LIGHTING_LAYER + 1)
MA.plane = LIGHTING_PLANE
return MA //Cut the hair's pixels from the eyes icon so eyes covered by bangs stay hidden even while on a higher layer.
/*Used to check if eyes should shine in the dark. Returns the image of the eyes on the layer where they will appear to shine.
Eyes need to have significantly high darksight to shine unless the mob has the XRAY vision mutation. Eyes will not shine if they are covered in any way.*/