mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
Fixed fire alarm in virology #3875 Fixed random pixel on glasses #3872 Fixed welder issue #3888. Plus explored further issue with welder, fixing it. Small logic optimization. Fixed firelocker icon not being updated with welded overlay, even so they have been welded Welding interaction with closets was reworked, almost all secure closets except for detective's, barternder's now work with welding same way as closets/crates. Coffins, and wooden closets of any kind can no longer be welded shut. Clean up of some code using src as reference, and :
32 lines
810 B
Plaintext
32 lines
810 B
Plaintext
/obj/structure/closet/coffin
|
|
name = "coffin"
|
|
desc = "It's a burial receptacle for the dearly departed."
|
|
icon_state = "coffin"
|
|
icon_closed = "coffin"
|
|
icon_opened = "coffin_open"
|
|
|
|
/obj/structure/closet/coffin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(opened)
|
|
if(istype(W, /obj/item/weapon/grab))
|
|
var/obj/item/weapon/grab/G = W
|
|
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
|
return 0
|
|
if(istype(W,/obj/item/tk_grab))
|
|
return 0
|
|
if(!dropsafety(W))
|
|
return
|
|
user.drop_item()
|
|
if(W)
|
|
W.forceMove(loc)
|
|
else if(istype(W, /obj/item/weapon/packageWrap))
|
|
return
|
|
else
|
|
attack_hand(user)
|
|
return
|
|
|
|
/obj/structure/closet/coffin/update_icon()
|
|
if(!opened)
|
|
icon_state = icon_closed
|
|
else
|
|
icon_state = icon_opened
|