/obj/item/lipstick name = "red lipstick" desc = "A generic brand of lipstick." icon = 'icons/obj/items.dmi' 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") /obj/item/lipstick/purple name = "purple lipstick" colour = "purple" /obj/item/lipstick/jade name = "jade lipstick" colour = "#216F43" /obj/item/lipstick/lime name = "lime lipstick" colour = "lime" /obj/item/lipstick/black name = "black lipstick" colour = "black" /obj/item/lipstick/green name = "green lipstick" colour = "green" /obj/item/lipstick/blue name = "blue lipstick" colour = "blue" /obj/item/lipstick/white name = "white lipstick" colour = "white" /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/attack_self(mob/user as mob) overlays.Cut() 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 icon_state = "lipstick_uncap" overlays += 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 if(ishuman(M)) var/mob/living/carbon/human/H = M 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.update_body() else user.visible_message("[user] begins to do [H]'s lips with \the [src].", \ "You begin to apply \the [src].") if(do_after(user, 20, target = H)) user.visible_message("[user] does [H]'s lips with \the [src].", \ "You apply \the [src].") H.lip_style = "lipstick" H.lip_color = colour H.update_body() else to_chat(user, "Where are the lips on that?") /obj/item/razor name = "electric razor" desc = "The latest and greatest power razor born from the science of shaving." icon = 'icons/obj/items.dmi' icon_state = "razor" flags = CONDUCT w_class = WEIGHT_CLASS_TINY usesound = 'sound/items/welder2.ogg' toolspeed = 1 /obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob) if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/head/C = H.get_organ("head") var/datum/robolimb/robohead = all_robolimbs[C.model] if(user.zone_sel.selecting == "mouth") if(!get_location_accessible(H, "mouth")) to_chat(user, "The mask is in the way.") return if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'... to_chat(user, "You find yourself disappointed at the appalling lack of facial hair.") return if(C.f_style == "Shaved") to_chat(user, "Already clean-shaven.") return if(H == user) //shaving yourself user.visible_message("[user] starts to shave [user.p_their()] facial hair with [src].", \ "You take a moment shave your facial hair with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) user.visible_message("[user] shaves [user.p_their()] facial hair clean with [src].", \ "You finish shaving with [src]. Fast and clean!") C.f_style = "Shaved" H.update_fhair() playsound(src.loc, usesound, 20, 1) else var/turf/user_loc = user.loc var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s facial hair with \the [src].", \ "You start shaving [H]'s facial hair.") if(do_after(user, 50 * toolspeed, target = H)) if(user_loc == user.loc && H_loc == H.loc) user.visible_message("[user] shaves off [H]'s facial hair with \the [src].", \ "You shave [H]'s facial hair clean off.") C.f_style = "Shaved" H.update_fhair() playsound(src.loc, usesound, 20, 1) if(user.zone_sel.selecting == "head") if(!get_location_accessible(H, "head")) to_chat(user, "The headgear is in the way.") return if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'... to_chat(user, "You find yourself disappointed at the appalling lack of hair.") return if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead") to_chat(user, "There is not enough hair left to shave...") return if(isskrell(M)) to_chat(user, "Your razor isn't going to cut through tentacles.") return if(H == user) //shaving yourself user.visible_message("[user] starts to shave [user.p_their()] head with [src].", \ "You start to shave your head with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) user.visible_message("[user] shaves [user.p_their()] head with [src].", \ "You finish shaving with \the [src].") C.h_style = "Skinhead" H.update_hair() playsound(src.loc, usesound, 40, 1) else var/turf/user_loc = user.loc var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s head with \the [src]!", \ "You start shaving [H]'s head.") if(do_after(user, 50 * toolspeed, target = H)) if(user_loc == user.loc && H_loc == H.loc) user.visible_message("[user] shaves [H]'s head bald with \the [src]!", \ "You shave [H]'s head bald.") C.h_style = "Skinhead" H.update_hair() playsound(src.loc, usesound, 40, 1) else ..() else ..()