diff --git a/code/modules/hydroponics/grown/ambrosia.dm b/code/modules/hydroponics/grown/ambrosia.dm
index 45a10f65f4..51b8f3c43e 100644
--- a/code/modules/hydroponics/grown/ambrosia.dm
+++ b/code/modules/hydroponics/grown/ambrosia.dm
@@ -39,7 +39,7 @@
species = "ambrosiadeus"
plantname = "Ambrosia Deus"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus
- mutatelist = list()
+ mutatelist = list(/obj/item/seeds/ambrosia/gaia)
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
rarity = 40
@@ -59,7 +59,7 @@
species = "ambrosia_gaia"
plantname = "Ambrosia Gaia"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia
- mutatelist = list()
+ mutatelist = list(/obj/item/seeds/ambrosia/deus)
reagents_add = list("earthsblood" = 0.05, "nutriment" = 0.06, "vitamin" = 0.05)
rarity = 30 //These are some pretty good plants right here
genes = list()
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index b26a911b3a..317b954c91 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -27,6 +27,8 @@
var/unwrenchable = 1
var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpollinate one plant
var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses
+ var/self_sufficiency_req = 20 //Required total dose to make a self-sufficient hydro tray. 1:1 with earthsblood.
+ var/self_sufficiency_progress = 0
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
@@ -329,6 +331,9 @@
if(!self_sustaining)
to_chat(user, "Water: [waterlevel]/[maxwater]")
to_chat(user, "Nutrient: [nutrilevel]/[maxnutri]")
+ if(self_sufficiency_progress > 0)
+ var/percent_progress = round(self_sufficiency_progress * 100 / self_sufficiency_req)
+ to_chat(user, "Treatment for self-sustenance are [percent_progress]% complete.")
else
to_chat(user, "It doesn't require any water or nutrients.")
@@ -504,6 +509,14 @@
yieldmod = 1.3
mutmod = 0
adjustNutri(round(S.get_reagent_amount("robustharvestnutriment") *1 ))
+
+ // Ambrosia Gaia produces earthsblood.
+ if(S.has_reagent("earthsblood"))
+ self_sufficiency_progress += S.get_reagent_amount("earthsblood")
+ if(self_sufficiency_progress >= self_sufficiency_req)
+ become_self_sufficient()
+ else if(!self_sustaining)
+ to_chat(user, "[src] warms as it might on a spring day under a genuine Sun.")
// Antitoxin binds shit pretty well. So the tox goes significantly down
if(S.has_reagent("charcoal", 1))
@@ -675,33 +688,7 @@
/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
//Called when mob user "attacks" it with object O
- if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia)) //Checked early on so it doesn't have to deal with composting checks
- if(self_sustaining)
- to_chat(user, "This [name] is already self-sustaining!")
- return
- if(myseed || weedlevel)
- to_chat(user, "[src] needs to be clear of plants and weeds!")
- return
- if(alert(user, "This will make [src] self-sustaining but consume [O] forever. Are you sure?", "[name]", "I'm Sure", "Abort") == "Abort" || !user)
- return
- if(!O || QDELETED(O))
- return
- if(!Adjacent(user))
- return
- if(self_sustaining)
- to_chat(user, "This [name] is already self-sustaining!")
- return
- if(myseed || weedlevel)
- to_chat(user, "[src] needs to be clear of plants and weeds!")
- return
- user.visible_message("[user] gently pulls open the soil for [O] and places it inside.", "You tenderly root [O] into [src].")
- user.drop_item()
- qdel(O)
- visible_message("[src] begins to glow with a beautiful light!")
- self_sustaining = TRUE
- update_icon()
-
- else if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
+ if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
var/obj/item/weapon/reagent_containers/reagent_source = O
if(istype(reagent_source, /obj/item/weapon/reagent_containers/syringe))
@@ -930,6 +917,10 @@
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = list("plants")
+/obj/machinery/hydroponics/proc/become_self_sufficient() // Ambrosia Gaia effect
+ visible_message("[src] begins to glow with a beautiful light!")
+ self_sustaining = TRUE
+ update_icon()
///////////////////////////////////////////////////////////////////////////////
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!