mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Laughter demons now eject spontaneous revivals (#56095)
Very occasionally, a laughter demon will eat a changeling, or someone with very strong nanites, and then are rendered helpless as someone punches their way out. Instead, now they will be confusingly ejected from the laughter demon's internal hammerspace pocket, where they can than then attempt to make their escape.
This commit is contained in:
@@ -259,6 +259,9 @@
|
||||
if(!M)
|
||||
continue
|
||||
|
||||
// Unregister the signal first, otherwise it'll trigger the "ling revived inside us" code
|
||||
UnregisterSignal(M, COMSIG_MOB_STATCHANGE)
|
||||
|
||||
M.forceMove(T)
|
||||
if(M.revive(full_heal = TRUE, admin_revive = TRUE))
|
||||
M.grab_ghost(force = TRUE)
|
||||
@@ -266,14 +269,27 @@
|
||||
to_chat(M, "<span class='clown'>You leave [src]'s warm embrace, and feel ready to take on the world.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/laughter/bloodcrawl_swallow(mob/living/victim)
|
||||
if(consumed_mobs)
|
||||
// Keep their corpse so rescue is possible
|
||||
consumed_mobs += victim
|
||||
else
|
||||
// Be safe and just eject the corpse
|
||||
victim.forceMove(get_turf(victim))
|
||||
victim.exit_blood_effect()
|
||||
victim.visible_message("<span class='warning'>[victim] falls out of the air, covered in blood, looking highly confused. And dead.</span>")
|
||||
// Keep their corpse so rescue is possible
|
||||
consumed_mobs += victim
|
||||
RegisterSignal(victim, COMSIG_MOB_STATCHANGE, .proc/on_victim_statchange)
|
||||
|
||||
/* Handle signal from a consumed mob changing stat.
|
||||
*
|
||||
* A signal handler for if one of the laughter demon's consumed mobs has
|
||||
* changed stat. If they're no longer dead (because they were dead when
|
||||
* swallowed), eject them so they can't rip their way out from the inside.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/laughter/proc/on_victim_statchange(mob/living/victim, new_stat)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(new_stat == DEAD)
|
||||
return
|
||||
// Someone we've eaten has spontaneously revived; maybe nanites, maybe a changeling
|
||||
victim.forceMove(get_turf(src))
|
||||
victim.exit_blood_effect()
|
||||
victim.visible_message("<span class='warning'>[victim] falls out of the air, covered in blood, with a confused look on their face.</span>")
|
||||
consumed_mobs -= victim
|
||||
UnregisterSignal(victim, COMSIG_MOB_STATCHANGE)
|
||||
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/engine_demon
|
||||
name = "engine demon"
|
||||
|
||||
Reference in New Issue
Block a user