diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 8815ad6a20f..42f65141094 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -5,16 +5,22 @@ icon_state = "lipstick" w_class = WEIGHT_CLASS_TINY var/colour = "red" - var/open = 0 - var/list/lipstick_colors = list( - "purple" = "purple", - "jade" = "#216F43", - "lime" = "lime", - "black" = "black", - "green" = "green", - "blue" = "blue", - "white" = "white") + var/open = FALSE + var/static/list/lipstick_colors +/obj/item/lipstick/Initialize(mapload) + . = ..() + if(!lipstick_colors) + lipstick_colors = list( + "black" = "#000000", + "white" = "#FFFFFF", + "red" = "#FF0000", + "green" = "#00C000", + "blue" = "#0000FF", + "purple" = "#D55CD0", + "jade" = "#216F43", + "lime" = "#00FF00", + ) /obj/item/lipstick/purple name = "purple lipstick" @@ -22,7 +28,7 @@ /obj/item/lipstick/jade name = "jade lipstick" - colour = "#216F43" + colour = "jade" /obj/item/lipstick/lime name = "lime lipstick" @@ -47,40 +53,38 @@ /obj/item/lipstick/random name = "lipstick" -/obj/item/lipstick/random/New() - ..() - var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var. - colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB) - name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon +/obj/item/lipstick/random/Initialize(mapload) + . = ..() + var/lscolor = pick(lipstick_colors) // A random color is picked from the var defined initially in a new var. + colour = lipstick_colors[lscolor] // The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB) + name = "[lscolor] lipstick" // The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon - -/obj/item/lipstick/attack_self(mob/user as mob) - overlays.Cut() +/obj/item/lipstick/attack_self(mob/user) + cut_overlays() to_chat(user, "You twist \the [src] [open ? "closed" : "open"].") open = !open if(open) - var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color") - colored.color = colour + var/image/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color") + colored.color = lipstick_colors[colour] icon_state = "lipstick_uncap" - overlays += colored + add_overlay(colored) else icon_state = "lipstick" -/obj/item/lipstick/attack(mob/M as mob, mob/user as mob) - if(!open) return - - if(!istype(M, /mob)) return +/obj/item/lipstick/attack(mob/M, mob/user) + if(!open || !istype(M)) + return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.lip_style) //if they already have lipstick on + if(H.lip_style) // If they already have lipstick on to_chat(user, "You need to wipe off the old lipstick first!") return if(H == user) user.visible_message("[user] does [user.p_their()] lips with [src].", \ "You take a moment to apply [src]. Perfect!") H.lip_style = "lipstick" - H.lip_color = colour + H.lip_color = lipstick_colors[colour] H.update_body() else user.visible_message("[user] begins to do [H]'s lips with \the [src].", \ @@ -89,7 +93,7 @@ user.visible_message("[user] does [H]'s lips with \the [src].", \ "You apply \the [src].") H.lip_style = "lipstick" - H.lip_color = colour + H.lip_color = lipstick_colors[colour] H.update_body() else to_chat(user, "Where are the lips on that?") diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 81907ba516f..1f38e564928 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -273,10 +273,10 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[UNDERWEAR_LAYER] = mutable_appearance(underwear_standing, layer = -UNDERWEAR_LAYER) apply_overlay(UNDERWEAR_LAYER) - if(lip_style && (LIPS in dna.species.species_traits)) - var/icon/lips = icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "lips_[lip_style]_s") - lips.Blend(lip_color, ICON_ADD) - standing += mutable_appearance(lips, layer = -BODY_LAYER) + if(lip_style && (LIPS in dna.species.species_traits)) + var/mutable_appearance/lips = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]_s") + lips.color = lip_color + standing += lips overlays_standing[BODY_LAYER] = standing apply_overlay(BODY_LAYER) diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index ff471760fe8..9b6d9468b9d 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index bc7e927aab2..a82f3fa10a2 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ