diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b6a40f6ec748..ffbc930915d8 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -74,19 +74,41 @@ /obj/item/clothing/update_icon() ..() - overlays.len = 0 dynamic_overlay.len = 0 + var/image/dyn_overlay_worn + var/image/dyn_overlay_left + var/image/dyn_overlay_right + + if ((luminosity > 0) || (dyed_parts.len > 0)) + dyn_overlay_worn = image('icons/effects/32x32.dmi', src, "blank") + dyn_overlay_left = image('icons/effects/32x32.dmi', src, "blank") + dyn_overlay_right = image('icons/effects/32x32.dmi', src, "blank") + + if (luminosity > 0) + update_moody_light_index("luminous_clothing", image_override = image(icon, src, icon_state)) + //dynamic in-hands moody lights + var/image/worn_moody = image(cloth_icon, src, "[icon_state][(cloth_layer == UNIFORM_LAYER) ? "_s" : ""]") + var/image/left_moody = image(inhand_states["left_hand"], src, item_state) + var/image/right_moody = image(inhand_states["right_hand"], src, item_state) + worn_moody.blend_mode = BLEND_ADD + worn_moody.plane = LIGHTING_PLANE + dyn_overlay_worn.overlays += worn_moody + left_moody.blend_mode = BLEND_ADD + left_moody.plane = LIGHTING_PLANE + dyn_overlay_left.overlays += left_moody + right_moody.blend_mode = BLEND_ADD + right_moody.plane = LIGHTING_PLANE + dyn_overlay_right.overlays += right_moody + if (dyed_parts.len > 0) if (!cloth_layer || !cloth_icon) return - var/image/dyn_overlay_worn = image('icons/effects/32x32.dmi', src, "blank") - var/image/dyn_overlay_left = image('icons/effects/32x32.dmi', src, "blank") - var/image/dyn_overlay_right = image('icons/effects/32x32.dmi', src, "blank") for (var/part in dyed_parts) var/list/dye_data = dyed_parts[part] var/dye_color = dye_data[1] var/dye_alpha = dye_data[2] + //TODO: dye_date[3] to allow glowing clothing? var/_state = dye_base_iconstate_override if (!_state) @@ -120,10 +142,15 @@ right_overlay.alpha = dye_alpha dyn_overlay_right.overlays += right_overlay + if ((luminosity > 0) || (dyed_parts.len > 0)) dynamic_overlay["[cloth_layer]"] = dyn_overlay_worn dynamic_overlay["[HAND_LAYER]-[GRASP_LEFT_HAND]"] = dyn_overlay_left dynamic_overlay["[HAND_LAYER]-[GRASP_RIGHT_HAND]"] = dyn_overlay_right + set_blood_overlay()//re-applying blood stains + if (on_fire && fire_overlay) + overlays += fire_overlay + /obj/item/clothing/can_quick_store(var/obj/item/I) for(var/obj/item/clothing/accessory/storage/A in accessories) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 5d33376dbeb8..292af5df64fc 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -330,6 +330,8 @@ desc = "A true prankster's groovy facial attire. A clown is incomplete without his wig and mask." icon_state = "clownmaskpsyche" item_state = "clownmaskpsyche" + inhand_states = list("left_hand" = 'icons/mob/in-hand/left/clothing.dmi', "right_hand" = 'icons/mob/in-hand/right/clothing.dmi') + luminosity = 2 species_fit = list(VOX_SHAPED, GREY_SHAPED, INSECT_SHAPED) can_flip = 0 canstage = 0 diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 87adacf7aeb9..93a87956775a 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -587,6 +587,8 @@ name = "clown psychedelic shoes" icon_state = "clownshoespsyche" item_state = "clownshoespsyche" + inhand_states = list("left_hand" = 'icons/mob/in-hand/left/clothing.dmi', "right_hand" = 'icons/mob/in-hand/right/clothing.dmi') + luminosity = 2 _color = "clownshoespsyche" footprint_type = /obj/effect/decal/cleanable/blood/tracks/footprints/clown species_fit = list(VOX_SHAPED) diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 981fa6c9771b..d6460d370c95 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -98,7 +98,7 @@ /obj/item/clothing/under/color/pink name = "pink jumpsuit" icon_state = "pink" - item_state = "p_suit" + item_state = "pi_suit" _color = "pink" color = null clothing_flags = ONESIZEFITSALL | COLORS_OVERLAY @@ -126,9 +126,12 @@ name = "psychedelic jumpsuit" desc = "Groovy!" icon_state = "psyche" + item_state = "psyche" + inhand_states = list("left_hand" = 'icons/mob/in-hand/left/clothing.dmi', "right_hand" = 'icons/mob/in-hand/right/clothing.dmi') _color = "psyche" clothing_flags = ONESIZEFITSALL species_fit = list(GREY_SHAPED, INSECT_SHAPED) + luminosity = 2 /obj/item/clothing/under/lightblue name = "lightblue jumpsuit" @@ -140,6 +143,7 @@ /obj/item/clothing/under/aqua name = "aqua jumpsuit" icon_state = "aqua" + item_state = "a_suit" _color = "aqua" clothing_flags = ONESIZEFITSALL species_fit = list(VOX_SHAPED, GREY_SHAPED, INSECT_SHAPED) @@ -147,7 +151,7 @@ /obj/item/clothing/under/purple name = "purple jumpsuit" icon_state = "purple" - item_state = "p_suit" + item_state = "pu_suit" _color = "purple" clothing_flags = ONESIZEFITSALL species_fit = list(GREY_SHAPED, INSECT_SHAPED) diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index d676d1e67d62..3b92428d3578 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -923,6 +923,8 @@ desc = "Do you know the definition of insanity?" icon_state = "clownpsyche" item_state = "clownpsyche" + inhand_states = list("left_hand" = 'icons/mob/in-hand/left/clothing.dmi', "right_hand" = 'icons/mob/in-hand/right/clothing.dmi') + luminosity = 2 _color = "clownpsyche" clothing_flags = ONESIZEFITSALL species_fit = list(INSECT_SHAPED) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index c751d90e3bcb..c9fa850844bb 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -99,10 +99,16 @@ Please contact me on #coderbus IRC. ~Carn x //FUCK YOU CARN update_overlays_standing() update_transform() update_hands_icons() + update_luminosity() if(istype(loc,/obj/structure/inflatable/shelter)) var/obj/O = loc O.update_icon() //Shelters use an overlay of the human inside, so if we change state we want the appearance to reflect that. +/mob/living/carbon/human/proc/update_luminosity()//due to moody lights we might want people to show up in the dark even if they aren't actually emitting light + luminosity = 0 + for (var/obj/item/I in contents) + luminosity = max(luminosity, I.luminosity) + /mob/living/carbon/human/proc/update_overlays_standing() if(species && species.override_icon) species_override_icon() diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index d1577746eaf2..4c6be0f6e061 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -81,3 +81,5 @@ var/tangibility = 1 //can this mob be interacted with things hitting it and etc? var/braindamagespeechcooldown = FALSE //used to avoid braindamage proc spamming when checking the like 80 replacements + + var/list/luminosity_sources = list() diff --git a/icons/mob/in-hand/left/clothing.dmi b/icons/mob/in-hand/left/clothing.dmi index d432c63ea5ea..3a821e63c6a2 100644 Binary files a/icons/mob/in-hand/left/clothing.dmi and b/icons/mob/in-hand/left/clothing.dmi differ diff --git a/icons/mob/in-hand/left/items_lefthand.dmi b/icons/mob/in-hand/left/items_lefthand.dmi index bccf89a6e04c..de57bab2a305 100644 Binary files a/icons/mob/in-hand/left/items_lefthand.dmi and b/icons/mob/in-hand/left/items_lefthand.dmi differ diff --git a/icons/mob/in-hand/right/clothing.dmi b/icons/mob/in-hand/right/clothing.dmi index 7c40f5c607c5..d6db171aec00 100644 Binary files a/icons/mob/in-hand/right/clothing.dmi and b/icons/mob/in-hand/right/clothing.dmi differ diff --git a/icons/mob/in-hand/right/items_righthand.dmi b/icons/mob/in-hand/right/items_righthand.dmi index 22179903962f..70f215340c31 100644 Binary files a/icons/mob/in-hand/right/items_righthand.dmi and b/icons/mob/in-hand/right/items_righthand.dmi differ