fixes PRA cig packet (#12029)

This commit is contained in:
Casper3667
2021-06-13 19:53:57 -03:00
committed by GitHub
parent 7a02fb55c0
commit 4dd54461ae
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -9,8 +9,10 @@
can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt, /obj/item/tajcard)
/obj/item/storage/box/fancy/cigarettes/pra/update_icon()
. = ..()
var/card_count = instances_of_type_in_list(new /obj/item/tajcard, src.contents) //having cards in here doesn't count for icon
icon_state = "[initial(icon_state)][contents.len - card_count]"
if(opened)
icon_state = "[initial(icon_state)][contents.len - card_count]"
/obj/item/storage/box/fancy/cigarettes/pra/fill()
..()