Fix invalid box overlays

This commit is contained in:
Elizabeth Lavenza
2024-04-16 02:09:25 -04:00
parent 62471713f1
commit e57c803e3a
2 changed files with 5 additions and 1 deletions

View File

@@ -623,6 +623,7 @@
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children." desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
icon = 'icons/obj/toy.dmi' icon = 'icons/obj/toy.dmi'
icon_state = "spbox" icon_state = "spbox"
illustration = null
/obj/item/storage/box/snappops/ComponentInitialize() /obj/item/storage/box/snappops/ComponentInitialize()
. = ..() . = ..()

View File

@@ -170,6 +170,7 @@
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
custom_price = PRICE_ALMOST_CHEAP custom_price = PRICE_ALMOST_CHEAP
var/spawn_coupon = TRUE var/spawn_coupon = TRUE
var/has_open_overlay = TRUE
/obj/item/storage/fancy/cigarettes/attack_self(mob/user) /obj/item/storage/fancy/cigarettes/attack_self(mob/user)
if(contents.len == 0 && spawn_coupon) if(contents.len == 0 && spawn_coupon)
@@ -227,7 +228,8 @@
. = ..() . = ..()
if(!fancy_open || !contents.len) if(!fancy_open || !contents.len)
return return
. += "[icon_state]_open" if(has_open_overlay)
. += "[icon_state]_open"
var/cig_position = 1 var/cig_position = 1
for(var/C in contents) for(var/C in contents)
var/mutable_appearance/inserted_overlay = mutable_appearance(icon) var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
@@ -436,6 +438,7 @@
icon_type = "premium cigar" icon_type = "premium cigar"
spawn_type = /obj/item/clothing/mask/cigarette/cigar spawn_type = /obj/item/clothing/mask/cigarette/cigar
spawn_coupon = FALSE spawn_coupon = FALSE
has_open_overlay = FALSE
/obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize() /obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize()
. = ..() . = ..()