Skip to content

Commit

Permalink
[MIRROR] No longer stuck inside legion when you revive [MDB IGNORE] (…
Browse files Browse the repository at this point in the history
…#25487)

* 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 <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Dec 8, 2023
1 parent 0430061 commit 2107895
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions code/modules/mob/living/basic/lavaland/legion/legion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand All @@ -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

Expand Down
7 changes: 4 additions & 3 deletions code/modules/mob/living/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2107895

Please sign in to comment.