Labourer's Choice cigarette packet doesn't go invisible when opened (#9552)

Fixes #9549

Taj card was throwing off the count to determine icon state.
This commit is contained in:
mikomyazaki
2020-08-01 20:43:02 +03:00
committed by GitHub
parent c38a04c1ac
commit 37c574b8fe
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -8,6 +8,10 @@
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
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]"
/obj/item/storage/box/fancy/cigarettes/pra/fill()
..()
new /obj/item/tajcard(src)