From 5a03688bdb1a9a5cef99a6bf9e22035905a9d750 Mon Sep 17 00:00:00 2001 From: The0bserver Date: Thu, 1 Oct 2020 04:43:02 -0400 Subject: [PATCH] Dirt not powered, var cleanup, plumbing enable --- code/modules/hydroponics/hydroponics.dm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 6226f97b9f..6299d8ec41 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -28,8 +28,6 @@ var/unwrenchable = TRUE var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpollinate one plant var/mob/lastuser //Last user to add reagents to a tray. Mostly for logging. - 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 // Here lies irrigation. You won't be missed, because you were never used. @@ -44,6 +42,14 @@ icon = 'icons/obj/hydroponics/equipment.dmi' icon_state = "hydrotray3" +/obj/machinery/hydroponics/constructable/ComponentInitialize() + . = ..() + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated)) + AddComponent(/datum/component/plumbing/simple_demand) + +/obj/machinery/hydroponics/constructable/proc/can_be_rotated(mob/user, rotation_type) + return !anchored + /obj/machinery/hydroponics/constructable/RefreshParts() var/tmp_capacity = 0 for (var/obj/item/stock_parts/matter_bin/M in component_parts) @@ -634,7 +640,7 @@ if(!anchored) return self_sustaining = !self_sustaining - idle_power_usage = self_sustaining ? 4000 : 0 + idle_power_usage = self_sustaining ? 2500 : 0 to_chat(user, "You [self_sustaining ? "activate" : "deactivated"] [src]'s autogrow function[self_sustaining ? ", maintaining the tray's health while using high amounts of power" : ""].") update_icon() @@ -716,4 +722,6 @@ qdel(src) else return ..() - \ No newline at end of file + +/obj/machinery/hydroponics/soil/CtrlClick(mob/user) + return //Dirt doesn't have electricity, last I checked.