diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index bb2d7bd688..20c16bbfc3 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -69,12 +69,7 @@
// handle opening the panel
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
return
-
- // handle deconstructing the machine, if permissible
- if (I.tool_behaviour == TOOL_CROWBAR && using_irrigation)
- to_chat(user, "Disconnect the hoses first!")
- return
- else if(default_deconstruction_crowbar(I))
+ if(default_deconstruction_crowbar(I))
return
return ..()
@@ -97,7 +92,6 @@
myseed.forceMove(src)
if(self_sustaining)
- adjustNutri(1)
adjustWater(rand(3,5))
adjustWeeds(-2)
adjustPests(-2)
@@ -229,7 +223,7 @@
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
adjustPests(1 / rating)
else
- if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
+ if(waterlevel > 10 && reagents.total_volume > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
adjustWeeds(1 / rating)
// Weeeeeeeeeeeeeeedddssss
@@ -261,8 +255,6 @@
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "gaia_blessing"))
set_light(3)
- update_icon_hoses()
-
if(myseed)
update_icon_plant()
update_icon_lights()
@@ -318,7 +310,7 @@
if(!self_sustaining)
. += "Water: [waterlevel]/[maxwater]."
- . += "Nutrient: [nutrilevel]/[maxnutri]."
+ . += "Nutrient: [reagents.total_volume]/[maxnutri]."
if(self_sufficiency_progress > 0)
var/percent_progress = round(self_sufficiency_progress * 100 / self_sufficiency_req)
. += "Treatment for self-sustenance are [percent_progress]% complete."
@@ -600,33 +592,40 @@
if (!unwrenchable) // case also covered by NODECONSTRUCT checks in default_unfasten_wrench
return CANT_UNFASTEN
- if (using_irrigation)
- if (!silent)
- to_chat(user, "Disconnect the hoses first!")
- return FAILED_UNFASTEN
-
return ..()
-/obj/machinery/hydroponics/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+/obj/machinery/hydroponics/attack_hand(mob/user)
+ . = ..()
+ if(.)
+ return
if(issilicon(user)) //How does AI know what plant is?
return
if(harvest)
return myseed.harvest(user)
else if(dead)
- dead = 0
+ dead = FALSE
to_chat(user, "You remove the dead plant from [src].")
qdel(myseed)
myseed = null
update_icon()
- name = initial(name)
- desc = initial(desc)
+ TRAY_NAME_UPDATE
else
if(user)
examine(user)
+/obj/machinery/hydroponics/AltClick(mob/user)
+ . = ..()
+ if(!anchored)
+ update_icon()
+ return FALSE
+ var/warning = alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", "Yes", "No")
+ if(warning == "Yes" && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ reagents.clear_reagents()
+ to_chat(user, "You empty [src]'s nutrient tank.")
+
/obj/machinery/hydroponics/proc/update_tray(mob/user)
- harvest = 0
+ harvest = FALSE
lastproduce = age
if(istype(myseed, /obj/item/seeds/replicapod))
if(user)//runtimes
@@ -646,9 +645,6 @@
update_icon()
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
-/obj/machinery/hydroponics/proc/adjustNutri(adjustamt)
- nutrilevel = clamp(nutrilevel + adjustamt, 0, maxnutri)
-
/obj/machinery/hydroponics/proc/adjustWater(adjustamt)
waterlevel = clamp(waterlevel + adjustamt, 0, maxwater)
@@ -691,9 +687,6 @@
flags_1 = NODECONSTRUCT_1
unwrenchable = FALSE
-/obj/machinery/hydroponics/soil/update_icon_hoses()
- return // Has no hoses
-
/obj/machinery/hydroponics/soil/update_icon_lights()
return // Has no lights
@@ -703,3 +696,4 @@
qdel(src)
else
return ..()
+
\ No newline at end of file
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index e8981ed685..9abf5d86a0 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -261,13 +261,11 @@
set_pin_data(IC_OUTPUT, 12, H.pestlevel)
set_pin_data(IC_OUTPUT, 13, H.toxic)
set_pin_data(IC_OUTPUT, 14, H.waterlevel)
- set_pin_data(IC_OUTPUT, 15, H.nutrilevel)
+ set_pin_data(IC_OUTPUT, 15, H.reagents.total_volume)
set_pin_data(IC_OUTPUT, 16, H.harvest)
set_pin_data(IC_OUTPUT, 17, H.dead)
set_pin_data(IC_OUTPUT, 18, H.plant_health)
set_pin_data(IC_OUTPUT, 19, H.self_sustaining)
- set_pin_data(IC_OUTPUT, 20, H.using_irrigation)
- set_pin_data(IC_OUTPUT, 21, H.FindConnected())
push_data()
activate_pin(2)
diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm
index 991c806f43..4a164e73d6 100644
--- a/code/modules/integrated_electronics/subtypes/reagents.dm
+++ b/code/modules/integrated_electronics/subtypes/reagents.dm
@@ -24,11 +24,6 @@
var/list/trays = list(tray)
var/visi_msg = "[acting_object] transfers fluid into [tray]"
- if(amount > 30 && source.reagents.total_volume >= 30 && tray.using_irrigation)
- trays = tray.FindConnected()
- if (trays.len > 1)
- visi_msg += ", setting off the irrigation system"
-
acting_object.visible_message("[visi_msg].")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
diff --git a/code/modules/plumbing/plumbers/autohydro.dm b/code/modules/plumbing/plumbers/autohydro.dm
index dbc70dfcf5..902276d73b 100644
--- a/code/modules/plumbing/plumbers/autohydro.dm
+++ b/code/modules/plumbing/plumbers/autohydro.dm
@@ -4,7 +4,6 @@
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/constructable/automagic/attackby(obj/item/O, mob/user, params)