diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 56eb25f953..8a8aba50a3 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -512,6 +512,10 @@
/obj/item/stack/sheet/glass = 1)
needs_anchored = FALSE
+/obj/item/circuitboard/machine/hydroponics/automagic
+ name = "Automatic Hydroponics Tray (Machine Board)"
+ build_path = /obj/machinery/hydroponics/constructable/automagic
+
/obj/item/circuitboard/machine/seed_extractor
name = "Seed Extractor (Machine Board)"
build_path = /obj/machinery/seed_extractor
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index b673937c9c..14c510a2d2 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -30,7 +30,7 @@
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
-
+ var/canirrigate = TRUE //tin
/obj/machinery/hydroponics/constructable
name = "hydroponics tray"
@@ -847,12 +847,13 @@
if (!anchored)
to_chat(user, "Anchor the tray first!")
return
- using_irrigation = !using_irrigation
- O.play_tool_sound(src)
- user.visible_message("[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.", \
- "You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.")
- for(var/obj/machinery/hydroponics/h in range(1,src))
- h.update_icon()
+ if(canirrigate)
+ using_irrigation = !using_irrigation
+ O.play_tool_sound(src)
+ user.visible_message("[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.", \
+ "You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.")
+ for(var/obj/machinery/hydroponics/h in range(1,src))
+ h.update_icon()
else if(istype(O, /obj/item/shovel/spade))
if(!myseed && !weedlevel)
diff --git a/code/modules/plumbing/plumbers/autohydro.dm b/code/modules/plumbing/plumbers/autohydro.dm
new file mode 100644
index 0000000000..4ea1d70aaf
--- /dev/null
+++ b/code/modules/plumbing/plumbers/autohydro.dm
@@ -0,0 +1,54 @@
+/obj/machinery/hydroponics/constructable/automagic
+ name = "automated hydroponics system"
+ desc = "The bane of botanists everywhere. Accepts chemical reagents via plumbing, automatically harvests and removes dead plants."
+ obj_flags = CAN_BE_HIT | UNIQUE_RENAME
+ circuit = /obj/item/circuitboard/machine/hydroponics/automagic
+ self_sufficiency_req = 400 //automating hydroponics makes gaia sad so she needs more drugs to turn they tray godly.
+ canirrigate = FALSE
+
+
+/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
+ if(istype(O, /obj/item/reagent_containers) )
+ return FALSE //avoid fucky wuckies
+ ..()
+
+/obj/machinery/hydroponics/constructable/automagic/default_unfasten_wrench(mob/user, obj/item/I, time = 20)
+ . = ..()
+ if(. == SUCCESSFUL_UNFASTEN)
+ user.visible_message("[user.name] [anchored ? "fasten" : "unfasten"] [src]", \
+ "You [anchored ? "fasten" : "unfasten"] [src]")
+ var/datum/component/plumbing/CP = GetComponent(/datum/component/plumbing)
+ if(anchored)
+ CP.enable()
+ else
+ CP.disable()
+
+/obj/machinery/hydroponics/constructable/automagic/Initialize(mapload, bolt)
+ . = ..()
+ AddComponent(/datum/component/plumbing/simple_demand, bolt)
+ create_reagents(100 , AMOUNT_VISIBLE)
+
+
+/obj/machinery/hydroponics/constructable/automagic/process()
+ if(reagents)
+ applyChemicals(reagents)
+ reagents.clear_reagents()
+ if(dead)
+ dead = 0
+ qdel(myseed)
+ myseed = null
+ update_icon()
+ name = initial(name)
+ desc = initial(desc)
+ if(harvest)
+ myseed.harvest()
+ harvest = 0
+ lastproduce = age
+ if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest))
+ qdel(myseed)
+ myseed = null
+ dead = 0
+ name = initial(name)
+ desc = initial(desc)
+ update_icon()
+ ..()
diff --git a/code/modules/research/designs/machine_desings/machine_designs_service.dm b/code/modules/research/designs/machine_desings/machine_designs_service.dm
index 5cbff1c66a..af4f650793 100644
--- a/code/modules/research/designs/machine_desings/machine_designs_service.dm
+++ b/code/modules/research/designs/machine_desings/machine_designs_service.dm
@@ -81,6 +81,14 @@
category = list ("Hydroponics Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+/datum/design/board/hydroponics/auto
+ name = "Machine Design (Automatic Hydroponics Tray Board)"
+ desc = "The circuit board for an automatic hydroponics tray. GIVE ME THE PLANT, CAPTAIN."
+ id = "autohydrotray"
+ build_path = /obj/machinery/hydroponics/constructable/automagic
+ category = list ("Hydroponics Machinery")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE | DEPARTMENTAL_FLAG_MEDICAL
+
/datum/design/board/monkey_recycler
name = "Machine Design (Monkey Recycler Board)"
desc = "The circuit board for a monkey recycler."
diff --git a/code/modules/research/techweb/nodes/medical_nodes.dm b/code/modules/research/techweb/nodes/medical_nodes.dm
index 43fe941ab2..a2fba1741a 100644
--- a/code/modules/research/techweb/nodes/medical_nodes.dm
+++ b/code/modules/research/techweb/nodes/medical_nodes.dm
@@ -38,7 +38,7 @@
display_name = "Advanced Plumbing Technology"
description = "Plumbing RCD."
prereq_ids = list("plumbing", "adv_engi", "adv_biotech")
- design_ids = list("plumb_rcd")
+ design_ids = list("plumb_rcd", "autohydrotray")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
//////////////////////Cybernetics/////////////////////