mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Extinguisher cabinet resprite (#23003)
* lets put out this fire * lets paint it red * adjusting the code * Extinguisher cabinet resprite
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user