mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Merge branch 'medmech' of https://github.com/fleure/-tg-station into medmech
Conflicts: code/game/objects/structures/crates_lockers/closets.dm
This commit is contained in:
@@ -462,37 +462,11 @@
|
||||
else
|
||||
L.buckled.manual_unbuckle(L)
|
||||
|
||||
//Breaking out of a locker?
|
||||
else if(loc && istype(loc, /obj/structure/closet))
|
||||
var/obj/structure/closet/C = L.loc
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(istype(L.loc, /obj/structure/closet/critter) && !C.welded)
|
||||
breakout_time = 0.75 //45 seconds if it's an unwelded critter crate
|
||||
|
||||
if(C.opened || (!C.welded && !C.locked))
|
||||
return //Door's open, not locked or welded, no point in resisting.
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
usr.next_move = world.time + 100
|
||||
L.last_special = world.time + 100
|
||||
L << "<span class='notice'>You lean on the back of [C] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
|
||||
for(var/mob/O in viewers(C))
|
||||
O << "<span class='warning'>[C] begins to shake violently!</span>"
|
||||
|
||||
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened || (!C.locked && !C.welded))
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
|
||||
C.welded = 0 //applies to all lockers lockers
|
||||
C.locked = 0 //applies to critter crates and secure lockers only
|
||||
C.broken = 1 //applies to secure lockers only
|
||||
L.visible_message("<span class='danger'>[L] successfully broke out of [C]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [C]!</span>")
|
||||
if(istype(C.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
var/obj/structure/bigDelivery/BD = C.loc
|
||||
BD.attack_hand(usr)
|
||||
C.open()
|
||||
//Breaking out of a container (Locker, sleeper, cryo...)
|
||||
else if(loc && istype(loc, /obj) && !isturf(loc))
|
||||
if(L.stat == CONSCIOUS && !L.stunned && !L.weakened && !L.paralysis)
|
||||
var/obj/C = loc
|
||||
C.container_resist(L)
|
||||
|
||||
//Stop drop and roll & Handcuffs
|
||||
else if(iscarbon(L))
|
||||
|
||||
Reference in New Issue
Block a user