Extinguisher cabinet resprite (#23003)

* lets put out this fire

* lets paint it red

* adjusting the code

* Extinguisher cabinet resprite
This commit is contained in:
Henri215
2023-10-27 20:18:59 +01:00
committed by GitHub
parent e22fb02ef2
commit 7ddf9c4250
2 changed files with 9 additions and 8 deletions
@@ -7,7 +7,7 @@
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon = 'icons/obj/closet.dmi'
icon_state = "extinguisher_closed"
icon_state = "extinguisher"
anchored = TRUE
density = FALSE
max_integrity = 200
@@ -30,6 +30,7 @@
has_extinguisher = new /obj/item/extinguisher/mini(src)
else
has_extinguisher = new /obj/item/extinguisher(src)
update_icon(UPDATE_ICON_STATE)
/obj/structure/extinguisher_cabinet/examine(mob/user)
. = ..()
@@ -155,16 +156,16 @@
qdel(src)
/obj/structure/extinguisher_cabinet/update_icon_state()
if(!opened)
icon_state = "extinguisher_closed"
return
icon_state = "extinguisher" // Needs to reset the state with every update
if(has_extinguisher)
if(istype(has_extinguisher, /obj/item/extinguisher/mini))
icon_state = "extinguisher_mini"
icon_state += "_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
icon_state += "_full"
if(!opened)
icon_state += "_closed"
/obj/structure/extinguisher_cabinet/empty
extinguishertype = NO_EXTINGUISHER