Files
VOREStation/code/game/objects/structures/extinguisher.dm
T
Cameron Lennox c42610c5ae Have you bingled that (#17407)
* Initial wiki system

* wiki organization and spoilers

* hide belly chems

* move ads to tgui

* add search

* .

* load screen

* error screen

* 8

* center

* .

* .

* make this more realistic

* tgui errro col

* move search to top

* .

* non NT theme

* logo to common

* base custom theme

* .

* wip refactor

* almost halfway

* reworked wiki data

* easy fix

* get data fix

* Material Page in tgui

* catch null supply points

* .

* forward crash

* reset pages

* .

* canvas prep

* fix icon stacking

* .

* colored outlined images

* fix sm datum

* fix material names

* subType prep

* only on crash

* fix null crash

* .

* fix solgov

* clean hiding

* .

* implement catalog page

* .

* particle smasher page

* I'm lazy

* unfuck some sins

* ore page

* botany page

* allergen list

* allergen returns null too

* slime injection var

* slime core data

* fixed warning

* wip

* proper data list for chems

* pass is_slime as null

* chems

* split that

* .

* .

* .

* .

* donation for bingle, some cleanup

* return types

* partially colord icons for chemistry

* .

* more sillies

* donation page

* thaler

* needs some variation

* .

* this will crash until implemented

* handle it

* fix that

* dismiss donation banner button

* .

* fix that

* donating procs

* donation stuff for comp

* -

* drink glass for drinks

* illegal iconstate pass

* fixes

* .

* nuke drink fix

* .

* .

* .

* Drink reagent fix

* more cleanup

* adjust

* .

* simple food

* .

* food list

* sending nulls, removed flavor from recipes

* .

* .

* get_donation_current added

* .

* missing key

* .

* duped recipes fixed

* .

* .

* wiki food reagent recipes

* double list add

* properly forbid remaining bad reagent

* hide this too

* stacky

* enable eslint const

* fix typing

* update that

* use proper donation proc

* printing fixes

* grinding

* .

* beaker fill volume

* plant ore and mat grinding results

* duped recipes fixed, unit test tweak

* yes this is terrible

* .

* .

* .

* chem analyzer tgui mode, some subsystem changes to support it

* redoce

* .

* ,

* .

* small fixes, missing reagent volume

* push

* sort

* catalog entries unlocked by explo

* new chem stuff

* .

* fix byond code

* fix scroll tracking

* comment

* alphabetical

* also this

* .

* fallback icon

* .

* ...

* rel path

* that too

* to defines

* organ to define

* .

* .

* .

---------

Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-03-28 19:00:50 +01:00

95 lines
2.8 KiB
Plaintext

/obj/structure/extinguisher_cabinet
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon = 'icons/obj/closet.dmi'
icon_state = "extinguisher" // map preview sprite
layer = ABOVE_WINDOW_LAYER
anchored = TRUE
density = FALSE
var/obj/item/extinguisher/has_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/Initialize(mapload, var/dir, var/building = 0)
. = ..()
if(building)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
else
has_extinguisher = new/obj/item/extinguisher(src)
update_icon()
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user))
return
if(istype(O, /obj/item/extinguisher))
if(!has_extinguisher && opened)
user.remove_from_mob(O)
contents += O
has_extinguisher = O
to_chat(user, span_notice("You place [O] in [src]."))
else
opened = !opened
if(O.has_tool_quality(TOOL_WRENCH))
if(!has_extinguisher)
to_chat(user, span_notice("You start to unwrench the extinguisher cabinet."))
playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
to_chat(user, span_notice("You unwrench the extinguisher cabinet."))
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
return
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
if (user.hand)
temp = H.organs_by_name[BP_L_HAND]
if(temp && !temp.is_usable())
to_chat(user, span_notice("You try to move your [temp.name], but cannot!"))
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
to_chat(user, span_notice("You take [has_extinguisher] from [src]."))
has_extinguisher = null
opened = 1
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(has_extinguisher)
has_extinguisher.loc = loc
to_chat(user, span_notice("You telekinetically remove [has_extinguisher] from [src]."))
has_extinguisher = null
opened = 1
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/update_icon()
var/suffix = "empty"
if(has_extinguisher)
if(istype(has_extinguisher, /obj/item/extinguisher/mini))
suffix = "mini"
if(istype(has_extinguisher, /obj/item/extinguisher/atmo))
suffix = "advanced"
else
suffix = "standard"
icon_state = "[initial(icon_state)][opened ? "" : "_closed"]_[suffix]"
/obj/structure/extinguisher_cabinet/old
name = "extinguisher cabinet"
desc = "A classic small wall mounted cabinet designed to hold a fire extinguisher."
icon = 'icons/obj/closet.dmi'
icon_state = "oldextinguisher" // map preview sprite