mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #9727 from VOREStation/upstream-merge-7844
[MIRROR] Makes wrenches only anchor lockers if they're open
This commit is contained in:
committed by
Chompstation Bot
parent
e7ca4001ac
commit
ad8b82ce05
@@ -260,7 +260,20 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(opened)
|
if(W.is_wrench())
|
||||||
|
if(opened)
|
||||||
|
if(anchored)
|
||||||
|
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||||
|
else
|
||||||
|
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||||
|
if(do_after(user, 20 * W.toolspeed))
|
||||||
|
if(!src) return
|
||||||
|
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
||||||
|
anchored = !anchored
|
||||||
|
return
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>You can't reach the anchoring bolts when the door is closed!</span>")
|
||||||
|
else if(opened)
|
||||||
if(istype(W, /obj/item/weapon/grab))
|
if(istype(W, /obj/item/weapon/grab))
|
||||||
var/obj/item/weapon/grab/G = W
|
var/obj/item/weapon/grab/G = W
|
||||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||||
@@ -316,17 +329,6 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
M.show_message("<span class='warning'>[src] has been [sealed?"sealed":"unsealed"] by [user.name].</span>", 3)
|
M.show_message("<span class='warning'>[src] has been [sealed?"sealed":"unsealed"] by [user.name].</span>", 3)
|
||||||
else if(W.is_wrench())
|
|
||||||
if(sealed)
|
|
||||||
if(anchored)
|
|
||||||
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
|
||||||
else
|
|
||||||
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
|
||||||
playsound(src, W.usesound, 50)
|
|
||||||
if(do_after(user, 20 * W.toolspeed))
|
|
||||||
if(!src) return
|
|
||||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
|
||||||
anchored = !anchored
|
|
||||||
else
|
else
|
||||||
attack_hand(user)
|
attack_hand(user)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -54,7 +54,20 @@
|
|||||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||||
|
|
||||||
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(opened)
|
if(W.is_wrench())
|
||||||
|
if(opened)
|
||||||
|
if(anchored)
|
||||||
|
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||||
|
else
|
||||||
|
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||||
|
if(do_after(user, 20 * W.toolspeed))
|
||||||
|
if(!src) return
|
||||||
|
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
||||||
|
anchored = !anchored
|
||||||
|
return
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>You can't reach the anchoring bolts when the door is closed!</span>")
|
||||||
|
else if(opened)
|
||||||
if(istype(W, /obj/item/weapon/storage/laundry_basket))
|
if(istype(W, /obj/item/weapon/storage/laundry_basket))
|
||||||
return ..(W,user)
|
return ..(W,user)
|
||||||
if(istype(W, /obj/item/weapon/grab))
|
if(istype(W, /obj/item/weapon/grab))
|
||||||
@@ -77,17 +90,6 @@
|
|||||||
spark_system.start()
|
spark_system.start()
|
||||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||||
playsound(src, "sparks", 50, 1)
|
playsound(src, "sparks", 50, 1)
|
||||||
else if(W.is_wrench())
|
|
||||||
if(sealed)
|
|
||||||
if(anchored)
|
|
||||||
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
|
||||||
else
|
|
||||||
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
|
||||||
if(do_after(user, 20 * W.toolspeed))
|
|
||||||
if(!src) return
|
|
||||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
|
||||||
anchored = !anchored
|
|
||||||
return
|
|
||||||
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
|
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
|
||||||
return ..(W,user)
|
return ..(W,user)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user