Breaking out of lockers now has a progress bar + breaking out of lockers now visibly shakes the locker and makes noise (#33180)

* closets

* Update __compile_options.dm

* fix

* fixes

* 2
This commit is contained in:
gurfan
2022-09-01 21:34:18 -05:00
committed by GitHub
parent 8b951338ec
commit ff5b9d7a08
2 changed files with 15 additions and 22 deletions

View File

@@ -1024,7 +1024,7 @@ Thanks.
L.visible_message("<span class='danger'>The [C] begins to shake violenty!</span>",
"<span class='warning'>You lean on the back of [C] and start pushing the door open (this will take about [breakout_time] minutes).</span>")
spawn(0)
if(do_after(usr,src,breakout_time * 60 * 10)) //minutes * 60seconds * 10deciseconds
if(do_after(usr, C, breakout_time * 60 * 10, 30, custom_checks = new /callback(C, /obj/structure/closet/proc/on_do_after))) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return