wweeee
This commit is contained in:
@@ -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()
|
||||
..()
|
||||
Reference in New Issue
Block a user