wweeee
This commit is contained in:
@@ -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, "<span class='warning'>Anchor the tray first!</span>")
|
||||
return
|
||||
using_irrigation = !using_irrigation
|
||||
O.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.</span>", \
|
||||
"<span class='notice'>You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.</span>")
|
||||
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("<span class='notice'>[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.</span>", \
|
||||
"<span class='notice'>You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.</span>")
|
||||
for(var/obj/machinery/hydroponics/h in range(1,src))
|
||||
h.update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/shovel/spade))
|
||||
if(!myseed && !weedlevel)
|
||||
|
||||
54
code/modules/plumbing/plumbers/autohydro.dm
Normal file
54
code/modules/plumbing/plumbers/autohydro.dm
Normal file
@@ -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("<span class='notice'>[user.name] [anchored ? "fasten" : "unfasten"] [src]</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten" : "unfasten"] [src]</span>")
|
||||
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()
|
||||
..()
|
||||
@@ -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."
|
||||
|
||||
@@ -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/////////////////////
|
||||
|
||||
Reference in New Issue
Block a user