mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +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:
@@ -296,3 +296,30 @@
|
||||
if(AM.loc == src) return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/container_resist()
|
||||
var/mob/living/user = usr
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(istype(user.loc, /obj/structure/closet/critter) && !welded)
|
||||
breakout_time = 0.75 //45 seconds if it's an unwelded critter crate
|
||||
|
||||
if(opened || (!welded && !locked))
|
||||
return //Door's open, not locked or welded, no point in resisting.
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.next_move = world.time + 100
|
||||
user.last_special = world.time + 100
|
||||
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
|
||||
for(var/mob/O in viewers(src))
|
||||
O << "<span class='warning'>[src] begins to shake violently!</span>"
|
||||
|
||||
if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded))
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
|
||||
welded = 0 //applies to all lockers lockers
|
||||
locked = 0 //applies to critter crates and secure lockers only
|
||||
broken = 1 //applies to secure lockers only
|
||||
visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>")
|
||||
user << "<span class='notice'>You successfully break out of [src]!</span>"
|
||||
open()
|
||||
@@ -147,4 +147,7 @@
|
||||
user.dust()
|
||||
dump_contents()
|
||||
visible_message("\red [src] shatters!. ")
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
/obj/structure/closet/statue/container_resist()
|
||||
return
|
||||
|
||||
@@ -101,9 +101,7 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
/obj/structure/morgue/container_resist()
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, EAST)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
@@ -271,9 +269,7 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/relaymove(mob/user as mob)
|
||||
if (user.stat || locked)
|
||||
return
|
||||
/obj/structure/crematorium/container_resist()
|
||||
src.connected = new /obj/structure/c_tray( src.loc )
|
||||
step(src.connected, SOUTH)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
|
||||
Reference in New Issue
Block a user