mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Fence changes (#11325)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
97e8d3a7a9
commit
31ccf0c92a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user