From 346b54ad26f8ba86fa6162afde2455ec178d0d4a Mon Sep 17 00:00:00 2001 From: mochi Date: Wed, 19 Aug 2020 09:44:24 +0200 Subject: [PATCH] Fix random lipstick colour always defaulting to white --- code/game/objects/items/weapons/cosmetics.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 42f65141094..fcfe183dddf 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -55,16 +55,15 @@ /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 + colour = pick(lipstick_colors) + name = "[colour] lipstick" /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 = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color") + var/mutable_appearance/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color") colored.color = lipstick_colors[colour] icon_state = "lipstick_uncap" add_overlay(colored)