From 0c67ee398a77e08dae8e58317f0f728d23cbd2cc Mon Sep 17 00:00:00 2001 From: tigercat2000 Date: Thu, 25 Oct 2018 15:48:03 -0700 Subject: [PATCH] Move lighting to it's own plane, fix observers --- code/modules/lighting/lighting_overlay.dm | 1 + code/modules/mob/dead/observer/observer.dm | 3 +-- code/modules/mob/living/carbon/human/human.dm | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index dd28f990322..a8f87338ae8 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -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" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 26f77a31adc..065e5c4611e 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d218130ef2a..49aab53d818 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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.*/