From 21078951dd7662bcf3490dcb3723b59385f82f8d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 8 Dec 2023 02:41:49 +0100 Subject: [PATCH] [MIRROR] No longer stuck inside legion when you revive [MDB IGNORE] (#25487) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * No longer stuck inside legion when you revive (#80112) ## About The Pull Request Since legions applied stasis, upon reviving you could not escape without last resort. This fixes that. side fix of calling gib ensuring the gibs get spawned ## Why It's Good For The Game fixes #80111 being permantly imprissoned inside a legion is not that fun ## Changelog :cl: fix: Being revived inside a legion now sets you free fix: in some rare cases gib() did infact not spawn gib /🆑 * No longer stuck inside legion when you revive --------- Co-authored-by: Autisem <36102060+Autisem@users.noreply.github.com> --- code/modules/mob/living/basic/lavaland/legion/legion.dm | 7 +++++++ code/modules/mob/living/death.dm | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/basic/lavaland/legion/legion.dm b/code/modules/mob/living/basic/lavaland/legion/legion.dm index b64c3b257a0..080f397226e 100644 --- a/code/modules/mob/living/basic/lavaland/legion/legion.dm +++ b/code/modules/mob/living/basic/lavaland/legion/legion.dm @@ -52,6 +52,7 @@ . = ..() if (gone != stored_mob) return + UnregisterSignal(stored_mob, COMSIG_LIVING_REVIVE) ai_controller.clear_blackboard_key(BB_LEGION_CORPSE) stored_mob.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_LEGION_EATEN) stored_mob.add_mood_event(MOOD_CATEGORY_LEGION_CORE, /datum/mood_event/healsbadman/long_term) // This will still probably mostly be gone before you are alive @@ -72,6 +73,7 @@ consumed.extinguish_mob() consumed.fully_heal(HEAL_DAMAGE) consumed.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_LEGION_EATEN) + RegisterSignal(consumed, COMSIG_LIVING_REVIVE, PROC_REF(on_consumed_revive)) consumed.forceMove(src) ai_controller?.set_blackboard_key(BB_LEGION_CORPSE, consumed) ai_controller?.set_blackboard_key(BB_LEGION_RECENT_LINES, consumed.copy_recent_speech(line_chance = 80)) @@ -84,6 +86,11 @@ cancer.Insert(consumed, special = TRUE, drop_if_replaced = FALSE) /// A Legion which only drops skeletons instead of corpses which might have fun loot, so it cannot be farmed + +/mob/living/basic/mining/legion/proc/on_consumed_revive(full_heal_flags) + SIGNAL_HANDLER + gib() + /mob/living/basic/mining/legion/spawner_made corpse_type = /obj/effect/mob_spawn/corpse/human/legioninfested/skeleton/charred diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 6174a5793bc..c4ad9aab656 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -10,19 +10,20 @@ **/ /mob/living/proc/gib(drop_bitflags=NONE) var/prev_lying = lying_angle - if(stat != DEAD) - death(TRUE) + spawn_gibs(drop_bitflags) if(!prev_lying) gib_animation() + if(stat != DEAD) + death(TRUE) + ghostize() spill_organs(drop_bitflags) if(drop_bitflags & DROP_BODYPARTS) spread_bodyparts(drop_bitflags) - spawn_gibs(drop_bitflags) SEND_SIGNAL(src, COMSIG_LIVING_GIBBED, drop_bitflags) qdel(src)