Skip to content

Commit

Permalink
no more weird lipstick (#4564)
Browse files Browse the repository at this point in the history
Co-authored-by: TheColorCyan <[email protected]>
  • Loading branch information
TheColorCyan and TheColorCyan authored Dec 15, 2024
1 parent 3642c34 commit e0ead7d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions code/game/objects/items/cosmetics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
/// A trait that's applied while someone has this lipstick applied, and is removed when the lipstick is removed
var/lipstick_trait

///Defines if lipstick color can be spawned as a random lipstick
var/lipstick_random = TRUE

/obj/item/lipstick/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
Expand All @@ -24,8 +27,10 @@
update_appearance(UPDATE_ICON)

/obj/item/lipstick/update_icon_state()
icon_state = "[initial(icon_state)][open ? "_uncap" : null]"
inhand_icon_state = "[initial(icon_state)][open ? "open" : null]"
var/initial_icon_state = icon_state
icon_state = "[icon_state][open ? "_uncap" : null]"
inhand_icon_state = "[icon_state][open ? "open" : null]"
icon_state = initial_icon_state
return ..()

/obj/item/lipstick/update_overlays()
Expand Down Expand Up @@ -71,6 +76,7 @@
icon_state = "slipstick"
lipstick_color = COLOR_SYNDIE_RED
lipstick_trait = TRAIT_SYNDIE_KISS
lipstick_random = FALSE

/obj/item/lipstick/random
name = "lipstick"
Expand All @@ -85,7 +91,8 @@
for(var/obj/item/lipstick/lipstick_path as anything in (typesof(/obj/item/lipstick) - src.type))
if(!initial(lipstick_path.lipstick_color))
continue
possible_colors[initial(lipstick_path.lipstick_color)] = initial(lipstick_path.name)
if(lipstick_path.lipstick_random)
possible_colors[initial(lipstick_path.lipstick_color)] = initial(lipstick_path.name)
lipstick_color = pick(possible_colors)
name = possible_colors[lipstick_color]
update_appearance()
Expand Down

0 comments on commit e0ead7d

Please sign in to comment.