mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Plant nutriment is now beneficial to mobs with the MOB_PLANT biotype (#96208)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user