From d7e2a3ba5e83215570b9844cf121e7d2aec88c6b Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 27 May 2026 22:48:10 -0500 Subject: [PATCH] Plant nutriment is now beneficial to mobs with the `MOB_PLANT` biotype (#96208) --- code/modules/mob/living/blood_types.dm | 2 +- code/modules/reagents/chemistry/reagents/other_reagents.dm | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/blood_types.dm b/code/modules/mob/living/blood_types.dm index 7335bd2204f..6ec859b5d05 100644 --- a/code/modules/mob/living/blood_types.dm +++ b/code/modules/mob/living/blood_types.dm @@ -359,7 +359,7 @@ dna_string = "Plant DNA" color = /datum/reagent/water::color reagent_type = /datum/reagent/water - restoration_chem = null + restoration_chem = /datum/reagent/plantnutriment/eznutriment blood_flags = BLOOD_ADD_DNA | BLOOD_TRANSFER_VIRAL_DATA // Prevents awkward grey wounds on the mob while keeping bleed overlays looking like water leaking from a balloon diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 9d320b03216..996dd4068e0 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1857,12 +1857,15 @@ color = COLOR_BLACK // RBG: 0, 0, 0 taste_description = "plant food" ph = 3 + /// The chance of toxin damage for a mob (heals toxins for MOB_PLANT biotype) var/tox_prob = 0 /datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio) . = ..() + if(SPT_PROB(tox_prob, seconds_per_tick)) - if(affected_mob.adjust_tox_loss(1 * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype)) + var/tox_modifier = (affected_mob.mob_biotypes & MOB_PLANT) ? -1 : 1 + if(affected_mob.adjust_tox_loss(tox_modifier * metabolization_ratio, updating_health = FALSE, required_biotype = affected_biotype)) return UPDATE_MOB_HEALTH /datum/reagent/plantnutriment/eznutriment @@ -1889,7 +1892,6 @@ randomized_spawns = REAGENT_SPAWN_ALL_RANDOM_SPAWNS /datum/reagent/plantnutriment/left4zednutriment/on_hydroponics_apply(obj/machinery/hydroponics/mytray, mob/user) - mytray.adjust_plant_health(round(volume * 0.1)) mytray.myseed?.adjust_instability(round(volume * 0.2))