From 45bb5241f06cacfdef2e9a49287e1427ba0550a3 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 15 Oct 2019 19:22:42 -0400 Subject: [PATCH] Training Wheels Come Off (#12587) --- code/datums/status_effects/buffs.dm | 11 ++++++++++- code/game/gamemodes/vampire/vampire_powers.dm | 4 ++-- code/modules/mining/equipment/survival_pod.dm | 11 ++--------- .../mob/living/carbon/human/species/skeleton.dm | 7 +------ code/modules/mob/living/living.dm | 10 ++++++++++ code/modules/projectiles/guns/medbeam.dm | 4 +--- code/modules/reagents/chemistry/reagents/admin.dm | 3 +-- code/modules/surgery/bones.dm | 7 ++----- code/modules/surgery/organs/organ_external.dm | 13 +++++++++---- 9 files changed, 38 insertions(+), 32 deletions(-) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 378ee0eb676..26f2da6a78f 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -113,7 +113,16 @@ /datum/status_effect/regenerative_core/on_apply() owner.status_flags |= IGNORESLOWDOWN - owner.revive() + owner.adjustBruteLoss(-25) + owner.adjustFireLoss(-25) + owner.remove_CC() + owner.bodytemperature = BODYTEMP_NORMAL + if(ishuman(owner)) + var/mob/living/carbon/human/H = owner + for(var/thing in H.bodyparts) + var/obj/item/organ/external/E = thing + E.internal_bleeding = FALSE + E.mend_fracture() return TRUE /datum/status_effect/regenerative_core/on_remove() diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 7db238533be..9c6d941bb3f 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -579,8 +579,8 @@ adjustFireLoss(-60) for(var/obj/item/organ/external/E in bodyparts) if(prob(25)) - if(E.mend_fracture()) - E.perma_injury = 0 + E.mend_fracture() + return if(stat != DEAD) if(weakened) diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index b06a90d23e2..ea76ad423e2 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -165,15 +165,8 @@ desc = "Wall-mounted Medical Equipment dispenser. This one seems just a tiny bit smaller." req_access = list() - products = list(/obj/item/reagent_containers/food/pill/patch/styptic = 5, - /obj/item/reagent_containers/food/pill/patch/silver_sulf = 5, - /obj/item/reagent_containers/food/pill/charcoal = 2, - /obj/item/stack/medical/bruise_pack/advanced = 1, - /obj/item/stack/medical/ointment/advanced = 1, - /obj/item/reagent_containers/hypospray/autoinjector = 2, - /obj/item/stack/medical/splint = 1) - contraband = list(/obj/item/reagent_containers/food/pill/tox = 2, - /obj/item/reagent_containers/food/pill/morphine = 2) + products = list(/obj/item/stack/medical/splint = 2) + contraband = list() //Computer /obj/item/gps/computer diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index af779483666..f5085742ccb 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -48,12 +48,7 @@ var/list/our_organs = H.bodyparts.Copy() shuffle(our_organs) for(var/obj/item/organ/external/L in our_organs) - if(istype(L)) - if(L.brute_dam < L.min_broken_damage) - L.status &= ~ORGAN_BROKEN - L.status &= ~ORGAN_SPLINTED - H.handle_splints() - L.perma_injury = 0 + if(L.mend_fracture()) break // We're only checking one limb here, bucko if(prob(3)) H.say(pick("Thanks Mr. Skeltal", "Thank for strong bones", "Doot doot!")) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3aa8790cfce..ba822c9cc5e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -474,6 +474,16 @@ human_mob.update_dna() return +/mob/living/proc/remove_CC(should_update_canmove = TRUE) + SetWeakened(0, FALSE) + SetStunned(0, FALSE) + SetParalysis(0, FALSE) + SetSleeping(0, FALSE) + setStaminaLoss(0) + SetSlowed(0) + if(should_update_canmove) + update_canmove() + /mob/living/proc/UpdateDamageIcon() return diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index 618315bea6e..501a7b63670 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -109,9 +109,7 @@ var/var/mob/living/carbon/human/H = target for(var/obj/item/organ/external/E in H.bodyparts) if(prob(10)) - if(E.mend_fracture()) - E.perma_injury = 0 - return + E.mend_fracture() /obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target) return diff --git a/code/modules/reagents/chemistry/reagents/admin.dm b/code/modules/reagents/chemistry/reagents/admin.dm index c238c63a8ff..a7a8098aa49 100644 --- a/code/modules/reagents/chemistry/reagents/admin.dm +++ b/code/modules/reagents/chemistry/reagents/admin.dm @@ -22,8 +22,7 @@ var/obj/item/organ/internal/I = thing I.receive_damage(-5, FALSE) for(var/obj/item/organ/external/E in H.bodyparts) - if(E.mend_fracture()) - E.perma_injury = 0 + E.mend_fracture() M.SetEyeBlind(0, FALSE) M.CureNearsighted(FALSE) M.CureBlind(FALSE) diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index f4fbe753972..533314d715f 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -165,11 +165,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \ " You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." ) - affected.status &= ~ORGAN_BROKEN - affected.status &= ~ORGAN_SPLINTED - affected.perma_injury = 0 - target.handle_splints() - return 1 + affected.mend_fracture() + return TRUE /datum/surgery_step/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index d55d9753fa9..2c891632770 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -625,12 +625,17 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/proc/mend_fracture() if(is_robotic()) - return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs - if(brute_dam > min_broken_damage) - return 0 //will just immediately fracture again + return FALSE //ORGAN_BROKEN doesn't have the same meaning for robot limbs + + if(!(status & ORGAN_BROKEN)) + return FALSE status &= ~ORGAN_BROKEN - return 1 + status &= ~ORGAN_SPLINTED + perma_injury = 0 + if(owner) + owner.handle_splints() + return TRUE /obj/item/organ/external/robotize(company, make_tough = 0, convert_all = 1) ..()