Merge pull request #7843 from ShadowLarkens/screenalerts

Ported /tg/ style screen alerts, replacing the hunger icon with them
This commit is contained in:
Aronai Sieyes
2020-05-14 09:52:06 -04:00
committed by GitHub
54 changed files with 970 additions and 683 deletions

View File

@@ -73,6 +73,7 @@
//VOREStation Add End
post_buckle_mob(M)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
return TRUE
/atom/movable/proc/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
@@ -88,6 +89,7 @@
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob.update_floating( buckled_mob.Check_Dense_Object() )
buckled_mob.clear_alert("buckled")
// buckled_mob = null
buckled_mobs -= buckled_mob

View File

@@ -386,11 +386,9 @@
// This proc is used so that we can return out of the revive process while ensuring that busy and update_icon() are handled
/obj/item/weapon/shockpaddles/proc/do_revive(mob/living/carbon/human/H, mob/user)
if(!H.client && !H.teleop)
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == H.mind)
ghost.notify_revive("Someone is trying to resuscitate you. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg')
break
var/mob/observer/dead/ghost = H.get_ghost()
if(ghost)
ghost.notify_revive("Someone is trying to resuscitate you. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = src)
//beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='warning'>\The [user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")

View File

@@ -98,7 +98,7 @@
user.drop_from_inventory(cuffs)
cuffs.loc = target
target.handcuffed = cuffs
target.update_inv_handcuffed()
target.update_handcuffed()
target.drop_r_hand()
target.drop_l_hand()
target.stop_pulling()

View File

@@ -27,7 +27,7 @@
source.handcuffed = null
if(source.buckled && source.buckled.buckle_require_restraints)
source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
source.update_handcuffed()
if (source.client)
source.client.screen -= W
if (W)

View File

@@ -37,7 +37,7 @@
C.handcuffed = null
if(C.buckled && C.buckled.buckle_require_restraints)
C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
C.update_handcuffed()
return
else
..()

View File

@@ -199,4 +199,7 @@
// Test for if stepping on a tile containing this obj is safe to do, used for things like landmines and cliffs.
/obj/proc/is_safe_to_step(mob/living/L)
return TRUE
return TRUE
/obj/proc/container_resist(var/mob/living)
return

View File

@@ -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