Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into cassette-refactor
  • Loading branch information
Absolucy committed Dec 15, 2024
2 parents 69451fc + f336da9 commit 71d6ca6
Show file tree
Hide file tree
Showing 2 changed files with 13 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
3 changes: 3 additions & 0 deletions html/changelogs/archive/2024-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,6 @@
break.'
- sound: The newers ERTs now have a greet sound.
- code_imp: Changed the logic ordering of the mech hydraulic clamp.
TheColorCyan:
- bugfix: Random lipstick now has proper icon upon spawn.
- rscdel: Syndie lipstick can no longer spawn as a random lipstick color.

0 comments on commit 71d6ca6

Please sign in to comment.