fence fixes (#18167)

This commit is contained in:
Will
2025-08-05 11:05:50 -04:00
committed by GitHub
parent 29fe08b4b1
commit 221bc2f2da
+27
View File
@@ -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)