From 312f2bb58c2e4f962baf4972cea5c133831670de Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 27 May 2020 15:11:09 -0400 Subject: [PATCH] Prevent wasting steel on unhealable damage --- .../station/protean_vr/protean_blob.dm | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index 6cc817a6f7..6c33b9c300 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -45,6 +45,9 @@ var/obj/prev_left_hand var/obj/prev_right_hand + var/human_brute = 0 + var/human_burn = 0 + player_msg = "In this form, you can move a little faster, your health will regenerate as long as you have metal in you, and you can ventcrawl!" can_buckle = TRUE //Blobsurfing @@ -113,7 +116,9 @@ //Set the max maxHealth = humanform.getMaxHealth()*2 //HUMANS, and their 'double health', bleh. //Set us to their health, but, human health ignores robolimbs so we do it 'the hard way' - health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - humanform.getActualFireLoss() - humanform.getActualBruteLoss() + human_brute = humanform.getActualBruteLoss() + human_burn = humanform.getActualFireLoss() + health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - human_brute - human_burn //Alive, becoming dead if((stat < DEAD) && (health <= 0)) @@ -151,6 +156,12 @@ healths.icon_state = "health7" // All the damage and such to the blob translates to the human +/mob/living/simple_mob/protean_blob/apply_effect(var/effect = 0, var/effecttype = STUN, var/blocked = 0, var/check_protection = 1) + if(humanform) + return humanform.apply_effect(effect, effecttype, blocked, check_protection) + else + return ..() + /mob/living/simple_mob/protean_blob/adjustBruteLoss(var/amount) if(humanform) return humanform.adjustBruteLoss(amount) @@ -181,6 +192,12 @@ else return ..() +/mob/living/simple_mob/protean_blob/adjustCloneLoss(amount) + if(humanform) + return humanform.adjustCloneLoss(amount) + else + return ..() + /mob/living/simple_mob/protean_blob/emp_act(severity) if(humanform) return humanform.emp_act(severity) @@ -218,9 +235,9 @@ /mob/living/simple_mob/protean_blob/Life() . = ..() if(. && istype(refactory) && humanform) - if(!healing && health < maxHealth && refactory.get_stored_material(DEFAULT_WALL_MATERIAL) >= 100) + if(!healing && (human_brute || human_burn) && refactory.get_stored_material(DEFAULT_WALL_MATERIAL) >= 100) healing = humanform.add_modifier(/datum/modifier/protean/steel, origin = refactory) - else if(healing && health == maxHealth) + else if(healing && !(human_brute || human_burn)) healing.expire() healing = null