From 221bc2f2da8494de0aee0e13832db5faebb77e8e Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:05:50 -0400 Subject: [PATCH] fence fixes (#18167) --- code/game/objects/structures/fence.dm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 8b2fc19ad1..c7ea2a0303 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -180,10 +180,37 @@ locked = !locked playsound(src, keysound,100, 1) return + + else if(istype(W,/obj/item/lockpick)) + var/obj/item/lockpick/L = W + if(!locked) + to_chat(user, span_notice("\The [src] isn't locked.")) + return + else if(lock_type != L.pick_type) //make sure our types match + to_chat(user, span_warning("\The [L] can't pick \the [src]. Another tool might work?")) + return + else if(!can_pick) + to_chat(user, span_warning("\The [src] can't be [L.pick_verb]ed.")) + return + else + to_chat(user, span_notice("You start to [L.pick_verb] the lock on \the [src]...")) + playsound(src, keysound,100, 1) + if(do_after(user, L.pick_time * lock_difficulty)) + to_chat(user, span_notice("Success!")) + locked = FALSE + return + else attack_hand(user) return +/obj/structure/fence/door/attack_ai(mob/user as mob) + if(isAI(user)) //so the AI can't open it + return + else if(isrobot(user)) //but cyborgs can + if(get_dist(user,src) <= 1) //not remotely though + return attack_hand(user) + /obj/structure/fence/door/proc/toggle(mob/user) switch(open) if(FALSE)