Update lockpicks (#17172)

This commit is contained in:
Killian
2025-02-20 00:57:29 -05:00
committed by GitHub
parent 972610781d
commit 188cf82c8a
4 changed files with 42 additions and 0 deletions
+18
View File
@@ -1,4 +1,5 @@
//For bypassing locked /obj/structure/simple_doors
//now with added fence gate support
/obj/item/lockpick
name = "set of lockpicks"
@@ -30,6 +31,23 @@
if(do_after(user, pick_time * D.lock_difficulty))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
if(istype(A, /obj/structure/fence/door))
var/obj/structure/fence/door/D = A
if(!D.locked) //you can pick your nose, but you can't pick an unlocked door
to_chat(user, span_notice("\The [D] isn't locked."))
return
else if(D.lock_type != pick_type) //make sure our types match
to_chat(user, span_warning("\The [src] can't pick \the [D]. Another tool might work?"))
return
else if(!D.can_pick) //make sure we're actually allowed to bypass it at all
to_chat(user, span_warning("\The [D] can't be [pick_verb]ed."))
return
else //finally, we can assume that they do match
to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]..."))
playsound(src, D.keysound,100, 1)
if(do_after(user, pick_time * D.lock_difficulty))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
var/mob/living/carbon/human/H = A
if(user.zone_sel.selecting == BP_HEAD)