mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
This commit does the following: - Adds spraycans as a subtype of crayons. - Slight crayon overhaul to make room for this - Can spray graffiti, runes, and letters on floors & walls - Can spray mobs and paint their face - Fixes & overhauls lipstick - Lipstick is now overlay and Blend() based. - Also fixes a few bugs with the system. - Updates paper code to accomodate for wiping off spraypaint as well - Slight modification to space cleaner - Space cleaner now cleans your face of lipstick and spraypaint
118 lines
4.2 KiB
Plaintext
118 lines
4.2 KiB
Plaintext
var/global/list/limb_icon_cache = list()
|
|
|
|
/obj/item/organ/external/proc/compile_icon()
|
|
overlays.Cut()
|
|
// This is a kludge, only one icon has more than one generation of children though.
|
|
for(var/obj/item/organ/external/organ in contents)
|
|
if(organ.children && organ.children.len)
|
|
for(var/obj/item/organ/external/child in organ.children)
|
|
overlays += child.mob_icon
|
|
overlays += organ.mob_icon
|
|
|
|
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
|
|
s_tone = null
|
|
s_col = null
|
|
if(status & ORGAN_ROBOT)
|
|
return
|
|
if(!isnull(human.s_tone) && (human.species.bodyflags & HAS_SKIN_TONE))
|
|
s_tone = human.s_tone
|
|
if(human.species.bodyflags & HAS_SKIN_COLOR)
|
|
s_col = list(human.r_skin, human.g_skin, human.b_skin)
|
|
|
|
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
|
|
..()
|
|
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
|
if(eyes) eyes.update_colour()
|
|
|
|
/obj/item/organ/external/head/removed()
|
|
get_icon()
|
|
..()
|
|
|
|
/obj/item/organ/external/head/get_icon()
|
|
|
|
..()
|
|
if(owner.species.has_organ["eyes"])
|
|
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
|
if(owner.species.eyes)
|
|
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
|
|
if(eyes)
|
|
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
|
|
else
|
|
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
|
|
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
|
|
|
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
|
|
var/image/lips = image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[owner.lip_style]_s")
|
|
lips.color = owner.lip_color
|
|
mob_icon.Blend(lips, ICON_OVERLAY)
|
|
|
|
if(owner.f_style)
|
|
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
|
|
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
|
|
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
|
if(facial_hair_style.do_colouration)
|
|
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
|
|
overlays |= facial_s
|
|
|
|
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
|
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
|
|
if(hair_style && (owner.species.name in hair_style.species_allowed))
|
|
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
|
if(hair_style.do_colouration)
|
|
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
|
|
overlays |= hair_s
|
|
|
|
return mob_icon
|
|
|
|
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
|
|
|
var/gender
|
|
if(force_icon)
|
|
mob_icon = new /icon(force_icon, "[icon_name]")
|
|
else
|
|
if(!owner)
|
|
mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_f" : ""]")
|
|
else
|
|
|
|
if(gendered_icon)
|
|
if(owner.gender == FEMALE)
|
|
gender = "f"
|
|
else
|
|
gender = "m"
|
|
|
|
if(skeletal)
|
|
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
|
else if ((status & ORGAN_ROBOT) && !(owner.species && owner.species.flags & IS_SYNTHETIC))
|
|
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
|
else
|
|
if (status & ORGAN_MUTATED)
|
|
mob_icon = new /icon(owner.species.deform, "[icon_name][gender ? "_[gender]" : ""]")
|
|
else
|
|
mob_icon = new /icon(owner.species.icobase, "[icon_name][gender ? "_[gender]" : ""]")
|
|
|
|
if(status & ORGAN_DEAD)
|
|
mob_icon.ColorTone(rgb(10,50,0))
|
|
mob_icon.SetIntensity(0.7)
|
|
|
|
if(!isnull(s_tone))
|
|
if(s_tone >= 0)
|
|
mob_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
|
else
|
|
mob_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
|
else if(s_col && s_col.len >= 3)
|
|
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
|
|
|
|
dir = EAST
|
|
icon = mob_icon
|
|
|
|
return mob_icon
|
|
|
|
// new damage icon system
|
|
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
|
/obj/item/organ/external/update_icon()
|
|
var/n_is = damage_state_text()
|
|
if (n_is != damage_state)
|
|
damage_state = n_is
|
|
return 1
|
|
return 0
|