From b70dff2b0f2d81d4a6a3ae1157ebdce7aa2e59ac Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Tue, 2 Feb 2016 18:48:05 -0800 Subject: [PATCH] Makes stump regrowth redistribute the damage --- .../mob/living/carbon/human/species/station.dm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index c1a92a1d6d1..9248300b180 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -466,19 +466,30 @@ src << "You're too hungry to regenerate a limb!" return - var/O = organs_by_name[chosen_limb] + var/obj/item/organ/external/O = organs_by_name[chosen_limb] - if(istype(O, /obj/item/organ/external) && !istype(O, /obj/item/organ/external/stump)) + if(istype(O) && !O.isStump()) src << "Your limb has already been replaced in some way!" return - if(istype(O, /obj/item/organ/external/stump)) + var/stored_brute = 0 + var/stored_burn = 0 + if(O.isStump()) + src << "You distribute the damaged tissue around your body, out of the way of your new pseudopod!" + var/obj/item/organ/external/doomedStump = O + stored_brute = doomedStump.brute_dam + stored_burn = doomedStump.burn_dam + if(stored_burn) + // I'm both lazy and want to give this ability a drawback. + src << "Moving the burnt tissue aside causes further damage to your membrane!" qdel(O) var/limb_list = species.has_limbs[chosen_limb] var/limb_path = limb_list["path"] var/obj/item/organ/external/new_limb = new limb_path(src) new_limb.owner = src // This line is probably unneeded but will shut up the compiler + adjustBruteLoss(stored_brute) + adjustFireLoss(stored_burn) update_body() updatehealth() UpdateDamageIcon()