mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 21:49:11 +01:00
Update lockpicks (#17172)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user