mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Merge pull request #7843 from ShadowLarkens/screenalerts
Ported /tg/ style screen alerts, replacing the hunger icon with them
This commit is contained in:
@@ -403,8 +403,7 @@
|
||||
return 0 //closed but not sealed...
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/mob_breakout(var/mob/living/escapee)
|
||||
|
||||
/obj/structure/closet/container_resist(var/mob/living/escapee)
|
||||
if(breakout || !req_breakout())
|
||||
return
|
||||
|
||||
@@ -415,30 +414,31 @@
|
||||
|
||||
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
|
||||
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.incapacitated() || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
spawn(0)
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.incapacitated() || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
animate_shake()
|
||||
add_fingerprint(escapee)
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
|
||||
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
add_fingerprint(escapee)
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
|
||||
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
|
||||
/obj/structure/closet/proc/break_open()
|
||||
sealed = 0
|
||||
|
||||
Reference in New Issue
Block a user