[MIRROR] Makes it so the matchbox's matches visibly empty from the sprite when you take matches out (#6230)

* Makes it so the matchbox's matches visibly empty from the sprite when you take matches out (#59575)

* 4 fucking sprites

* forgot to make it call parent

* uses base_icon_state

Co-authored-by: TemporalOroboros <TemporalOroboros@ gmail.com>

* adds base_icon_state variable to matches

* base_icon_state fix

Co-authored-by: TemporalOroboros <TemporalOroboros@ gmail.com>

* Makes it so the matchbox's matches visibly empty from the sprite when you take matches out

Co-authored-by: Wallemations <66052067+Wallemations@users.noreply.github.com>
Co-authored-by: TemporalOroboros <TemporalOroboros@ gmail.com>
This commit is contained in:
SkyratBot
2021-06-11 00:49:44 +02:00
committed by GitHub
parent 57c2dd079c
commit 76b968aee3
+13
View File
@@ -713,6 +713,7 @@
drop_sound = 'sound/items/handling/matchbox_drop.ogg'
pickup_sound = 'sound/items/handling/matchbox_pickup.ogg'
custom_price = PAYCHECK_ASSISTANT * 0.4
base_icon_state = "matchbox"
/obj/item/storage/box/matches/ComponentInitialize()
. = ..()
@@ -727,6 +728,18 @@
if(istype(W, /obj/item/match))
W.matchignite()
/obj/item/storage/box/matches/update_icon_state()
. = ..()
switch(length(contents))
if(10)
icon_state = base_icon_state
if(5 to 9)
icon_state = "[base_icon_state]_almostfull"
if(1 to 4)
icon_state = "[base_icon_state]_almostempty"
if(0)
icon_state = "[base_icon_state]_e"
/obj/item/storage/box/lights
name = "box of replacement bulbs"
icon = 'icons/obj/storage.dmi'