mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[MIRROR] New extinguisher cabinet sprites [MDB IGNORE] (#20871)
* New extinguisher cabinet sprites * skyrat edit --------- Co-authored-by: Andrew <mt.forspam@gmail.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
co-authored by
Andrew
lessthanthree
parent
cd185300a4
commit
0462ae96da
@@ -20,6 +20,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
icon_state = "extinguisher_empty_open" //SKYRAT EDIT CHANGE - AESTHETICS
|
||||
else
|
||||
stored_extinguisher = new /obj/item/extinguisher(src)
|
||||
update_appearance(UPDATE_ICON)
|
||||
register_context()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
@@ -64,7 +65,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
|
||||
if(A == stored_extinguisher)
|
||||
stored_extinguisher = null
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/used_item, mob/living/user, params)
|
||||
if(used_item.tool_behaviour == TOOL_WRENCH && !stored_extinguisher)
|
||||
@@ -84,7 +85,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
return
|
||||
stored_extinguisher = used_item
|
||||
user.balloon_alert(user, "extinguisher stored")
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
return TRUE
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
@@ -107,7 +108,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
if(!opened)
|
||||
opened = 1
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
|
||||
@@ -125,7 +126,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
stored_extinguisher = null
|
||||
opened = TRUE
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
return
|
||||
toggle_cabinet(user)
|
||||
|
||||
@@ -139,20 +140,26 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/* SKYRAT EDIT REMOVAL BEGIN - AESTHETICS - MOVED TO MODULAR.
|
||||
/obj/structure/extinguisher_cabinet/update_icon_state()
|
||||
icon_state = "extinguisher"
|
||||
|
||||
if(isnull(stored_extinguisher))
|
||||
icon_state += ""
|
||||
else if(istype(stored_extinguisher, /obj/item/extinguisher/mini))
|
||||
icon_state += "_mini"
|
||||
else if(istype(stored_extinguisher, /obj/item/extinguisher/advanced))
|
||||
icon_state += "_advanced"
|
||||
else if(istype(stored_extinguisher, /obj/item/extinguisher/crafted))
|
||||
icon_state += "_crafted"
|
||||
else if(istype(stored_extinguisher, /obj/item/extinguisher))
|
||||
icon_state += "_default"
|
||||
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
return ..()
|
||||
if(!stored_extinguisher)
|
||||
icon_state = "extinguisher_empty"
|
||||
return ..()
|
||||
if(istype(stored_extinguisher, /obj/item/extinguisher/mini))
|
||||
icon_state = "extinguisher_mini"
|
||||
return ..()
|
||||
icon_state = "extinguisher_full"
|
||||
icon_state += "_closed"
|
||||
|
||||
return ..()
|
||||
*/
|
||||
|
||||
@@ -164,7 +171,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
if(stored_extinguisher)
|
||||
stored_extinguisher.forceMove(loc)
|
||||
stored_extinguisher = null
|
||||
update_appearance()
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 5.6 KiB |
Reference in New Issue
Block a user