Fixes Defib mount cloning (#7520)

This commit is contained in:
Poojawa
2018-08-31 14:13:23 -05:00
committed by kevinz000
parent 42c39d8908
commit 160f981fcc
+5 -2
View File
@@ -59,10 +59,10 @@
if(!defib)
to_chat(user, "<span class='warning'>There's no defibrillator unit loaded!</span>")
return
if(defib.on)
if(defib.paddles.loc != defib)
to_chat(user, "<span class='warning'>[defib.paddles.loc == user ? "You are already" : "Someone else is"] holding [defib]'s paddles!</span>")
return
defib.attack_hand(user)
user.put_in_hands(defib.paddles)
/obj/machinery/defibrillator_mount/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/defibrillator))
@@ -78,6 +78,9 @@
defib = I
update_icon()
return
else if(I == defib.paddles)
defib.paddles.snap_back()
return
var/obj/item/card/id = I.GetID()
if(id)
if(check_access(id) || GLOB.security_level >= SEC_LEVEL_RED) //anyone can toggle the clamps in red alert!