[MIRROR] You can no longer stand up without legs [MDB IGNORE] (#23066)

* You can no longer stand up without legs (#77572)

## About The Pull Request
Fixes issue #73211 by removing wounds from dismembered limbs after their
owner is removed, rather than before.
## Why It's Good For The Game
Fixes a bug.
## Changelog
🆑
fix: You can no longer stand up without legs.
/🆑

* You can no longer stand up without legs

---------

Co-authored-by: Shroopy <delyth@shroop.net>
This commit is contained in:
SkyratBot
2023-08-13 18:36:41 -04:00
committed by GitHub
co-authored by Shroopy
parent 92d568142f
commit 3a4be7c458
@@ -95,9 +95,6 @@
bodypart_flags &= ~BODYPART_IMPLANTED //limb is out and about, it can't really be considered an implant
owner.remove_bodypart(src)
for(var/datum/wound/wound as anything in wounds)
wound.remove_wound(TRUE)
for(var/datum/scar/scar as anything in scars)
scar.victim = null
LAZYREMOVE(owner.all_scars, scar)
@@ -107,6 +104,9 @@
var/mob/living/carbon/phantom_owner = set_owner(null) // so we can still refer to the guy who lost their limb after said limb forgets 'em
for(var/datum/wound/wound as anything in wounds)
wound.remove_wound(TRUE)
for(var/datum/surgery/surgery as anything in phantom_owner.surgeries) //if we had an ongoing surgery on that limb, we stop it.
if(surgery.operated_bodypart == src)
phantom_owner.surgeries -= surgery