From 7d08d4701ce42e56dd5d0c4bfd4d7afca9d6178e Mon Sep 17 00:00:00 2001 From: igalan Date: Wed, 11 Jun 2014 03:44:29 +0100 Subject: [PATCH] Hydroponics refactor, part 1: Files. No code actually modified, just moved from all over the place to a module folder. defines/obj/hydro.dm split: -Seeds into seeds.dm -Tools like the analyzer, pest and weedkillers into hydro_tools.dm. Hatches and scythe from defines/obj/weapon.dm moved there too. -Non-edible plants like nettles into grown_inedible.dm. Special procs in items/weapons/hydroponics.dm moved there. -Biogenerator and hydroponics tray files moved. --- baystation12.dme | 9 +- code/defines/obj/weapon.dm | 59 - .../game/objects/items/weapons/hydroponics.dm | 104 - .../hydroponics}/biogenerator.dm | 452 +-- code/modules/hydroponics/grown_inedible.dm | 249 ++ code/modules/hydroponics/hydro_tools.dm | 254 ++ .../hydroponics/hydro_tray.dm} | 1945 ++++++------ .../hydro.dm => modules/hydroponics/seeds.dm} | 2606 +++++++---------- 8 files changed, 2835 insertions(+), 2843 deletions(-) rename code/{game/machinery => modules/hydroponics}/biogenerator.dm (97%) create mode 100644 code/modules/hydroponics/grown_inedible.dm create mode 100644 code/modules/hydroponics/hydro_tools.dm rename code/{game/machinery/hydroponics.dm => modules/hydroponics/hydro_tray.dm} (97%) rename code/{defines/obj/hydro.dm => modules/hydroponics/seeds.dm} (73%) diff --git a/baystation12.dme b/baystation12.dme index 3d1bd1760c..515aab1dcc 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -158,7 +158,6 @@ #include "code\datums\spells\turf_teleport.dm" #include "code\datums\spells\wizard.dm" #include "code\defines\obj.dm" -#include "code\defines\obj\hydro.dm" #include "code\defines\obj\weapon.dm" #include "code\defines\procs\AStar.dm" #include "code\defines\procs\captain_announce.dm" @@ -281,7 +280,6 @@ #include "code\game\machinery\Beacon.dm" #include "code\game\machinery\bees_apiary.dm" #include "code\game\machinery\bees_items.dm" -#include "code\game\machinery\biogenerator.dm" #include "code\game\machinery\buttons.dm" #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" @@ -296,7 +294,6 @@ #include "code\game\machinery\Freezer.dm" #include "code\game\machinery\hologram.dm" #include "code\game\machinery\holosign.dm" -#include "code\game\machinery\hydroponics.dm" #include "code\game\machinery\igniter.dm" #include "code\game\machinery\iv_drip.dm" #include "code\game\machinery\lightswitch.dm" @@ -534,7 +531,6 @@ #include "code\game\objects\items\weapons\flamethrower.dm" #include "code\game\objects\items\weapons\gift_wrappaper.dm" #include "code\game\objects\items\weapons\handcuffs.dm" -#include "code\game\objects\items\weapons\hydroponics.dm" #include "code\game\objects\items\weapons\kitchen.dm" #include "code\game\objects\items\weapons\manuals.dm" #include "code\game\objects\items\weapons\mop.dm" @@ -847,6 +843,11 @@ #include "code\modules\food\recipes_microwave.dm" #include "code\modules\games\cards.dm" #include "code\modules\genetics\side_effects.dm" +#include "code\modules\hydroponics\biogenerator.dm" +#include "code\modules\hydroponics\grown_inedible.dm" +#include "code\modules\hydroponics\hydro_tools.dm" +#include "code\modules\hydroponics\hydro_tray.dm" +#include "code\modules\hydroponics\seeds.dm" #include "code\modules\library\lib_items.dm" #include "code\modules\library\lib_machines.dm" #include "code\modules\library\lib_readme.dm" diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index e11a950eee..b60daef316 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -36,17 +36,6 @@ throw_speed = 4 throw_range = 20 -/obj/item/weapon/corncob - name = "corn cob" - desc = "A reminder of meals gone by." - icon = 'icons/obj/harvest.dmi' - icon_state = "corncob" - item_state = "corncob" - w_class = 2.0 - throwforce = 0 - throw_speed = 4 - throw_range = 20 - /obj/item/weapon/soap name = "soap" desc = "A cheap bar of soap. Doesn't smell." @@ -464,54 +453,6 @@ w_class = 2.0 origin_tech = "biotech=2" -/obj/item/weapon/hatchet - name = "hatchet" - desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood." - icon = 'icons/obj/weapons.dmi' - icon_state = "hatchet" - flags = FPRINT | TABLEPASS | CONDUCT - force = 12.0 - w_class = 2.0 - throwforce = 15.0 - throw_speed = 4 - throw_range = 4 - m_amt = 15000 - origin_tech = "materials=2;combat=1" - attack_verb = list("chopped", "torn", "cut") - -/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return ..() - -/obj/item/weapon/hatchet/unathiknife - name = "duelling knife" - desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude." - icon = 'icons/obj/weapons.dmi' - icon_state = "unathiknife" - attack_verb = list("ripped", "torn", "cut") - -/obj/item/weapon/scythe - icon_state = "scythe0" - name = "scythe" - desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow." - force = 13.0 - throwforce = 5.0 - throw_speed = 1 - throw_range = 3 - w_class = 4.0 - flags = FPRINT | TABLEPASS | NOSHIELD - slot_flags = SLOT_BACK - origin_tech = "materials=2;combat=2" - attack_verb = list("chopped", "sliced", "cut", "reaped") - -/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity) - if(!proximity) return - if(istype(A, /obj/effect/spacevine)) - for(var/obj/effect/spacevine/B in orange(A,1)) - if(prob(80)) - del B - del A - /* /obj/item/weapon/cigarpacket name = "Pete's Cuban Cigars" diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 054e2b217a..f3d5703225 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -1,13 +1,3 @@ -/* Hydroponic stuff - * Contains: - * Sunflowers - * Nettle - * Deathnettle - * Corbcob - */ - - - /* * SeedBag */ @@ -122,97 +112,3 @@ if ((M.client && M.machine == src)) src.attack_self(M) */ -/* - * Sunflower - */ - -/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob) - M << " [user] smacks you with a sunflower!FLOWER POWER" - user << " Your sunflower's FLOWER POWER strikes [M]" - - -/* - * Nettle - */ -/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob) - if(!user.gloves) - user << "\red The nettle burns your bare hand!" - if(istype(user, /mob/living/carbon/human)) - var/organ = ((user.hand ? "l_":"r_") + "arm") - var/datum/organ/external/affecting = user.get_organ(organ) - if(affecting.take_damage(0,force)) - user.UpdateDamageIcon() - else - user.take_organ_damage(0,force) - -/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity) - if(!proximity) return - if(force > 0) - force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - else - usr << "All the leaves have fallen off the nettle from violent whacking." - del(src) - -/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan - potency = newValue - force = round((5+potency/5), 1) - -/* - * Deathnettle - */ - -/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob) - if(!user.gloves) - if(istype(user, /mob/living/carbon/human)) - var/organ = ((user.hand ? "l_":"r_") + "arm") - var/datum/organ/external/affecting = user.get_organ(organ) - if(affecting.take_damage(0,force)) - user.UpdateDamageIcon() - else - user.take_organ_damage(0,force) - if(prob(50)) - user.Paralyse(5) - user << "\red You are stunned by the Deathnettle when you try picking it up!" - -/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob) - if(!..()) return - if(istype(M, /mob/living)) - M << "\red You are stunned by the powerful acid of the Deathnettle!" - - M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey]) (JMP)") - - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - - M.eye_blurry += force/7 - if(prob(20)) - M.Paralyse(force/6) - M.Weaken(force/15) - M.drop_item() - -/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity) - if(!proximity) return - if (force > 0) - force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off - - else - usr << "All the leaves have fallen off the deathnettle from violent whacking." - del(src) - -/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan - potency = newValue - force = round((5+potency/2.5), 1) - - -/* - * Corncob - */ -/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual)) - user << "You use [W] to fashion a pipe out of the corn cob!" - new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc) - del(src) - return diff --git a/code/game/machinery/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm similarity index 97% rename from code/game/machinery/biogenerator.dm rename to code/modules/hydroponics/biogenerator.dm index 14f0151a21..e166589cc4 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -1,226 +1,226 @@ -/obj/machinery/biogenerator - name = "Biogenerator" - desc = "" - icon = 'icons/obj/biogenerator.dmi' - icon_state = "biogen-stand" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 40 - var/processing = 0 - var/obj/item/weapon/reagent_containers/glass/beaker = null - var/points = 0 - var/menustat = "menu" - - New() - ..() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - - on_reagent_change() //When the reagents change, change the icon as well. - update_icon() - - update_icon() - if(!src.beaker) - icon_state = "biogen-empty" - else if(!src.processing) - icon_state = "biogen-stand" - else - icon_state = "biogen-work" - return - -/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(istype(O, /obj/item/weapon/reagent_containers/glass)) - if(beaker) - user << "\red The biogenerator is already loaded." - else - user.before_take_item(O) - O.loc = src - beaker = O - updateUsrDialog() - else if(processing) - user << "\red The biogenerator is currently processing." - else if(istype(O, /obj/item/weapon/storage/bag/plants)) - var/i = 0 - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) - i++ - if(i >= 10) - user << "\red The biogenerator is already full! Activate it." - else - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) - G.loc = src - i++ - if(i >= 10) - user << "\blue You fill the biogenerator to its capacity." - break - if(i<10) - user << "\blue You empty the plant bag into the biogenerator." - - - else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - user << "\red You cannot put this in [src.name]" - else - var/i = 0 - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) - i++ - if(i >= 10) - user << "\red The biogenerator is full! Activate it." - else - user.before_take_item(O) - O.loc = src - user << "\blue You put [O.name] in [src.name]" - update_icon() - return - -/obj/machinery/biogenerator/interact(mob/user as mob) - if(stat & BROKEN) - return - user.set_machine(src) - var/dat = "BiogeneratorBiogenerator:
" - if (processing) - dat += "Biogenerator is processing! Please wait..." - else - dat += "Biomass: [points] points.
" - switch(menustat) - if("menu") - if (beaker) - dat += "Activate Biogenerator!
" - dat += "Detach Container

" - dat += "Food
" - dat += "10 milk (20)
" - dat += "Slab of meat (50)
" - dat += "Nutrient
" - dat += "E-Z-Nutrient (10) | x5
" - dat += "Left 4 Zed (20) | x5
" - dat += "Robust Harvest (25) | x5
" - dat += "Leather
" - dat += "Wallet (100)
" - dat += "Botanical gloves (250)
" - dat += "Utility belt (300)
" - dat += "Leather Satchel (400)
" - dat += "Cash Bag (400)
" - //dat += "Other
" - //dat += "Monkey (500)
" - else - dat += "
No beaker inside. Please insert a beaker.
" - if("nopoints") - dat += "You do not have biomass to create products.
Please, put growns into reactor and activate it.
" - dat += "Return to menu" - if("complete") - dat += "Operation complete.
" - dat += "Return to menu" - if("void") - dat += "Error: No growns inside.
Please, put growns into reactor.
" - dat += "Return to menu" - user << browse(dat, "window=biogenerator") - onclose(user, "biogenerator") - return - -/obj/machinery/biogenerator/attack_hand(mob/user as mob) - interact(user) - -/obj/machinery/biogenerator/proc/activate() - if (usr.stat != 0) - return - if (src.stat != 0) //NOPOWER etc - return - if(src.processing) - usr << "\red The biogenerator is in the process of working." - return - var/S = 0 - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents) - S += 5 - if(I.reagents.get_reagent_amount("nutriment") < 0.1) - points += 1 - else points += I.reagents.get_reagent_amount("nutriment")*10 - del(I) - if(S) - processing = 1 - update_icon() - updateUsrDialog() - playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) - use_power(S*30) - sleep(S+15) - processing = 0 - update_icon() - else - menustat = "void" - return - -/obj/machinery/biogenerator/proc/create_product(var/item,var/cost) - if(cost > points) - menustat = "nopoints" - return 0 - processing = 1 - update_icon() - updateUsrDialog() - points -= cost - sleep(30) - switch(item) - if("milk") - beaker.reagents.add_reagent("milk",10) - if("meat") - new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc) - if("ez") - new/obj/item/nutrient/ez(src.loc) - if("l4z") - new/obj/item/nutrient/l4z(src.loc) - if("rh") - new/obj/item/nutrient/rh(src.loc) - if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan - new/obj/item/nutrient/ez(src.loc) - new/obj/item/nutrient/ez(src.loc) - new/obj/item/nutrient/ez(src.loc) - new/obj/item/nutrient/ez(src.loc) - new/obj/item/nutrient/ez(src.loc) - if("l4z5") - new/obj/item/nutrient/l4z(src.loc) - new/obj/item/nutrient/l4z(src.loc) - new/obj/item/nutrient/l4z(src.loc) - new/obj/item/nutrient/l4z(src.loc) - new/obj/item/nutrient/l4z(src.loc) - if("rh5") - new/obj/item/nutrient/rh(src.loc) - new/obj/item/nutrient/rh(src.loc) - new/obj/item/nutrient/rh(src.loc) - new/obj/item/nutrient/rh(src.loc) - new/obj/item/nutrient/rh(src.loc) - if("wallet") - new/obj/item/weapon/storage/wallet(src.loc) - if("gloves") - new/obj/item/clothing/gloves/botanic_leather(src.loc) - if("tbelt") - new/obj/item/weapon/storage/belt/utility(src.loc) - if("satchel") - new/obj/item/weapon/storage/backpack/satchel(src.loc) - if("cashbag") - new/obj/item/weapon/storage/bag/cash(src.loc) - if("monkey") - new/mob/living/carbon/monkey(src.loc) - processing = 0 - menustat = "complete" - update_icon() - return 1 - -/obj/machinery/biogenerator/Topic(href, href_list) - if(stat & BROKEN) return - if(usr.stat || usr.restrained()) return - if(!in_range(src, usr)) return - - usr.set_machine(src) - - switch(href_list["action"]) - if("activate") - activate() - if("detach") - if(beaker) - beaker.loc = src.loc - beaker = null - update_icon() - if("create") - create_product(href_list["item"],text2num(href_list["cost"])) - if("menu") - menustat = "menu" - updateUsrDialog() +/obj/machinery/biogenerator + name = "Biogenerator" + desc = "" + icon = 'icons/obj/biogenerator.dmi' + icon_state = "biogen-stand" + density = 1 + anchored = 1 + use_power = 1 + idle_power_usage = 40 + var/processing = 0 + var/obj/item/weapon/reagent_containers/glass/beaker = null + var/points = 0 + var/menustat = "menu" + + New() + ..() + var/datum/reagents/R = new/datum/reagents(1000) + reagents = R + R.my_atom = src + beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) + + on_reagent_change() //When the reagents change, change the icon as well. + update_icon() + + update_icon() + if(!src.beaker) + icon_state = "biogen-empty" + else if(!src.processing) + icon_state = "biogen-stand" + else + icon_state = "biogen-work" + return + +/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(istype(O, /obj/item/weapon/reagent_containers/glass)) + if(beaker) + user << "\red The biogenerator is already loaded." + else + user.before_take_item(O) + O.loc = src + beaker = O + updateUsrDialog() + else if(processing) + user << "\red The biogenerator is currently processing." + else if(istype(O, /obj/item/weapon/storage/bag/plants)) + var/i = 0 + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) + i++ + if(i >= 10) + user << "\red The biogenerator is already full! Activate it." + else + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) + G.loc = src + i++ + if(i >= 10) + user << "\blue You fill the biogenerator to its capacity." + break + if(i<10) + user << "\blue You empty the plant bag into the biogenerator." + + + else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + user << "\red You cannot put this in [src.name]" + else + var/i = 0 + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) + i++ + if(i >= 10) + user << "\red The biogenerator is full! Activate it." + else + user.before_take_item(O) + O.loc = src + user << "\blue You put [O.name] in [src.name]" + update_icon() + return + +/obj/machinery/biogenerator/interact(mob/user as mob) + if(stat & BROKEN) + return + user.set_machine(src) + var/dat = "BiogeneratorBiogenerator:
" + if (processing) + dat += "Biogenerator is processing! Please wait..." + else + dat += "Biomass: [points] points.
" + switch(menustat) + if("menu") + if (beaker) + dat += "Activate Biogenerator!
" + dat += "Detach Container

" + dat += "Food
" + dat += "10 milk (20)
" + dat += "Slab of meat (50)
" + dat += "Nutrient
" + dat += "E-Z-Nutrient (10) | x5
" + dat += "Left 4 Zed (20) | x5
" + dat += "Robust Harvest (25) | x5
" + dat += "Leather
" + dat += "Wallet (100)
" + dat += "Botanical gloves (250)
" + dat += "Utility belt (300)
" + dat += "Leather Satchel (400)
" + dat += "Cash Bag (400)
" + //dat += "Other
" + //dat += "Monkey (500)
" + else + dat += "
No beaker inside. Please insert a beaker.
" + if("nopoints") + dat += "You do not have biomass to create products.
Please, put growns into reactor and activate it.
" + dat += "Return to menu" + if("complete") + dat += "Operation complete.
" + dat += "Return to menu" + if("void") + dat += "Error: No growns inside.
Please, put growns into reactor.
" + dat += "Return to menu" + user << browse(dat, "window=biogenerator") + onclose(user, "biogenerator") + return + +/obj/machinery/biogenerator/attack_hand(mob/user as mob) + interact(user) + +/obj/machinery/biogenerator/proc/activate() + if (usr.stat != 0) + return + if (src.stat != 0) //NOPOWER etc + return + if(src.processing) + usr << "\red The biogenerator is in the process of working." + return + var/S = 0 + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents) + S += 5 + if(I.reagents.get_reagent_amount("nutriment") < 0.1) + points += 1 + else points += I.reagents.get_reagent_amount("nutriment")*10 + del(I) + if(S) + processing = 1 + update_icon() + updateUsrDialog() + playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) + use_power(S*30) + sleep(S+15) + processing = 0 + update_icon() + else + menustat = "void" + return + +/obj/machinery/biogenerator/proc/create_product(var/item,var/cost) + if(cost > points) + menustat = "nopoints" + return 0 + processing = 1 + update_icon() + updateUsrDialog() + points -= cost + sleep(30) + switch(item) + if("milk") + beaker.reagents.add_reagent("milk",10) + if("meat") + new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc) + if("ez") + new/obj/item/nutrient/ez(src.loc) + if("l4z") + new/obj/item/nutrient/l4z(src.loc) + if("rh") + new/obj/item/nutrient/rh(src.loc) + if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan + new/obj/item/nutrient/ez(src.loc) + new/obj/item/nutrient/ez(src.loc) + new/obj/item/nutrient/ez(src.loc) + new/obj/item/nutrient/ez(src.loc) + new/obj/item/nutrient/ez(src.loc) + if("l4z5") + new/obj/item/nutrient/l4z(src.loc) + new/obj/item/nutrient/l4z(src.loc) + new/obj/item/nutrient/l4z(src.loc) + new/obj/item/nutrient/l4z(src.loc) + new/obj/item/nutrient/l4z(src.loc) + if("rh5") + new/obj/item/nutrient/rh(src.loc) + new/obj/item/nutrient/rh(src.loc) + new/obj/item/nutrient/rh(src.loc) + new/obj/item/nutrient/rh(src.loc) + new/obj/item/nutrient/rh(src.loc) + if("wallet") + new/obj/item/weapon/storage/wallet(src.loc) + if("gloves") + new/obj/item/clothing/gloves/botanic_leather(src.loc) + if("tbelt") + new/obj/item/weapon/storage/belt/utility(src.loc) + if("satchel") + new/obj/item/weapon/storage/backpack/satchel(src.loc) + if("cashbag") + new/obj/item/weapon/storage/bag/cash(src.loc) + if("monkey") + new/mob/living/carbon/monkey(src.loc) + processing = 0 + menustat = "complete" + update_icon() + return 1 + +/obj/machinery/biogenerator/Topic(href, href_list) + if(stat & BROKEN) return + if(usr.stat || usr.restrained()) return + if(!in_range(src, usr)) return + + usr.set_machine(src) + + switch(href_list["action"]) + if("activate") + activate() + if("detach") + if(beaker) + beaker.loc = src.loc + beaker = null + update_icon() + if("create") + create_product(href_list["item"],text2num(href_list["cost"])) + if("menu") + menustat = "menu" + updateUsrDialog() diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm new file mode 100644 index 0000000000..ee8697578c --- /dev/null +++ b/code/modules/hydroponics/grown_inedible.dm @@ -0,0 +1,249 @@ +// ********************** +// Other harvested materials from plants (that are not food) +// ********************** + +/obj/item/weapon/grown // Grown weapons + name = "grown_weapon" + icon = 'icons/obj/weapons.dmi' + var/seed = "" + var/plantname = "" + var/productname = "" + var/species = "" + var/lifespan = 20 + var/endurance = 15 + var/maturation = 7 + var/production = 7 + var/yield = 2 + var/potency = 1 + var/plant_type = 0 + New() + var/datum/reagents/R = new/datum/reagents(50) + reagents = R + R.my_atom = src + +/obj/item/weapon/grown/proc/changePotency(newValue) //-QualityVan + potency = newValue + +/obj/item/weapon/grown/log + name = "tower-cap log" + desc = "It's better than bad, it's good!" + icon = 'icons/obj/harvest.dmi' + icon_state = "logs" + force = 5 + flags = TABLEPASS + throwforce = 5 + w_class = 3.0 + throw_speed = 3 + throw_range = 3 + plant_type = 2 + origin_tech = "materials=1" + seed = "/obj/item/seeds/towermycelium" + attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy)) + user.show_message("You make planks out of \the [src]!", 1) + for(var/i=0,i<2,i++) + var/obj/item/stack/sheet/wood/NG = new (user.loc) + for (var/obj/item/stack/sheet/wood/G in user.loc) + if(G==NG) + continue + if(G.amount>=G.max_amount) + continue + G.attackby(NG, user) + usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks." + del(src) + return + + +/obj/item/weapon/grown/sunflower // FLOWER POWER! + name = "sunflower" + desc = "It's beautiful! A certain person might beat you to death if you trample these." + icon = 'icons/obj/harvest.dmi' + icon_state = "sunflower" + damtype = "fire" + force = 0 + flags = TABLEPASS + throwforce = 1 + w_class = 1.0 + throw_speed = 1 + throw_range = 3 + plant_type = 1 + seed = "/obj/item/seeds/sunflower" + + +/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob) + M << " [user] smacks you with a sunflower!FLOWER POWER" + user << " Your sunflower's FLOWER POWER strikes [M]" + +/* +/obj/item/weapon/grown/gibtomato + desc = "A plump tomato." + icon = 'icons/obj/harvest.dmi' + name = "Gib Tomato" + icon_state = "gibtomato" + damtype = "fire" + force = 0 + flags = TABLEPASS + throwforce = 1 + w_class = 2.0 + throw_speed = 1 + throw_range = 3 + plant_type = 1 + seed = "/obj/item/seeds/gibtomato" + New() + ..() + + +/obj/item/weapon/grown/gibtomato/New() + ..() + src.gibs = new /obj/effect/gibspawner/human(get_turf(src)) + src.gibs.attach(src) + src.smoke.set_up(10, 0, usr.loc) +*/ +/obj/item/weapon/grown/nettle // -- Skie + desc = "It's probably not wise to touch it with bare hands..." + icon = 'icons/obj/weapons.dmi' + name = "nettle" + icon_state = "nettle" + damtype = "fire" + force = 15 + flags = TABLEPASS + throwforce = 1 + w_class = 2.0 + throw_speed = 1 + throw_range = 3 + plant_type = 1 + origin_tech = "combat=1" + seed = "/obj/item/seeds/nettleseed" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) + reagents.add_reagent("sacid", round(potency, 1)) + force = round((5+potency/5), 1) + + +/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob) + if(!user.gloves) + user << "\red The nettle burns your bare hand!" + if(istype(user, /mob/living/carbon/human)) + var/organ = ((user.hand ? "l_":"r_") + "arm") + var/datum/organ/external/affecting = user.get_organ(organ) + if(affecting.take_damage(0,force)) + user.UpdateDamageIcon() + else + user.take_organ_damage(0,force) + + +/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity) + if(!proximity) return + if(force > 0) + force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) + else + usr << "All the leaves have fallen off the nettle from violent whacking." + del(src) + + +/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan + potency = newValue + force = round((5+potency/5), 1) + + + +/obj/item/weapon/grown/deathnettle // -- Skie + desc = "The \red glowing \black nettle incites \redrage\black in you just from looking at it!" + icon = 'icons/obj/weapons.dmi' + name = "deathnettle" + icon_state = "deathnettle" + damtype = "fire" + force = 30 + flags = TABLEPASS + throwforce = 1 + w_class = 2.0 + throw_speed = 1 + throw_range = 3 + plant_type = 1 + seed = "/obj/item/seeds/deathnettleseed" + origin_tech = "combat=3" + attack_verb = list("stung") + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) + reagents.add_reagent("pacid", round(potency, 1)) + force = round((5+potency/2.5), 1) + + suicide_act(mob/user) + viewers(user) << "\red [user] is eating some of the [src.name]! It looks like \he's trying to commit suicide." + return (BRUTELOSS|TOXLOSS) + + +/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob) + if(!user.gloves) + if(istype(user, /mob/living/carbon/human)) + var/organ = ((user.hand ? "l_":"r_") + "arm") + var/datum/organ/external/affecting = user.get_organ(organ) + if(affecting.take_damage(0,force)) + user.UpdateDamageIcon() + else + user.take_organ_damage(0,force) + if(prob(50)) + user.Paralyse(5) + user << "\red You are stunned by the Deathnettle when you try picking it up!" + + +/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob) + if(!..()) return + if(istype(M, /mob/living)) + M << "\red You are stunned by the powerful acid of the Deathnettle!" + + M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") + msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey]) (JMP)") + + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) + + M.eye_blurry += force/7 + if(prob(20)) + M.Paralyse(force/6) + M.Weaken(force/15) + M.drop_item() + + +/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity) + if(!proximity) return + if (force > 0) + force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off + + else + usr << "All the leaves have fallen off the deathnettle from violent whacking." + del(src) + + +/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan + potency = newValue + force = round((5+potency/2.5), 1) + + + +/obj/item/weapon/corncob + name = "corn cob" + desc = "A reminder of meals gone by." + icon = 'icons/obj/harvest.dmi' + icon_state = "corncob" + item_state = "corncob" + w_class = 2.0 + throwforce = 0 + throw_speed = 4 + throw_range = 20 + + +/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual)) + user << "You use [W] to fashion a pipe out of the corn cob!" + new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc) + del(src) + return diff --git a/code/modules/hydroponics/hydro_tools.dm b/code/modules/hydroponics/hydro_tools.dm new file mode 100644 index 0000000000..4993f5c26f --- /dev/null +++ b/code/modules/hydroponics/hydro_tools.dm @@ -0,0 +1,254 @@ +//Analyzer, pestkillers, weedkillers, nutrients, hatchets. + + +/obj/item/device/analyzer/plant_analyzer + name = "plant analyzer" + icon = 'icons/obj/device.dmi' + icon_state = "hydro" + item_state = "analyzer" + + attack_self(mob/user as mob) + return 0 + + +// ************************************* +// Pestkiller defines for hydroponics +// ************************************* + +/obj/item/pestkiller + name = "bottle of pestkiller" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + var/toxicity = 0 + var/PestKillStr = 0 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/pestkiller/carbaryl + name = "bottle of carbaryl" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + toxicity = 4 + PestKillStr = 2 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/pestkiller/lindane + name = "bottle of lindane" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle18" + flags = FPRINT | TABLEPASS + toxicity = 6 + PestKillStr = 4 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/pestkiller/phosmet + name = "bottle of phosmet" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle15" + flags = FPRINT | TABLEPASS + toxicity = 8 + PestKillStr = 7 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +// ************************************* +// Hydroponics Tools +// ************************************* + +/obj/item/weapon/weedspray // -- Skie + desc = "It's a toxic mixture, in spray form, to kill small weeds." + icon = 'icons/obj/hydroponics.dmi' + name = "weed-spray" + icon_state = "weedspray" + item_state = "spray" + flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON + slot_flags = SLOT_BELT + throwforce = 4 + w_class = 2.0 + throw_speed = 2 + throw_range = 10 + var/toxicity = 4 + var/WeedKillStr = 2 + + suicide_act(mob/user) + viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide." + return (TOXLOSS) + +/obj/item/weapon/pestspray // -- Skie + desc = "It's some pest eliminator spray! Do not inhale!" + icon = 'icons/obj/hydroponics.dmi' + name = "pest-spray" + icon_state = "pestspray" + item_state = "spray" + flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON + slot_flags = SLOT_BELT + throwforce = 4 + w_class = 2.0 + throw_speed = 2 + throw_range = 10 + var/toxicity = 4 + var/PestKillStr = 2 + + suicide_act(mob/user) + viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide." + return (TOXLOSS) + +/obj/item/weapon/minihoe // -- Numbers + name = "mini hoe" + desc = "It's used for removing weeds or scratching your back." + icon = 'icons/obj/weapons.dmi' + icon_state = "hoe" + item_state = "hoe" + flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON + force = 5.0 + throwforce = 7.0 + w_class = 2.0 + m_amt = 50 + attack_verb = list("slashed", "sliced", "cut", "clawed") + + +// ************************************* +// Weedkiller defines for hydroponics +// ************************************* + +/obj/item/weedkiller + name = "bottle of weedkiller" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + var/toxicity = 0 + var/WeedKillStr = 0 + +/obj/item/weedkiller/triclopyr + name = "bottle of glyphosate" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + toxicity = 4 + WeedKillStr = 2 + +/obj/item/weedkiller/lindane + name = "bottle of triclopyr" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle18" + flags = FPRINT | TABLEPASS + toxicity = 6 + WeedKillStr = 4 + +/obj/item/weedkiller/D24 + name = "bottle of 2,4-D" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle15" + flags = FPRINT | TABLEPASS + toxicity = 8 + WeedKillStr = 7 + + +// ************************************* +// Nutrient defines for hydroponics +// ************************************* + +/obj/item/nutrient + name = "bottle of nutrient" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + w_class = 2.0 + var/mutmod = 0 + var/yieldmod = 0 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/nutrient/ez + name = "bottle of E-Z-Nutrient" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + flags = FPRINT | TABLEPASS + mutmod = 1 + yieldmod = 1 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/nutrient/l4z + name = "bottle of Left 4 Zed" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle18" + flags = FPRINT | TABLEPASS + mutmod = 2 + yieldmod = 0 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/nutrient/rh + name = "bottle of Robust Harvest" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle15" + flags = FPRINT | TABLEPASS + mutmod = 0 + yieldmod = 2 + New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + + +//Hatchets and things to kill kudzu +/obj/item/weapon/hatchet + name = "hatchet" + desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood." + icon = 'icons/obj/weapons.dmi' + icon_state = "hatchet" + flags = FPRINT | TABLEPASS | CONDUCT + force = 12.0 + w_class = 2.0 + throwforce = 15.0 + throw_speed = 4 + throw_range = 4 + m_amt = 15000 + origin_tech = "materials=2;combat=1" + attack_verb = list("chopped", "torn", "cut") + +/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) + return ..() + +//If it's a hatchet it goes here. I guess +/obj/item/weapon/hatchet/unathiknife + name = "duelling knife" + desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude." + icon = 'icons/obj/weapons.dmi' + icon_state = "unathiknife" + attack_verb = list("ripped", "torn", "cut") + + +/obj/item/weapon/scythe + icon_state = "scythe0" + name = "scythe" + desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow." + force = 13.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 3 + w_class = 4.0 + flags = FPRINT | TABLEPASS | NOSHIELD + slot_flags = SLOT_BACK + origin_tech = "materials=2;combat=2" + attack_verb = list("chopped", "sliced", "cut", "reaped") + +/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity) + if(!proximity) return + if(istype(A, /obj/effect/spacevine)) + for(var/obj/effect/spacevine/B in orange(A,1)) + if(prob(80)) + del B + del A \ No newline at end of file diff --git a/code/game/machinery/hydroponics.dm b/code/modules/hydroponics/hydro_tray.dm similarity index 97% rename from code/game/machinery/hydroponics.dm rename to code/modules/hydroponics/hydro_tray.dm index ef86fa4c3b..1e586eacf0 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -1,972 +1,973 @@ -#define HYDRO_SPEED_MULTIPLIER 0.25 - -/obj/machinery/hydroponics - name = "hydroponics tray" - icon = 'icons/obj/hydroponics.dmi' - icon_state = "hydrotray3" - density = 1 - anchored = 1 - var/waterlevel = 100 // The amount of water in the tray (max 100) - var/nutrilevel = 10 // The amount of nutrient in the tray (max 10) - var/pestlevel = 0 // The amount of pests in the tray (max 10) - var/weedlevel = 0 // The amount of weeds in the tray (max 10) - var/yieldmod = 1 //Modifier to yield - var/mutmod = 1 //Modifier to mutation chance - var/toxic = 0 // Toxicity in the tray? - var/age = 0 // Current age - var/dead = 0 // Is it dead? - var/health = 0 // Its health. - var/lastproduce = 0 // Last time it was harvested - var/lastcycle = 0 //Used for timing of cycles. - var/cycledelay = 200 // About 10 seconds / cycle - var/planted = 0 // Is it occupied? - var/harvest = 0 //Ready to harvest? - var/obj/item/seeds/myseed = null // The currently planted seed - -/obj/machinery/hydroponics/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables. - if(istype(Proj ,/obj/item/projectile/energy/floramut)) - if(planted) - mutate() - else if(istype(Proj ,/obj/item/projectile/energy/florayield)) - if(planted && myseed.yield == 0)//Oh god don't divide by zero you'll doom us all. - myseed.yield += 1 - //world << "Yield increased by 1, from 0, to a total of [myseed.yield]" - else if (planted && (prob(1/(myseed.yield * myseed.yield) *100)))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2... - myseed.yield += 1 - //world << "Yield increased by 1, to a total of [myseed.yield]" - else - ..() - return - -/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || (height==0)) return 1 - - if(istype(mover) && mover.checkpass(PASSTABLE)) - return 1 - else - return 0 - -obj/machinery/hydroponics/process() - - if(myseed && (myseed.loc != src)) - myseed.loc = src - - if(world.time > (lastcycle + cycledelay)) - lastcycle = world.time - if(planted && !dead) - // Advance age - age += 1 * HYDRO_SPEED_MULTIPLIER - -//Nutrients////////////////////////////////////////////////////////////// - // Nutrients deplete slowly - if(nutrilevel > 0) - if(prob(50)) - nutrilevel -= 1 * HYDRO_SPEED_MULTIPLIER - - // Lack of nutrients hurts non-weeds - if(nutrilevel <= 0 && myseed.plant_type != 1) - health -= rand(1,3) * HYDRO_SPEED_MULTIPLIER - -//Water////////////////////////////////////////////////////////////////// - // Drink random amount of water - waterlevel = max(waterlevel - rand(1,6) * HYDRO_SPEED_MULTIPLIER, 0) - - // If the plant is dry, it loses health pretty fast, unless mushroom - if(waterlevel <= 10 && myseed.plant_type != 2) - health -= rand(0,1) * HYDRO_SPEED_MULTIPLIER - if(waterlevel <= 0) - health -= rand(0,2) * HYDRO_SPEED_MULTIPLIER - - // Sufficient water level and nutrient level = plant healthy - else if(waterlevel > 10 && nutrilevel > 0) - health += rand(1,2) * HYDRO_SPEED_MULTIPLIER - if(prob(5)) //5 percent chance the weed population will increase - weedlevel += 1 * HYDRO_SPEED_MULTIPLIER -//Toxins///////////////////////////////////////////////////////////////// - - // Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly - if(toxic >= 40 && toxic < 80) - health -= 1 * HYDRO_SPEED_MULTIPLIER - toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER - else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out - health -= 3 * HYDRO_SPEED_MULTIPLIER - toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER - else if(toxic < 0) // Make sure it won't go overoboard - toxic = 0 - -//Pests & Weeds////////////////////////////////////////////////////////// - - // Too many pests cause the plant to be sick - if (pestlevel > 10 ) // Make sure it won't go overoboard - pestlevel = 10 - - else if(pestlevel >= 5) - health -= 1 * HYDRO_SPEED_MULTIPLIER - - // If it's a weed, it doesn't stunt the growth - if(weedlevel >= 5 && myseed.plant_type != 1 ) - health -= 1 * HYDRO_SPEED_MULTIPLIER - - -//Health & Age/////////////////////////////////////////////////////////// - // Don't go overboard with the health - if(health > myseed.endurance) - health = myseed.endurance - - // Plant dies if health <= 0 - else if(health <= 0) - dead = 1 - harvest = 0 - weedlevel += 1 * HYDRO_SPEED_MULTIPLIER // Weeds flourish - pestlevel = 0 // Pests die - - // If the plant is too old, lose health fast - if(age > myseed.lifespan) - health -= rand(1,5) * HYDRO_SPEED_MULTIPLIER - - // Harvest code - if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead)) - for(var/i = 0; i < mutmod; i++) - if(prob(85)) - mutate() - else if(prob(30)) - hardmutate() - else if(prob(5)) - mutatespecie() - - if(yieldmod > 0 && myseed.yield != -1) // Unharvestable shouldn't be harvested - harvest = 1 - else - lastproduce = age - if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase - pestlevel += 1 * HYDRO_SPEED_MULTIPLIER - else - if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10% - weedlevel += 1 * HYDRO_SPEED_MULTIPLIER - if(weedlevel > 10) - weedlevel = 10 - - // Weeeeeeeeeeeeeeedddssss - - if (weedlevel >= 10 && prob(50)) // At this point the plant is kind of fucked. Weeds can overtake the plant spot. - if(planted) - if(myseed.plant_type == 0) // If a normal plant - weedinvasion() - else - weedinvasion() // Weed invasion into empty tray - updateicon() - return - - - -obj/machinery/hydroponics/proc/updateicon() - //Refreshes the icon and sets the luminosity - overlays.Cut() - if(planted) - if(dead) - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead") - else if(harvest) - if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") - else - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-harvest") - else if(age < myseed.maturation) - var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages ) // Make sure it won't crap out due to HERPDERP 6 stages only - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[round(t_growthstate)]") - lastproduce = age //Cheating by putting this here, it means that it isn't instantly ready to harvest - else - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") // Same - - if(waterlevel <= 10) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lowwater3") - if(nutrilevel <= 2) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lownutri3") - if(health <= (myseed.endurance / 2)) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lowhealth3") - if(weedlevel >= 5) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") - if(pestlevel >= 5) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") - if(toxic >= 40) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") - if(harvest) - overlays += image('icons/obj/hydroponics.dmi', icon_state="over_harvest3") - - if(istype(myseed,/obj/item/seeds/glowshroom)) - SetLuminosity(round(myseed.potency/10)) - else - SetLuminosity(0) - - return - - - -obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens. - dead = 0 - if(myseed) // In case there's nothing in the tray beforehand - del(myseed) - switch(rand(1,18)) // randomly pick predominative weed - if(16 to 18) - myseed = new /obj/item/seeds/reishimycelium - if(14 to 15) - myseed = new /obj/item/seeds/nettleseed - if(12 to 13) - myseed = new /obj/item/seeds/harebell - if(10 to 11) - myseed = new /obj/item/seeds/amanitamycelium - if(8 to 9) - myseed = new /obj/item/seeds/chantermycelium - if(6 to 7) // implementation for tower caps still kinda missing ~ Not Anymore! -Cheridan - myseed = new /obj/item/seeds/towermycelium - if(4 to 5) - myseed = new /obj/item/seeds/plumpmycelium - else - myseed = new /obj/item/seeds/weeds - planted = 1 - age = 0 - health = myseed.endurance - lastcycle = world.time - harvest = 0 - weedlevel = 0 // Reset - pestlevel = 0 // Reset - updateicon() - visible_message("\blue [src] has been overtaken by [myseed.plantname].") - - return - - -obj/machinery/hydroponics/proc/mutate() // Mutates the current seed - - myseed.lifespan += rand(-2,2) - if(myseed.lifespan < 10) - myseed.lifespan = 10 - else if(myseed.lifespan > 30) - myseed.lifespan = 30 - - myseed.endurance += rand(-5,5) - if(myseed.endurance < 10) - myseed.endurance = 10 - else if(myseed.endurance > 100) - myseed.endurance = 100 - - myseed.production += rand(-1,1) - if(myseed.production < 2) - myseed.production = 2 - else if(myseed.production > 10) - myseed.production = 10 - - if(myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable - myseed.yield += rand(-2,2) - if(myseed.yield < 0) - myseed.yield = 0 - else if(myseed.yield > 10) - myseed.yield = 10 - if(myseed.yield == 0 && myseed.plant_type == 2) - myseed.yield = 1 // Mushrooms always have a minimum yield of 1. - - if(myseed.potency != -1) //Not all plants have a potency - myseed.potency += rand(-25,25) - if(myseed.potency < 0) - myseed.potency = 0 - else if(myseed.potency > 100) - myseed.potency = 100 - return - - - -obj/machinery/hydroponics/proc/hardmutate() // Strongly mutates the current seed. - - myseed.lifespan += rand(-4,4) - if(myseed.lifespan < 10) - myseed.lifespan = 10 - else if(myseed.lifespan > 30 && !istype(myseed,/obj/item/seeds/glowshroom)) //hack to prevent glowshrooms from always resetting to 30 sec delay - myseed.lifespan = 30 - - myseed.endurance += rand(-10,10) - if(myseed.endurance < 10) - myseed.endurance = 10 - else if(myseed.endurance > 100) - myseed.endurance = 100 - - myseed.production += rand(-2,2) - if(myseed.production < 2) - myseed.production = 2 - else if(myseed.production > 10) - myseed.production = 10 - - if(myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable - myseed.yield += rand(-4,4) - if(myseed.yield < 0) - myseed.yield = 0 - else if(myseed.yield > 10) - myseed.yield = 10 - if(myseed.yield == 0 && myseed.plant_type == 2) - myseed.yield = 1 // Mushrooms always have a minimum yield of 1. - - if(myseed.potency != -1) //Not all plants have a potency - myseed.potency += rand(-50,50) - if(myseed.potency < 0) - myseed.potency = 0 - else if(myseed.potency > 100) - myseed.potency = 100 - return - - - -obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant! - - if ( istype(myseed, /obj/item/seeds/nettleseed )) - del(myseed) - myseed = new /obj/item/seeds/deathnettleseed - - else if ( istype(myseed, /obj/item/seeds/amanitamycelium )) - del(myseed) - myseed = new /obj/item/seeds/angelmycelium - - else if ( istype(myseed, /obj/item/seeds/lemonseed )) - del(myseed) - myseed = new /obj/item/seeds/cashseed - - else if ( istype(myseed, /obj/item/seeds/ambrosiavulgarisseed )) - del(myseed) - myseed = new /obj/item/seeds/ambrosiadeusseed - - else if ( istype(myseed, /obj/item/seeds/plumpmycelium )) - del(myseed) - myseed = new /obj/item/seeds/walkingmushroommycelium - - else if ( istype(myseed, /obj/item/seeds/chiliseed )) - del(myseed) - myseed = new /obj/item/seeds/icepepperseed - - else if ( istype(myseed, /obj/item/seeds/appleseed )) - del(myseed) - myseed = new /obj/item/seeds/goldappleseed - - else if ( istype(myseed, /obj/item/seeds/berryseed )) - del(myseed) - switch(rand(1,100)) - if(1 to 50) - myseed = new /obj/item/seeds/poisonberryseed - if(51 to 100) - myseed = new /obj/item/seeds/glowberryseed - - else if ( istype(myseed, /obj/item/seeds/poisonberryseed )) - del(myseed) - myseed = new /obj/item/seeds/deathberryseed - - else if ( istype(myseed, /obj/item/seeds/tomatoseed )) - del(myseed) - switch(rand(1,100)) - if(1 to 35) - myseed = new /obj/item/seeds/bluetomatoseed - if(36 to 70) - myseed = new /obj/item/seeds/bloodtomatoseed - if(71 to 100) - myseed = new /obj/item/seeds/killertomatoseed - - else if ( istype(myseed, /obj/item/seeds/bluetomatoseed )) - del(myseed) - myseed = new /obj/item/seeds/bluespacetomatoseed - - else if ( istype(myseed, /obj/item/seeds/grapeseed )) - del(myseed) - myseed = new /obj/item/seeds/greengrapeseed -/* - else if ( istype(myseed, /obj/item/seeds/tomatoseed )) - del(myseed) - myseed = new /obj/item/seeds/gibtomatoseed -*/ - else if ( istype(myseed, /obj/item/seeds/eggplantseed )) - del(myseed) - myseed = new /obj/item/seeds/eggyseed - - else - return - - dead = 0 - hardmutate() - planted = 1 - age = 0 - health = myseed.endurance - lastcycle = world.time - harvest = 0 - weedlevel = 0 // Reset - - spawn(5) // Wait a while - updateicon() - visible_message("\red[src] has suddenly mutated into \blue [myseed.plantname]!") - - return - - - -obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant - if ( weedlevel > 5 ) - del(myseed) - var/newWeed = pick(/obj/item/seeds/libertymycelium, /obj/item/seeds/angelmycelium, /obj/item/seeds/deathnettleseed, /obj/item/seeds/kudzuseed) - myseed = new newWeed - dead = 0 - hardmutate() - planted = 1 - age = 0 - health = myseed.endurance - lastcycle = world.time - harvest = 0 - weedlevel = 0 // Reset - - spawn(5) // Wait a while - updateicon() - visible_message("\red The mutated weeds in [src] spawned a \blue [myseed.plantname]!") - else - usr << "The few weeds in the [src] seem to react, but only for a moment..." - return - - - -obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier - health = 0 - dead = 1 - harvest = 0 - updateicon() - visible_message("\red[src] is looking very unhealthy!") - return - - - -obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm, this is commented out - if ( pestlevel > 5 ) - visible_message("The pests seem to behave oddly...") -// spawn(10) -// new /obj/effect/alien/spaceworm(loc) - else - usr << "The pests seem to behave oddly, but quickly settle down..." //Modified to give a better idea of what's happening when you inject mutagen. There's still nothing proper to spawn here though. -Cheridan - return - - - -obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) - - //Called when mob user "attacks" it with object O - if (istype(O, /obj/item/weapon/reagent_containers/glass)) - var/b_amount = O.reagents.get_reagent_amount("water") - if(b_amount > 0 && waterlevel < 100) - if(b_amount + waterlevel > 100) - b_amount = 100 - waterlevel - O.reagents.remove_reagent("water", b_amount) - waterlevel += b_amount - playsound(loc, 'sound/effects/slosh.ogg', 25, 1) - user << "You fill \the [src] with [b_amount] units of water." - - // Toxicity dilutation code. The more water you put in, the lesser the toxin concentration. - toxic -= round(b_amount/4) - if (toxic < 0 ) // Make sure it won't go overboard - toxic = 0 - - else if(waterlevel >= 100) - user << "\red \The [src] is already full." - else - user << "\red \The [O] is not filled with water." - updateicon() - - else if ( istype(O, /obj/item/nutrient) ) - var/obj/item/nutrient/myNut = O - user.u_equip(O) - nutrilevel = 10 - yieldmod = myNut.yieldmod - mutmod = myNut.mutmod - user << "You replace the nutrient solution in the [src]." - del(O) - updateicon() - - else if(istype(O, /obj/item/weapon/reagent_containers/syringe)) // Syringe stuff - var/obj/item/weapon/reagent_containers/syringe/S = O - if (planted) - if (S.mode == 1) - if(!S.reagents.total_volume) - user << "\red \The [O] is empty." - return - user << "\red You inject the [myseed.plantname] with a chemical solution." - - // There needs to be a good amount of mutagen to actually work - - if(S.reagents.has_reagent("mutagen", 5)) - switch(rand(100)) - if (91 to 100) plantdies() - if (81 to 90) mutatespecie() - if (66 to 80) hardmutate() - if (41 to 65) mutate() - if (21 to 41) user << "The plants don't seem to react..." - if (11 to 20) mutateweed() - if (1 to 10) mutatepest() - else user << "Nothing happens..." - - // Antitoxin binds shit pretty well. So the tox goes significantly down - if(S.reagents.has_reagent("anti_toxin", 1)) - toxic -= round(S.reagents.get_reagent_amount("anti_toxin")*2) - - // NIGGA, YOU JUST WENT ON FULL RETARD. - if(S.reagents.has_reagent("toxin", 1)) - toxic += round(S.reagents.get_reagent_amount("toxin")*2) - - // Milk is good for humans, but bad for plants. The sugars canot be used by plants, and the milk fat fucks up growth. Not shrooms though. I can't deal with this now... - if(S.reagents.has_reagent("milk", 1)) - nutrilevel += round(S.reagents.get_reagent_amount("milk")*0.1) - waterlevel += round(S.reagents.get_reagent_amount("milk")*0.9) - - // Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay? - if(S.reagents.has_reagent("beer", 1)) - health -= round(S.reagents.get_reagent_amount("beer")*0.05) - nutrilevel += round(S.reagents.get_reagent_amount("beer")*0.25) - waterlevel += round(S.reagents.get_reagent_amount("beer")*0.7) - - // You're an idiot of thinking that one of the most corrosive and deadly gasses would be beneficial - if(S.reagents.has_reagent("fluorine", 1)) - health -= round(S.reagents.get_reagent_amount("fluorine")*2) - toxic += round(S.reagents.get_reagent_amount("flourine")*2.5) - waterlevel -= round(S.reagents.get_reagent_amount("flourine")*0.5) - weedlevel -= rand(1,4) - - // You're an idiot of thinking that one of the most corrosive and deadly gasses would be beneficial - if(S.reagents.has_reagent("chlorine", 1)) - health -= round(S.reagents.get_reagent_amount("chlorine")*1) - toxic += round(S.reagents.get_reagent_amount("chlorine")*1.5) - waterlevel -= round(S.reagents.get_reagent_amount("chlorine")*0.5) - weedlevel -= rand(1,3) - - // White Phosphorous + water -> phosphoric acid. That's not a good thing really. Phosphoric salts are beneficial though. And even if the plant suffers, in the long run the tray gets some nutrients. The benefit isn't worth that much. - if(S.reagents.has_reagent("phosphorus", 1)) - health -= round(S.reagents.get_reagent_amount("phosphorus")*0.75) - nutrilevel += round(S.reagents.get_reagent_amount("phosphorus")*0.1) - waterlevel -= round(S.reagents.get_reagent_amount("phosphorus")*0.5) - weedlevel -= rand(1,2) - - // Plants should not have sugar, they can't use it and it prevents them getting water/ nutients, it is good for mold though... - if(S.reagents.has_reagent("sugar", 1)) - weedlevel += rand(1,2) - pestlevel += rand(1,2) - nutrilevel+= round(S.reagents.get_reagent_amount("sugar")*0.1) - - // It is water! - if(S.reagents.has_reagent("water", 1)) - waterlevel += round(S.reagents.get_reagent_amount("water")*1) - - // Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits~ - if(S.reagents.has_reagent("holywater", 1)) - waterlevel += round(S.reagents.get_reagent_amount("holywater")*1) - health += round(S.reagents.get_reagent_amount("holywater")*0.1) - - // A variety of nutrients are dissolved in club soda, without sugar. These nutrients include carbon, oxygen, hydrogen, phosphorous, potassium, sulfur and sodium, all of which are needed for healthy plant growth. - if(S.reagents.has_reagent("sodawater", 1)) - waterlevel += round(S.reagents.get_reagent_amount("sodawater")*1) - health += round(S.reagents.get_reagent_amount("sodawater")*0.1) - nutrilevel += round(S.reagents.get_reagent_amount("sodawater")*0.1) - - // Man, you guys are retards - if(S.reagents.has_reagent("sacid", 1)) - health -= round(S.reagents.get_reagent_amount("sacid")*1) - toxic += round(S.reagents.get_reagent_amount("sacid")*1.5) - weedlevel -= rand(1,2) - - // SERIOUSLY - if(S.reagents.has_reagent("pacid", 1)) - health -= round(S.reagents.get_reagent_amount("pacid")*2) - toxic += round(S.reagents.get_reagent_amount("pacid")*3) - weedlevel -= rand(1,4) - - // Plant-B-Gone is just as bad - if(S.reagents.has_reagent("plantbgone", 1)) - health -= round(S.reagents.get_reagent_amount("plantbgone")*2) - toxic -= round(S.reagents.get_reagent_amount("plantbgone")*3) - weedlevel -= rand(4,8) - - // Healing - if(S.reagents.has_reagent("cryoxadone", 1)) - health += round(S.reagents.get_reagent_amount("cryoxadone")*3) - toxic -= round(S.reagents.get_reagent_amount("cryoxadone")*3) - - // FINALLY IMPLEMENTED, Ammonia is bad ass. - if(S.reagents.has_reagent("ammonia", 1)) - health += round(S.reagents.get_reagent_amount("ammonia")*0.5) - nutrilevel += round(S.reagents.get_reagent_amount("ammonia")*1) - - // FINALLY IMPLEMENTED, This is more bad ass, and pests get hurt by the corrosive nature of it, not the plant. - if(S.reagents.has_reagent("diethylamine", 1)) - health += round(S.reagents.get_reagent_amount("diethylamine")*1) - nutrilevel += round(S.reagents.get_reagent_amount("diethylamine")*2) - pestlevel -= rand(1,2) - - // Compost, effectively - if(S.reagents.has_reagent("nutriment", 1)) - health += round(S.reagents.get_reagent_amount("nutriment")*0.5) - nutrilevel += round(S.reagents.get_reagent_amount("nutriment")*1) - - // Poor man's mutagen. - if(S.reagents.has_reagent("radium", 1)) - health -= round(S.reagents.get_reagent_amount("radium")*1.5) - toxic += round(S.reagents.get_reagent_amount("radium")*2) - if(S.reagents.has_reagent("radium", 10)) - switch(rand(100)) - if (91 to 100) plantdies() - if (81 to 90) mutatespecie() - if (66 to 80) hardmutate() - if (41 to 65) mutate() - if (21 to 41) user << "The plants don't seem to react..." - if (11 to 20) mutateweed() - if (1 to 10) mutatepest() - else user << "Nothing happens..." - - // The best stuff there is. For testing/debugging. - if(S.reagents.has_reagent("adminordrazine", 1)) - waterlevel += round(S.reagents.get_reagent_amount("adminordrazine")*1) - health += round(S.reagents.get_reagent_amount("adminordrazine")*1) - nutrilevel += round(S.reagents.get_reagent_amount("adminordrazine")*1) - pestlevel -= rand(1,5) - weedlevel -= rand(1,5) - if(S.reagents.has_reagent("adminordrazine", 5)) - switch(rand(100)) - if (66 to 100) mutatespecie() - if (33 to 65) mutateweed() - if (1 to 32) mutatepest() - else user << "Nothing happens..." - - S.reagents.clear_reagents() - if (weedlevel < 0 ) // The following checks are to prevent the stats from going out of bounds. - weedlevel = 0 - if (health < 0 ) - health = 0 - if (waterlevel > 100 ) - waterlevel = 100 - if (waterlevel < 0 ) - waterlevel = 0 - if (toxic < 0 ) - toxic = 0 - if (toxic > 100 ) - toxic = 100 - if (pestlevel < 0 ) - pestlevel = 0 - if (nutrilevel > 10 ) - nutrilevel = 10 - else - user << "You can't get any extract out of this plant." - else - user << "There's nothing to apply the solution into." - updateicon() - - else if ( istype(O, /obj/item/seeds/) ) - if(!planted) - user.u_equip(O) - user << "You plant the [O.name]" - dead = 0 - myseed = O - planted = 1 - age = 1 - health = myseed.endurance - lastcycle = world.time - O.loc = src - if((user.client && user.s_active != src)) - user.client.screen -= O - O.dropped(user) - updateicon() - - else - user << "\red The [src] already has seeds in it!" - - else if (istype(O, /obj/item/device/analyzer/plant_analyzer)) - if(planted && myseed) - user << "*** [myseed.plantname] ***" //Carn: now reports the plants growing, not the seeds. - user << "-Plant Age: \blue [age]" - user << "-Plant Endurance: \blue [myseed.endurance]" - user << "-Plant Lifespan: \blue [myseed.lifespan]" - if(myseed.yield != -1) - user << "-Plant Yield: \blue [myseed.yield]" - user << "-Plant Production: \blue [myseed.production]" - if(myseed.potency != -1) - user << "-Plant Potency: \blue [myseed.potency]" - user << "-Weed level: \blue [weedlevel]/10" - user << "-Pest level: \blue [pestlevel]/10" - user << "-Toxicity level: \blue [toxic]/100" - user << "-Water level: \blue [waterlevel]/100" - user << "-Nutrition level: \blue [nutrilevel]/10" - user << "" - else - user << "No plant found." - user << "-Weed level: \blue [weedlevel]/10" - user << "-Pest level: \blue [pestlevel]/10" - user << "-Toxicity level: \blue [toxic]/100" - user << "-Water level: \blue [waterlevel]/100" - user << "-Nutrition level: \blue [nutrilevel]/10" - user << "" - - else if (istype(O, /obj/item/weapon/reagent_containers/spray/plantbgone)) - if(planted && myseed) - health -= rand(5,20) - - if(pestlevel > 0) - pestlevel -= 2 // Kill kill kill - else - pestlevel = 0 - - if(weedlevel > 0) - weedlevel -= 3 // Kill kill kill - else - weedlevel = 0 - toxic += 4 // Oops - visible_message("\red \The [src] has been sprayed with \the [O][(user ? " by [user]." : ".")]") - playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) - updateicon() - - else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe - //var/deweeding - if(weedlevel > 0) - user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the [src].") - weedlevel = 0 - updateicon() - src.updateicon() - else - user << "\red This plot is completely devoid of weeds. It doesn't need uprooting." - - else if ( istype(O, /obj/item/weapon/weedspray) ) - var/obj/item/weedkiller/myWKiller = O - user.u_equip(O) - toxic += myWKiller.toxicity - weedlevel -= myWKiller.WeedKillStr - if (weedlevel < 0 ) // Make sure it won't go overoboard - weedlevel = 0 - if (toxic > 100 ) // Make sure it won't go overoboard - toxic = 100 - user << "You apply the weedkiller solution into the [src]." - playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) - del(O) - updateicon() - - else if (istype(O, /obj/item/weapon/storage/bag/plants)) - attack_hand(user) - var/obj/item/weapon/storage/bag/plants/S = O - for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z)) - if(!S.can_be_inserted(G)) - return - S.handle_item_insertion(G, 1) - - else if ( istype(O, /obj/item/weapon/pestspray) ) - var/obj/item/pestkiller/myPKiller = O - user.u_equip(O) - toxic += myPKiller.toxicity - pestlevel -= myPKiller.PestKillStr - if (pestlevel < 0 ) // Make sure it won't go overoboard - pestlevel = 0 - if (toxic > 100 ) // Make sure it won't go overoboard - toxic = 100 - user << "You apply the pestkiller solution into the [src]." - playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) - del(O) - updateicon() - else if(istype(O, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." - else if(istype(O, /obj/item/weapon/shovel)) - if(istype(src, /obj/machinery/hydroponics/soil)) - user << "You clear up the [src]!" - del(src) - else if(istype(O, /obj/item/apiary)) - if(planted) - user << "\red The hydroponics tray is already occupied!" - else - user.drop_item() - del(O) - - var/obj/machinery/apiary/A = new(src.loc) - A.icon = src.icon - A.icon_state = src.icon_state - A.hydrotray_type = src.type - del(src) - return - -/obj/machinery/hydroponics/attack_tk(mob/user as mob) - if(harvest) - myseed.harvest(src) - else if(dead) - planted = 0 - dead = 0 - usr << text("You remove the dead plant from the [src].") - del(myseed) - updateicon() - -/obj/machinery/hydroponics/attack_hand(mob/user as mob) - if(istype(usr,/mob/living/silicon)) //How does AI know what plant is? - return - if(harvest) - if(!user in range(1,src)) - return - myseed.harvest() - else if(dead) - planted = 0 - dead = 0 - usr << text("You remove the dead plant from the [src].") - del(myseed) - updateicon() - else - if(planted && !dead) - usr << text("The [src] has \blue [myseed.plantname] \black planted.") - if(health <= (myseed.endurance / 2)) - usr << text("The plant looks unhealthy") - else - usr << text("The [src] is empty.") - usr << text("Water: [waterlevel]/100") - usr << text("Nutrient: [nutrilevel]/10") - if(weedlevel >= 5) // Visual aid for those blind - usr << text("The [src] is filled with weeds!") - if(pestlevel >= 5) // Visual aid for those blind - usr << text("The [src] is filled with tiny worms!") - usr << text ("") // Empty line for readability. - -/obj/item/seeds/proc/harvest(mob/user = usr) - var/produce = text2path(productname) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_amount = 0 - - while ( t_amount < (yield * parent.yieldmod )) - var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new produce(user.loc, potency) // User gets a consumable - if(!t_prod) return - t_prod.seed = mypath - t_prod.species = species - t_prod.lifespan = lifespan - t_prod.endurance = endurance - t_prod.maturation = maturation - t_prod.production = production - t_prod.yield = yield - t_prod.potency = potency - t_prod.plant_type = plant_type - t_amount++ - - parent.update_tray() - -/obj/item/seeds/grassseed/harvest(mob/user = usr) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_yield = round(yield*parent.yieldmod) - - if(t_yield > 0) - var/obj/item/stack/tile/grass/new_grass = new/obj/item/stack/tile/grass(user.loc) - new_grass.amount = t_yield - - parent.update_tray() - -/obj/item/seeds/gibtomato/harvest(mob/user = usr) - var/produce = text2path(productname) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_amount = 0 - - while ( t_amount < (yield * parent.yieldmod )) - var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new produce(user.loc, potency) // User gets a consumable - - t_prod.seed = mypath - t_prod.species = species - t_prod.lifespan = lifespan - t_prod.endurance = endurance - t_prod.maturation = maturation - t_prod.production = production - t_prod.yield = yield - t_prod.potency = potency - t_prod.plant_type = plant_type - t_amount++ - - parent.update_tray() - -/obj/item/seeds/nettleseed/harvest(mob/user = usr) - var/produce = text2path(productname) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_amount = 0 - - while ( t_amount < (yield * parent.yieldmod )) - var/obj/item/weapon/grown/t_prod = new produce(user.loc, potency) // User gets a consumable -QualityVan - t_prod.seed = mypath - t_prod.species = species - t_prod.lifespan = lifespan - t_prod.endurance = endurance - t_prod.maturation = maturation - t_prod.production = production - t_prod.yield = yield - t_prod.changePotency(potency) // -QualityVan - t_prod.plant_type = plant_type - t_amount++ - - parent.update_tray() - -/obj/item/seeds/deathnettleseed/harvest(mob/user = usr) //isn't a nettle subclass yet, so - var/produce = text2path(productname) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_amount = 0 - - while ( t_amount < (yield * parent.yieldmod )) - var/obj/item/weapon/grown/t_prod = new produce(user.loc, potency) // User gets a consumable -QualityVan - t_prod.seed = mypath - t_prod.species = species - t_prod.lifespan = lifespan - t_prod.endurance = endurance - t_prod.maturation = maturation - t_prod.production = production - t_prod.yield = yield - t_prod.changePotency(potency) // -QualityVan - t_prod.plant_type = plant_type - t_amount++ - - parent.update_tray() - -/obj/item/seeds/eggyseed/harvest(mob/user = usr) - var/produce = text2path(productname) - var/obj/machinery/hydroponics/parent = loc //for ease of access - var/t_amount = 0 - - while ( t_amount < (yield * parent.yieldmod )) - new produce(user.loc) - t_amount++ - - parent.update_tray() - -/obj/machinery/hydroponics/proc/update_tray(mob/user = usr) - harvest = 0 - lastproduce = age - if((yieldmod * myseed.yield) <= 0 || istype(myseed,/obj/item/seeds/replicapod)) - user << text("\red You fail to harvest anything useful.") - else - user << text("You harvest from the [myseed.plantname].") - if(myseed.oneharvest) - del(myseed) - planted = 0 - dead = 0 - updateicon() - -/////////////////////////////////////////////////////////////////////////////// -/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk! - name = "soil" - icon = 'icons/obj/hydroponics.dmi' - icon_state = "soil" - density = 0 - use_power = 0 - - updateicon() // Same as normal but with the overlays removed - Cheridan. - overlays.Cut() - if(planted) - if(dead) - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead") - else if(harvest) - if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") - else - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-harvest") - else if(age < myseed.maturation) - var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages ) - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[round(t_growthstate)]") - lastproduce = age - else - overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") - - if(!luminosity) - if(istype(myseed,/obj/item/seeds/glowshroom)) - SetLuminosity(round(myseed.potency/10)) - else - SetLuminosity(0) - return - -#undef HYDRO_SPEED_MULTIPLIER +#define HYDRO_SPEED_MULTIPLIER 0.25 + +/obj/machinery/hydroponics + name = "hydroponics tray" + icon = 'icons/obj/hydroponics.dmi' + icon_state = "hydrotray3" + density = 1 + anchored = 1 + var/waterlevel = 100 // The amount of water in the tray (max 100) + var/nutrilevel = 10 // The amount of nutrient in the tray (max 10) + var/pestlevel = 0 // The amount of pests in the tray (max 10) + var/weedlevel = 0 // The amount of weeds in the tray (max 10) + var/yieldmod = 1 //Modifier to yield + var/mutmod = 1 //Modifier to mutation chance + var/toxic = 0 // Toxicity in the tray? + var/age = 0 // Current age + var/dead = 0 // Is it dead? + var/health = 0 // Its health. + var/lastproduce = 0 // Last time it was harvested + var/lastcycle = 0 //Used for timing of cycles. + var/cycledelay = 200 // About 10 seconds / cycle + var/planted = 0 // Is it occupied? + var/harvest = 0 //Ready to harvest? + var/obj/item/seeds/myseed = null // The currently planted seed + +/obj/machinery/hydroponics/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables. + if(istype(Proj ,/obj/item/projectile/energy/floramut)) + if(planted) + mutate() + else if(istype(Proj ,/obj/item/projectile/energy/florayield)) + if(planted && myseed.yield == 0)//Oh god don't divide by zero you'll doom us all. + myseed.yield += 1 + //world << "Yield increased by 1, from 0, to a total of [myseed.yield]" + else if (planted && (prob(1/(myseed.yield * myseed.yield) *100)))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2... + myseed.yield += 1 + //world << "Yield increased by 1, to a total of [myseed.yield]" + else + ..() + return + +/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group || (height==0)) return 1 + + if(istype(mover) && mover.checkpass(PASSTABLE)) + return 1 + else + return 0 + +obj/machinery/hydroponics/process() + + if(myseed && (myseed.loc != src)) + myseed.loc = src + + if(world.time > (lastcycle + cycledelay)) + lastcycle = world.time + if(planted && !dead) + // Advance age + age += 1 * HYDRO_SPEED_MULTIPLIER + +//Nutrients////////////////////////////////////////////////////////////// + // Nutrients deplete slowly + if(nutrilevel > 0) + if(prob(50)) + nutrilevel -= 1 * HYDRO_SPEED_MULTIPLIER + + // Lack of nutrients hurts non-weeds + if(nutrilevel <= 0 && myseed.plant_type != 1) + health -= rand(1,3) * HYDRO_SPEED_MULTIPLIER + +//Water////////////////////////////////////////////////////////////////// + // Drink random amount of water + waterlevel = max(waterlevel - rand(1,6) * HYDRO_SPEED_MULTIPLIER, 0) + + // If the plant is dry, it loses health pretty fast, unless mushroom + if(waterlevel <= 10 && myseed.plant_type != 2) + health -= rand(0,1) * HYDRO_SPEED_MULTIPLIER + if(waterlevel <= 0) + health -= rand(0,2) * HYDRO_SPEED_MULTIPLIER + + // Sufficient water level and nutrient level = plant healthy + else if(waterlevel > 10 && nutrilevel > 0) + health += rand(1,2) * HYDRO_SPEED_MULTIPLIER + if(prob(5)) //5 percent chance the weed population will increase + weedlevel += 1 * HYDRO_SPEED_MULTIPLIER +//Toxins///////////////////////////////////////////////////////////////// + + // Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly + if(toxic >= 40 && toxic < 80) + health -= 1 * HYDRO_SPEED_MULTIPLIER + toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER + else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out + health -= 3 * HYDRO_SPEED_MULTIPLIER + toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER + else if(toxic < 0) // Make sure it won't go overoboard + toxic = 0 + +//Pests & Weeds////////////////////////////////////////////////////////// + + // Too many pests cause the plant to be sick + if (pestlevel > 10 ) // Make sure it won't go overoboard + pestlevel = 10 + + else if(pestlevel >= 5) + health -= 1 * HYDRO_SPEED_MULTIPLIER + + // If it's a weed, it doesn't stunt the growth + if(weedlevel >= 5 && myseed.plant_type != 1 ) + health -= 1 * HYDRO_SPEED_MULTIPLIER + + +//Health & Age/////////////////////////////////////////////////////////// + // Don't go overboard with the health + if(health > myseed.endurance) + health = myseed.endurance + + // Plant dies if health <= 0 + else if(health <= 0) + dead = 1 + harvest = 0 + weedlevel += 1 * HYDRO_SPEED_MULTIPLIER // Weeds flourish + pestlevel = 0 // Pests die + + // If the plant is too old, lose health fast + if(age > myseed.lifespan) + health -= rand(1,5) * HYDRO_SPEED_MULTIPLIER + + // Harvest code + if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead)) + for(var/i = 0; i < mutmod; i++) + if(prob(85)) + mutate() + else if(prob(30)) + hardmutate() + else if(prob(5)) + mutatespecie() + + if(yieldmod > 0 && myseed.yield != -1) // Unharvestable shouldn't be harvested + harvest = 1 + else + lastproduce = age + if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase + pestlevel += 1 * HYDRO_SPEED_MULTIPLIER + else + if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10% + weedlevel += 1 * HYDRO_SPEED_MULTIPLIER + if(weedlevel > 10) + weedlevel = 10 + + // Weeeeeeeeeeeeeeedddssss + + if (weedlevel >= 10 && prob(50)) // At this point the plant is kind of fucked. Weeds can overtake the plant spot. + if(planted) + if(myseed.plant_type == 0) // If a normal plant + weedinvasion() + else + weedinvasion() // Weed invasion into empty tray + updateicon() + return + + + +obj/machinery/hydroponics/proc/updateicon() + //Refreshes the icon and sets the luminosity + overlays.Cut() + if(planted) + if(dead) + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead") + else if(harvest) + if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") + else + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-harvest") + else if(age < myseed.maturation) + var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages ) // Make sure it won't crap out due to HERPDERP 6 stages only + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[round(t_growthstate)]") + lastproduce = age //Cheating by putting this here, it means that it isn't instantly ready to harvest + else + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") // Same + + if(waterlevel <= 10) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lowwater3") + if(nutrilevel <= 2) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lownutri3") + if(health <= (myseed.endurance / 2)) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_lowhealth3") + if(weedlevel >= 5) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") + if(pestlevel >= 5) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") + if(toxic >= 40) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_alert3") + if(harvest) + overlays += image('icons/obj/hydroponics.dmi', icon_state="over_harvest3") + + if(istype(myseed,/obj/item/seeds/glowshroom)) + SetLuminosity(round(myseed.potency/10)) + else + SetLuminosity(0) + + return + + + +obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens. + dead = 0 + if(myseed) // In case there's nothing in the tray beforehand + del(myseed) + switch(rand(1,18)) // randomly pick predominative weed + if(16 to 18) + myseed = new /obj/item/seeds/reishimycelium + if(14 to 15) + myseed = new /obj/item/seeds/nettleseed + if(12 to 13) + myseed = new /obj/item/seeds/harebell + if(10 to 11) + myseed = new /obj/item/seeds/amanitamycelium + if(8 to 9) + myseed = new /obj/item/seeds/chantermycelium + if(6 to 7) // implementation for tower caps still kinda missing ~ Not Anymore! -Cheridan + myseed = new /obj/item/seeds/towermycelium + if(4 to 5) + myseed = new /obj/item/seeds/plumpmycelium + else + myseed = new /obj/item/seeds/weeds + planted = 1 + age = 0 + health = myseed.endurance + lastcycle = world.time + harvest = 0 + weedlevel = 0 // Reset + pestlevel = 0 // Reset + updateicon() + visible_message("\blue [src] has been overtaken by [myseed.plantname].") + + return + + +obj/machinery/hydroponics/proc/mutate() // Mutates the current seed + + myseed.lifespan += rand(-2,2) + if(myseed.lifespan < 10) + myseed.lifespan = 10 + else if(myseed.lifespan > 30) + myseed.lifespan = 30 + + myseed.endurance += rand(-5,5) + if(myseed.endurance < 10) + myseed.endurance = 10 + else if(myseed.endurance > 100) + myseed.endurance = 100 + + myseed.production += rand(-1,1) + if(myseed.production < 2) + myseed.production = 2 + else if(myseed.production > 10) + myseed.production = 10 + + if(myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable + myseed.yield += rand(-2,2) + if(myseed.yield < 0) + myseed.yield = 0 + else if(myseed.yield > 10) + myseed.yield = 10 + if(myseed.yield == 0 && myseed.plant_type == 2) + myseed.yield = 1 // Mushrooms always have a minimum yield of 1. + + if(myseed.potency != -1) //Not all plants have a potency + myseed.potency += rand(-25,25) + if(myseed.potency < 0) + myseed.potency = 0 + else if(myseed.potency > 100) + myseed.potency = 100 + return + + + +obj/machinery/hydroponics/proc/hardmutate() // Strongly mutates the current seed. + + myseed.lifespan += rand(-4,4) + if(myseed.lifespan < 10) + myseed.lifespan = 10 + else if(myseed.lifespan > 30 && !istype(myseed,/obj/item/seeds/glowshroom)) //hack to prevent glowshrooms from always resetting to 30 sec delay + myseed.lifespan = 30 + + myseed.endurance += rand(-10,10) + if(myseed.endurance < 10) + myseed.endurance = 10 + else if(myseed.endurance > 100) + myseed.endurance = 100 + + myseed.production += rand(-2,2) + if(myseed.production < 2) + myseed.production = 2 + else if(myseed.production > 10) + myseed.production = 10 + + if(myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable + myseed.yield += rand(-4,4) + if(myseed.yield < 0) + myseed.yield = 0 + else if(myseed.yield > 10) + myseed.yield = 10 + if(myseed.yield == 0 && myseed.plant_type == 2) + myseed.yield = 1 // Mushrooms always have a minimum yield of 1. + + if(myseed.potency != -1) //Not all plants have a potency + myseed.potency += rand(-50,50) + if(myseed.potency < 0) + myseed.potency = 0 + else if(myseed.potency > 100) + myseed.potency = 100 + return + + + +obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant! + + if ( istype(myseed, /obj/item/seeds/nettleseed )) + del(myseed) + myseed = new /obj/item/seeds/deathnettleseed + + else if ( istype(myseed, /obj/item/seeds/amanitamycelium )) + del(myseed) + myseed = new /obj/item/seeds/angelmycelium + + else if ( istype(myseed, /obj/item/seeds/lemonseed )) + del(myseed) + myseed = new /obj/item/seeds/cashseed + + else if ( istype(myseed, /obj/item/seeds/ambrosiavulgarisseed )) + del(myseed) + myseed = new /obj/item/seeds/ambrosiadeusseed + + else if ( istype(myseed, /obj/item/seeds/plumpmycelium )) + del(myseed) + myseed = new /obj/item/seeds/walkingmushroommycelium + + else if ( istype(myseed, /obj/item/seeds/chiliseed )) + del(myseed) + myseed = new /obj/item/seeds/icepepperseed + + else if ( istype(myseed, /obj/item/seeds/appleseed )) + del(myseed) + myseed = new /obj/item/seeds/goldappleseed + + else if ( istype(myseed, /obj/item/seeds/berryseed )) + del(myseed) + switch(rand(1,100)) + if(1 to 50) + myseed = new /obj/item/seeds/poisonberryseed + if(51 to 100) + myseed = new /obj/item/seeds/glowberryseed + + else if ( istype(myseed, /obj/item/seeds/poisonberryseed )) + del(myseed) + myseed = new /obj/item/seeds/deathberryseed + + else if ( istype(myseed, /obj/item/seeds/tomatoseed )) + del(myseed) + switch(rand(1,100)) + if(1 to 35) + myseed = new /obj/item/seeds/bluetomatoseed + if(36 to 70) + myseed = new /obj/item/seeds/bloodtomatoseed + if(71 to 100) + myseed = new /obj/item/seeds/killertomatoseed + + else if ( istype(myseed, /obj/item/seeds/bluetomatoseed )) + del(myseed) + myseed = new /obj/item/seeds/bluespacetomatoseed + + else if ( istype(myseed, /obj/item/seeds/grapeseed )) + del(myseed) + myseed = new /obj/item/seeds/greengrapeseed +/* + else if ( istype(myseed, /obj/item/seeds/tomatoseed )) + del(myseed) + myseed = new /obj/item/seeds/gibtomatoseed +*/ + else if ( istype(myseed, /obj/item/seeds/eggplantseed )) + del(myseed) + myseed = new /obj/item/seeds/eggyseed + + else + return + + dead = 0 + hardmutate() + planted = 1 + age = 0 + health = myseed.endurance + lastcycle = world.time + harvest = 0 + weedlevel = 0 // Reset + + spawn(5) // Wait a while + updateicon() + visible_message("\red[src] has suddenly mutated into \blue [myseed.plantname]!") + + return + + + +obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant + if ( weedlevel > 5 ) + del(myseed) + var/newWeed = pick(/obj/item/seeds/libertymycelium, /obj/item/seeds/angelmycelium, /obj/item/seeds/deathnettleseed, /obj/item/seeds/kudzuseed) + myseed = new newWeed + dead = 0 + hardmutate() + planted = 1 + age = 0 + health = myseed.endurance + lastcycle = world.time + harvest = 0 + weedlevel = 0 // Reset + + spawn(5) // Wait a while + updateicon() + visible_message("\red The mutated weeds in [src] spawned a \blue [myseed.plantname]!") + else + usr << "The few weeds in the [src] seem to react, but only for a moment..." + return + + + +obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier + health = 0 + dead = 1 + harvest = 0 + updateicon() + visible_message("\red[src] is looking very unhealthy!") + return + + + +obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm, this is commented out + if ( pestlevel > 5 ) + visible_message("The pests seem to behave oddly...") +// spawn(10) +// new /obj/effect/alien/spaceworm(loc) + else + usr << "The pests seem to behave oddly, but quickly settle down..." //Modified to give a better idea of what's happening when you inject mutagen. There's still nothing proper to spawn here though. -Cheridan + return + + + +obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) + + //Called when mob user "attacks" it with object O + if (istype(O, /obj/item/weapon/reagent_containers/glass)) + var/b_amount = O.reagents.get_reagent_amount("water") + if(b_amount > 0 && waterlevel < 100) + if(b_amount + waterlevel > 100) + b_amount = 100 - waterlevel + O.reagents.remove_reagent("water", b_amount) + waterlevel += b_amount + playsound(loc, 'sound/effects/slosh.ogg', 25, 1) + user << "You fill \the [src] with [b_amount] units of water." + + // Toxicity dilutation code. The more water you put in, the lesser the toxin concentration. + toxic -= round(b_amount/4) + if (toxic < 0 ) // Make sure it won't go overboard + toxic = 0 + + else if(waterlevel >= 100) + user << "\red \The [src] is already full." + else + user << "\red \The [O] is not filled with water." + updateicon() + + else if ( istype(O, /obj/item/nutrient) ) + var/obj/item/nutrient/myNut = O + user.u_equip(O) + nutrilevel = 10 + yieldmod = myNut.yieldmod + mutmod = myNut.mutmod + user << "You replace the nutrient solution in the [src]." + del(O) + updateicon() + + else if(istype(O, /obj/item/weapon/reagent_containers/syringe)) // Syringe stuff + var/obj/item/weapon/reagent_containers/syringe/S = O + if (planted) + if (S.mode == 1) + if(!S.reagents.total_volume) + user << "\red \The [O] is empty." + return + user << "\red You inject the [myseed.plantname] with a chemical solution." + + // There needs to be a good amount of mutagen to actually work + + if(S.reagents.has_reagent("mutagen", 5)) + switch(rand(100)) + if (91 to 100) plantdies() + if (81 to 90) mutatespecie() + if (66 to 80) hardmutate() + if (41 to 65) mutate() + if (21 to 41) user << "The plants don't seem to react..." + if (11 to 20) mutateweed() + if (1 to 10) mutatepest() + else user << "Nothing happens..." + + // Antitoxin binds shit pretty well. So the tox goes significantly down + if(S.reagents.has_reagent("anti_toxin", 1)) + toxic -= round(S.reagents.get_reagent_amount("anti_toxin")*2) + + // NIGGA, YOU JUST WENT ON FULL RETARD. + if(S.reagents.has_reagent("toxin", 1)) + toxic += round(S.reagents.get_reagent_amount("toxin")*2) + + // Milk is good for humans, but bad for plants. The sugars canot be used by plants, and the milk fat fucks up growth. Not shrooms though. I can't deal with this now... + if(S.reagents.has_reagent("milk", 1)) + nutrilevel += round(S.reagents.get_reagent_amount("milk")*0.1) + waterlevel += round(S.reagents.get_reagent_amount("milk")*0.9) + + // Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay? + if(S.reagents.has_reagent("beer", 1)) + health -= round(S.reagents.get_reagent_amount("beer")*0.05) + nutrilevel += round(S.reagents.get_reagent_amount("beer")*0.25) + waterlevel += round(S.reagents.get_reagent_amount("beer")*0.7) + + // You're an idiot of thinking that one of the most corrosive and deadly gasses would be beneficial + if(S.reagents.has_reagent("fluorine", 1)) + health -= round(S.reagents.get_reagent_amount("fluorine")*2) + toxic += round(S.reagents.get_reagent_amount("flourine")*2.5) + waterlevel -= round(S.reagents.get_reagent_amount("flourine")*0.5) + weedlevel -= rand(1,4) + + // You're an idiot of thinking that one of the most corrosive and deadly gasses would be beneficial + if(S.reagents.has_reagent("chlorine", 1)) + health -= round(S.reagents.get_reagent_amount("chlorine")*1) + toxic += round(S.reagents.get_reagent_amount("chlorine")*1.5) + waterlevel -= round(S.reagents.get_reagent_amount("chlorine")*0.5) + weedlevel -= rand(1,3) + + // White Phosphorous + water -> phosphoric acid. That's not a good thing really. Phosphoric salts are beneficial though. And even if the plant suffers, in the long run the tray gets some nutrients. The benefit isn't worth that much. + if(S.reagents.has_reagent("phosphorus", 1)) + health -= round(S.reagents.get_reagent_amount("phosphorus")*0.75) + nutrilevel += round(S.reagents.get_reagent_amount("phosphorus")*0.1) + waterlevel -= round(S.reagents.get_reagent_amount("phosphorus")*0.5) + weedlevel -= rand(1,2) + + // Plants should not have sugar, they can't use it and it prevents them getting water/ nutients, it is good for mold though... + if(S.reagents.has_reagent("sugar", 1)) + weedlevel += rand(1,2) + pestlevel += rand(1,2) + nutrilevel+= round(S.reagents.get_reagent_amount("sugar")*0.1) + + // It is water! + if(S.reagents.has_reagent("water", 1)) + waterlevel += round(S.reagents.get_reagent_amount("water")*1) + + // Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits~ + if(S.reagents.has_reagent("holywater", 1)) + waterlevel += round(S.reagents.get_reagent_amount("holywater")*1) + health += round(S.reagents.get_reagent_amount("holywater")*0.1) + + // A variety of nutrients are dissolved in club soda, without sugar. These nutrients include carbon, oxygen, hydrogen, phosphorous, potassium, sulfur and sodium, all of which are needed for healthy plant growth. + if(S.reagents.has_reagent("sodawater", 1)) + waterlevel += round(S.reagents.get_reagent_amount("sodawater")*1) + health += round(S.reagents.get_reagent_amount("sodawater")*0.1) + nutrilevel += round(S.reagents.get_reagent_amount("sodawater")*0.1) + + // Man, you guys are retards + if(S.reagents.has_reagent("sacid", 1)) + health -= round(S.reagents.get_reagent_amount("sacid")*1) + toxic += round(S.reagents.get_reagent_amount("sacid")*1.5) + weedlevel -= rand(1,2) + + // SERIOUSLY + if(S.reagents.has_reagent("pacid", 1)) + health -= round(S.reagents.get_reagent_amount("pacid")*2) + toxic += round(S.reagents.get_reagent_amount("pacid")*3) + weedlevel -= rand(1,4) + + // Plant-B-Gone is just as bad + if(S.reagents.has_reagent("plantbgone", 1)) + health -= round(S.reagents.get_reagent_amount("plantbgone")*2) + toxic -= round(S.reagents.get_reagent_amount("plantbgone")*3) + weedlevel -= rand(4,8) + + // Healing + if(S.reagents.has_reagent("cryoxadone", 1)) + health += round(S.reagents.get_reagent_amount("cryoxadone")*3) + toxic -= round(S.reagents.get_reagent_amount("cryoxadone")*3) + + // FINALLY IMPLEMENTED, Ammonia is bad ass. + if(S.reagents.has_reagent("ammonia", 1)) + health += round(S.reagents.get_reagent_amount("ammonia")*0.5) + nutrilevel += round(S.reagents.get_reagent_amount("ammonia")*1) + + // FINALLY IMPLEMENTED, This is more bad ass, and pests get hurt by the corrosive nature of it, not the plant. + if(S.reagents.has_reagent("diethylamine", 1)) + health += round(S.reagents.get_reagent_amount("diethylamine")*1) + nutrilevel += round(S.reagents.get_reagent_amount("diethylamine")*2) + pestlevel -= rand(1,2) + + // Compost, effectively + if(S.reagents.has_reagent("nutriment", 1)) + health += round(S.reagents.get_reagent_amount("nutriment")*0.5) + nutrilevel += round(S.reagents.get_reagent_amount("nutriment")*1) + + // Poor man's mutagen. + if(S.reagents.has_reagent("radium", 1)) + health -= round(S.reagents.get_reagent_amount("radium")*1.5) + toxic += round(S.reagents.get_reagent_amount("radium")*2) + if(S.reagents.has_reagent("radium", 10)) + switch(rand(100)) + if (91 to 100) plantdies() + if (81 to 90) mutatespecie() + if (66 to 80) hardmutate() + if (41 to 65) mutate() + if (21 to 41) user << "The plants don't seem to react..." + if (11 to 20) mutateweed() + if (1 to 10) mutatepest() + else user << "Nothing happens..." + + // The best stuff there is. For testing/debugging. + if(S.reagents.has_reagent("adminordrazine", 1)) + waterlevel += round(S.reagents.get_reagent_amount("adminordrazine")*1) + health += round(S.reagents.get_reagent_amount("adminordrazine")*1) + nutrilevel += round(S.reagents.get_reagent_amount("adminordrazine")*1) + pestlevel -= rand(1,5) + weedlevel -= rand(1,5) + if(S.reagents.has_reagent("adminordrazine", 5)) + switch(rand(100)) + if (66 to 100) mutatespecie() + if (33 to 65) mutateweed() + if (1 to 32) mutatepest() + else user << "Nothing happens..." + + S.reagents.clear_reagents() + if (weedlevel < 0 ) // The following checks are to prevent the stats from going out of bounds. + weedlevel = 0 + if (health < 0 ) + health = 0 + if (waterlevel > 100 ) + waterlevel = 100 + if (waterlevel < 0 ) + waterlevel = 0 + if (toxic < 0 ) + toxic = 0 + if (toxic > 100 ) + toxic = 100 + if (pestlevel < 0 ) + pestlevel = 0 + if (nutrilevel > 10 ) + nutrilevel = 10 + else + user << "You can't get any extract out of this plant." + else + user << "There's nothing to apply the solution into." + updateicon() + + else if ( istype(O, /obj/item/seeds/) ) + if(!planted) + user.u_equip(O) + user << "You plant the [O.name]" + dead = 0 + myseed = O + planted = 1 + age = 1 + health = myseed.endurance + lastcycle = world.time + O.loc = src + if((user.client && user.s_active != src)) + user.client.screen -= O + O.dropped(user) + updateicon() + + else + user << "\red The [src] already has seeds in it!" + + else if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + if(planted && myseed) + user << "*** [myseed.plantname] ***" //Carn: now reports the plants growing, not the seeds. + user << "-Plant Age: \blue [age]" + user << "-Plant Endurance: \blue [myseed.endurance]" + user << "-Plant Lifespan: \blue [myseed.lifespan]" + if(myseed.yield != -1) + user << "-Plant Yield: \blue [myseed.yield]" + user << "-Plant Production: \blue [myseed.production]" + if(myseed.potency != -1) + user << "-Plant Potency: \blue [myseed.potency]" + user << "-Weed level: \blue [weedlevel]/10" + user << "-Pest level: \blue [pestlevel]/10" + user << "-Toxicity level: \blue [toxic]/100" + user << "-Water level: \blue [waterlevel]/100" + user << "-Nutrition level: \blue [nutrilevel]/10" + user << "" + else + user << "No plant found." + user << "-Weed level: \blue [weedlevel]/10" + user << "-Pest level: \blue [pestlevel]/10" + user << "-Toxicity level: \blue [toxic]/100" + user << "-Water level: \blue [waterlevel]/100" + user << "-Nutrition level: \blue [nutrilevel]/10" + user << "" + + else if (istype(O, /obj/item/weapon/reagent_containers/spray/plantbgone)) + if(planted && myseed) + health -= rand(5,20) + + if(pestlevel > 0) + pestlevel -= 2 // Kill kill kill + else + pestlevel = 0 + + if(weedlevel > 0) + weedlevel -= 3 // Kill kill kill + else + weedlevel = 0 + toxic += 4 // Oops + visible_message("\red \The [src] has been sprayed with \the [O][(user ? " by [user]." : ".")]") + playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) + updateicon() + + else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe + //var/deweeding + if(weedlevel > 0) + user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the [src].") + weedlevel = 0 + updateicon() + src.updateicon() + else + user << "\red This plot is completely devoid of weeds. It doesn't need uprooting." + + else if ( istype(O, /obj/item/weapon/weedspray) ) + var/obj/item/weedkiller/myWKiller = O + user.u_equip(O) + toxic += myWKiller.toxicity + weedlevel -= myWKiller.WeedKillStr + if (weedlevel < 0 ) // Make sure it won't go overoboard + weedlevel = 0 + if (toxic > 100 ) // Make sure it won't go overoboard + toxic = 100 + user << "You apply the weedkiller solution into the [src]." + playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) + del(O) + updateicon() + + else if (istype(O, /obj/item/weapon/storage/bag/plants)) + attack_hand(user) + var/obj/item/weapon/storage/bag/plants/S = O + for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z)) + if(!S.can_be_inserted(G)) + return + S.handle_item_insertion(G, 1) + + else if ( istype(O, /obj/item/weapon/pestspray) ) + var/obj/item/pestkiller/myPKiller = O + user.u_equip(O) + toxic += myPKiller.toxicity + pestlevel -= myPKiller.PestKillStr + if (pestlevel < 0 ) // Make sure it won't go overoboard + pestlevel = 0 + if (toxic > 100 ) // Make sure it won't go overoboard + toxic = 100 + user << "You apply the pestkiller solution into the [src]." + playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) + del(O) + updateicon() + else if(istype(O, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + anchored = !anchored + user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + else if(istype(O, /obj/item/weapon/shovel)) + if(istype(src, /obj/machinery/hydroponics/soil)) + user << "You clear up the [src]!" + del(src) + else if(istype(O, /obj/item/apiary)) + if(planted) + user << "\red The hydroponics tray is already occupied!" + else + user.drop_item() + del(O) + + var/obj/machinery/apiary/A = new(src.loc) + A.icon = src.icon + A.icon_state = src.icon_state + A.hydrotray_type = src.type + del(src) + return + +/obj/machinery/hydroponics/attack_tk(mob/user as mob) + if(harvest) + myseed.harvest(src) + else if(dead) + planted = 0 + dead = 0 + usr << text("You remove the dead plant from the [src].") + del(myseed) + updateicon() + +/obj/machinery/hydroponics/attack_hand(mob/user as mob) + if(istype(usr,/mob/living/silicon)) //How does AI know what plant is? + return + if(harvest) + if(!user in range(1,src)) + return + myseed.harvest() + else if(dead) + planted = 0 + dead = 0 + usr << text("You remove the dead plant from the [src].") + del(myseed) + updateicon() + else + if(planted && !dead) + usr << text("The [src] has \blue [myseed.plantname] \black planted.") + if(health <= (myseed.endurance / 2)) + usr << text("The plant looks unhealthy") + else + usr << text("The [src] is empty.") + usr << text("Water: [waterlevel]/100") + usr << text("Nutrient: [nutrilevel]/10") + if(weedlevel >= 5) // Visual aid for those blind + usr << text("The [src] is filled with weeds!") + if(pestlevel >= 5) // Visual aid for those blind + usr << text("The [src] is filled with tiny worms!") + usr << text ("") // Empty line for readability. + + +/obj/item/seeds/proc/harvest(mob/user = usr) + var/produce = text2path(productname) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_amount = 0 + + while ( t_amount < (yield * parent.yieldmod )) + var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new produce(user.loc, potency) // User gets a consumable + if(!t_prod) return + t_prod.seed = mypath + t_prod.species = species + t_prod.lifespan = lifespan + t_prod.endurance = endurance + t_prod.maturation = maturation + t_prod.production = production + t_prod.yield = yield + t_prod.potency = potency + t_prod.plant_type = plant_type + t_amount++ + + parent.update_tray() + +/obj/item/seeds/grassseed/harvest(mob/user = usr) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_yield = round(yield*parent.yieldmod) + + if(t_yield > 0) + var/obj/item/stack/tile/grass/new_grass = new/obj/item/stack/tile/grass(user.loc) + new_grass.amount = t_yield + + parent.update_tray() + +/obj/item/seeds/gibtomato/harvest(mob/user = usr) + var/produce = text2path(productname) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_amount = 0 + + while ( t_amount < (yield * parent.yieldmod )) + var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new produce(user.loc, potency) // User gets a consumable + + t_prod.seed = mypath + t_prod.species = species + t_prod.lifespan = lifespan + t_prod.endurance = endurance + t_prod.maturation = maturation + t_prod.production = production + t_prod.yield = yield + t_prod.potency = potency + t_prod.plant_type = plant_type + t_amount++ + + parent.update_tray() + +/obj/item/seeds/nettleseed/harvest(mob/user = usr) + var/produce = text2path(productname) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_amount = 0 + + while ( t_amount < (yield * parent.yieldmod )) + var/obj/item/weapon/grown/t_prod = new produce(user.loc, potency) // User gets a consumable -QualityVan + t_prod.seed = mypath + t_prod.species = species + t_prod.lifespan = lifespan + t_prod.endurance = endurance + t_prod.maturation = maturation + t_prod.production = production + t_prod.yield = yield + t_prod.changePotency(potency) // -QualityVan + t_prod.plant_type = plant_type + t_amount++ + + parent.update_tray() + +/obj/item/seeds/deathnettleseed/harvest(mob/user = usr) //isn't a nettle subclass yet, so + var/produce = text2path(productname) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_amount = 0 + + while ( t_amount < (yield * parent.yieldmod )) + var/obj/item/weapon/grown/t_prod = new produce(user.loc, potency) // User gets a consumable -QualityVan + t_prod.seed = mypath + t_prod.species = species + t_prod.lifespan = lifespan + t_prod.endurance = endurance + t_prod.maturation = maturation + t_prod.production = production + t_prod.yield = yield + t_prod.changePotency(potency) // -QualityVan + t_prod.plant_type = plant_type + t_amount++ + + parent.update_tray() + +/obj/item/seeds/eggyseed/harvest(mob/user = usr) + var/produce = text2path(productname) + var/obj/machinery/hydroponics/parent = loc //for ease of access + var/t_amount = 0 + + while ( t_amount < (yield * parent.yieldmod )) + new produce(user.loc) + t_amount++ + + parent.update_tray() + +/obj/machinery/hydroponics/proc/update_tray(mob/user = usr) + harvest = 0 + lastproduce = age + if((yieldmod * myseed.yield) <= 0 || istype(myseed,/obj/item/seeds/replicapod)) + user << text("\red You fail to harvest anything useful.") + else + user << text("You harvest from the [myseed.plantname].") + if(myseed.oneharvest) + del(myseed) + planted = 0 + dead = 0 + updateicon() + +/////////////////////////////////////////////////////////////////////////////// +/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk! + name = "soil" + icon = 'icons/obj/hydroponics.dmi' + icon_state = "soil" + density = 0 + use_power = 0 + + updateicon() // Same as normal but with the overlays removed - Cheridan. + overlays.Cut() + if(planted) + if(dead) + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead") + else if(harvest) + if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") + else + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-harvest") + else if(age < myseed.maturation) + var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages ) + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[round(t_growthstate)]") + lastproduce = age + else + overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-grow[myseed.growthstages]") + + if(!luminosity) + if(istype(myseed,/obj/item/seeds/glowshroom)) + SetLuminosity(round(myseed.potency/10)) + else + SetLuminosity(0) + return + +#undef HYDRO_SPEED_MULTIPLIER diff --git a/code/defines/obj/hydro.dm b/code/modules/hydroponics/seeds.dm similarity index 73% rename from code/defines/obj/hydro.dm rename to code/modules/hydroponics/seeds.dm index 3e1124d35a..2fb0acda31 100644 --- a/code/defines/obj/hydro.dm +++ b/code/modules/hydroponics/seeds.dm @@ -1,1478 +1,1128 @@ -// Plant analyzer - -/obj/item/device/analyzer/plant_analyzer - name = "plant analyzer" - icon = 'icons/obj/device.dmi' - icon_state = "hydro" - item_state = "analyzer" - - attack_self(mob/user as mob) - return 0 - -// ******************************************************** -// Here's all the seeds (plants) that can be used in hydro -// ******************************************************** - -/obj/item/seeds - name = "pack of seeds" - icon = 'icons/obj/seeds.dmi' - icon_state = "seed" // unknown plant seed - these shouldn't exist in-game - flags = FPRINT | TABLEPASS - w_class = 2.0 // Makes them pocketable - var/mypath = "/obj/item/seeds" - var/plantname = "Plants" - var/productname = "" - var/species = "" - var/lifespan = 0 - var/endurance = 0 - var/maturation = 0 - var/production = 0 - var/yield = 0 // If is -1, the plant/shroom/weed is never meant to be harvested - var/oneharvest = 0 - var/potency = -1 - var/growthstages = 0 - var/plant_type = 0 // 0 = 'normal plant'; 1 = weed; 2 = shroom - -/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob) - if (istype(O, /obj/item/device/analyzer/plant_analyzer)) - user << "*** [plantname] ***" - user << "-Plant Endurance: \blue [endurance]" - user << "-Plant Lifespan: \blue [lifespan]" - if(yield != -1) - user << "-Plant Yield: \blue [yield]" - user << "-Plant Production: \blue [production]" - if(potency != -1) - user << "-Plant Potency: \blue [potency]" - return - ..() // Fallthrough to item/attackby() so that bags can pick seeds up - -/obj/item/seeds/chiliseed - name = "pack of chili seeds" - desc = "These seeds grow into chili plants. HOT! HOT! HOT!" - icon_state = "seed-chili" - mypath = "/obj/item/seeds/chiliseed" - species = "chili" - plantname = "Chili Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/chili" - lifespan = 20 - endurance = 15 - maturation = 5 - production = 5 - yield = 4 - potency = 20 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/plastiseed - name = "plastellium mycelium" - desc = "This mycelium grows into Plastellium" - icon_state = "mycelium-plast" - mypath = "/obj/item/seeds/plastiseed" - species = "plastellium" - plantname = "Plastellium" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/plastellium" - lifespan = 15 - endurance = 17 - maturation = 5 - production = 6 - yield = 6 - oneharvest = 1 - potency = 20 - plant_type = 2 - growthstages = 3 - -/obj/item/seeds/grapeseed - name = "pack of grape seeds" - desc = "These seeds grow into grape vines." - icon_state = "seed-grapes" - mypath = "/obj/item/seeds/grapeseed" - species = "grape" - plantname = "Grape Vine" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/grapes" - lifespan = 50 - endurance = 25 - maturation = 3 - production = 5 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 2 - -/obj/item/seeds/greengrapeseed - name = "pack of green grape seeds" - desc = "These seeds grow into green-grape vines." - icon_state = "seed-greengrapes" - mypath = "/obj/item/seeds/greengrapeseed" - species = "greengrape" - plantname = "Green-Grape Vine" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes" - lifespan = 50 - endurance = 25 - maturation = 3 - production = 5 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 2 - -/obj/item/seeds/peanutseed - name = "pack of peanut seeds" - desc = "These seeds grow into peanut vines." - icon_state = "seed-peanut" - mypath = "/obj/item/seeds/peanutseed" - species = "peanut" - plantname = "Peanuts" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/peanut" - lifespan = 55 - endurance = 50 - maturation = 6 - production = 6 - yield = 6 - potency = 10 - plant_type = 0 - growthstages = 6 - - -/obj/item/seeds/cabbageseed - name = "pack of cabbage seeds" - desc = "These seeds grow into cabbages." - icon_state = "seed-cabbage" - mypath = "/obj/item/seeds/cabbageseed" - species = "cabbage" - plantname = "Cabbages" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage" - lifespan = 50 - endurance = 25 - maturation = 3 - production = 5 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 1 - -/obj/item/seeds/shandseed - name = "pack of s'rendarr's hand seeds" - desc = "These seeds grow into a helpful herb called S'Rendarr's Hand, native to Ahdomai." - icon_state = "seed-shand" - mypath = "/obj/item/seeds/shandseed" - species = "shand" - plantname = "S'Rendarr's Hand" - productname = "/obj/item/stack/medical/bruise_pack/tajaran" - lifespan = 50 - endurance = 25 - maturation = 3 - production = 5 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 3 - -/obj/item/seeds/mtearseed - name = "pack of messa's tear seeds" - desc = "These seeds grow into a helpful herb called Messa's Tear, native to Ahdomai." - icon_state = "seed-mtear" - mypath = "/obj/item/seeds/mtearseed" - species = "mtear" - plantname = "Messa's Tear" - productname = "/obj/item/stack/medical/ointment/tajaran" - lifespan = 50 - endurance = 25 - maturation = 3 - production = 5 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 3 - -/obj/item/seeds/berryseed - name = "pack of berry seeds" - desc = "These seeds grow into berry bushes." - icon_state = "seed-berry" - mypath = "/obj/item/seeds/berryseed" - species = "berry" - plantname = "Berry Bush" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/berries" - lifespan = 20 - endurance = 15 - maturation = 5 - production = 5 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/glowberryseed - name = "pack of glow-berry seeds" - desc = "These seeds grow into glow-berry bushes." - icon_state = "seed-glowberry" - mypath = "/obj/item/seeds/glowberryseed" - species = "glowberry" - plantname = "Glow-Berry Bush" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries" - lifespan = 30 - endurance = 25 - maturation = 5 - production = 5 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/bananaseed - name = "pack of banana seeds" - desc = "They're seeds that grow into banana trees." - icon_state = "seed-banana" - mypath = "/obj/item/seeds/bananaseed" - species = "banana" - plantname = "Banana Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/banana" - lifespan = 50 - endurance = 30 - maturation = 6 - production = 6 - yield = 3 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/eggplantseed - name = "pack of eggplant seeds" - desc = "These seeds grow to produce berries that look nothing like eggs." - icon_state = "seed-eggplant" - mypath = "/obj/item/seeds/eggplantseed" - species = "eggplant" - plantname = "Eggplants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant" - lifespan = 25 - endurance = 15 - maturation = 6 - production = 6 - yield = 2 - potency = 20 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/eggyseed - name = "pack of eggplant seeds" - desc = "These seeds grow to produce berries that look a lot like eggs." - icon_state = "seed-eggy" - mypath = "/obj/item/seeds/eggy" - species = "eggy" - plantname = "Eggplants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/egg" - lifespan = 75 - endurance = 15 - maturation = 6 - production = 12 - yield = 2 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/bloodtomatoseed - name = "pack of blood-tomato seeds" - desc = "These seeds grow into blood-tomato plants." - icon_state = "seed-bloodtomato" - mypath = "/obj/item/seeds/bloodtomatoseed" - species = "bloodtomato" - plantname = "Blood-Tomato Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato" - lifespan = 25 - endurance = 20 - maturation = 8 - production = 6 - yield = 3 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/tomatoseed - name = "pack of tomato seeds" - desc = "These seeds grow into tomato plants." - icon_state = "seed-tomato" - mypath = "/obj/item/seeds/tomatoseed" - species = "tomato" - plantname = "Tomato Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tomato" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 6 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/killertomatoseed - name = "pack of killer-tomato seeds" - desc = "These seeds grow into killer-tomato plants." - icon_state = "seed-killertomato" - mypath = "/obj/item/seeds/killertomatoseed" - species = "killertomato" - plantname = "Killer-Tomato Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 6 - yield = 2 - potency = 10 - plant_type = 0 - oneharvest = 1 - growthstages = 2 - -/obj/item/seeds/bluetomatoseed - name = "pack of blue-tomato seeds" - desc = "These seeds grow into blue-tomato plants." - icon_state = "seed-bluetomato" - mypath = "/obj/item/seeds/bluetomatoseed" - species = "bluetomato" - plantname = "Blue-Tomato Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 6 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/bluespacetomatoseed - name = "pack of blue-space tomato seeds" - desc = "These seeds grow into blue-space tomato plants." - icon_state = "seed-bluespacetomato" - mypath = "/obj/item/seeds/bluespacetomatoseed" - species = "bluespacetomato" - plantname = "Blue-Space Tomato Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 6 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/cornseed - name = "pack of corn seeds" - desc = "I don't mean to sound corny..." - icon_state = "seed-corn" - mypath = "/obj/item/seeds/cornseed" - species = "corn" - plantname = "Corn Stalks" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/corn" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 6 - yield = 3 - plant_type = 0 - oneharvest = 1 - potency = 20 - growthstages = 3 - -/obj/item/seeds/poppyseed - name = "pack of poppy seeds" - desc = "These seeds grow into poppies." - icon_state = "seed-poppy" - mypath = "/obj/item/seeds/poppyseed" - species = "poppy" - plantname = "Poppy Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/poppy" - lifespan = 25 - endurance = 10 - potency = 20 - maturation = 8 - production = 6 - yield = 6 - plant_type = 0 - oneharvest = 1 - growthstages = 3 - -/obj/item/seeds/potatoseed - name = "pack of potato seeds" - desc = "Boil 'em! Mash 'em! Stick 'em in a stew!" - icon_state = "seed-potato" - mypath = "/obj/item/seeds/potatoseed" - species = "potato" - plantname = "Potato-Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/potato" - lifespan = 30 - endurance = 15 - maturation = 10 - production = 1 - yield = 4 - plant_type = 0 - oneharvest = 1 - potency = 10 - growthstages = 4 - -/obj/item/seeds/icepepperseed - name = "pack of ice-pepper seeds" - desc = "These seeds grow into ice-pepper plants." - icon_state = "seed-icepepper" - mypath = "/obj/item/seeds/icepepperseed" - species = "chiliice" - plantname = "Ice-Pepper Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper" - lifespan = 25 - endurance = 15 - maturation = 4 - production = 4 - yield = 4 - potency = 20 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/soyaseed - name = "pack of soybean seeds" - desc = "These seeds grow into soybean plants." - icon_state = "seed-soybean" - mypath = "/obj/item/seeds/soyaseed" - species = "soybean" - plantname = "Soybean Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans" - lifespan = 25 - endurance = 15 - maturation = 4 - production = 4 - yield = 3 - potency = 5 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/wheatseed - name = "pack of wheat seeds" - desc = "These may, or may not, grow into weed." - icon_state = "seed-wheat" - mypath = "/obj/item/seeds/wheatseed" - species = "wheat" - plantname = "Wheat Stalks" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/wheat" - lifespan = 25 - endurance = 15 - maturation = 6 - production = 1 - yield = 4 - potency = 5 - oneharvest = 1 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/riceseed - name = "pack of rice seeds" - desc = "These seeds grow into rice stalks." - icon_state = "seed-rice" - mypath = "/obj/item/seeds/riceseed" - species = "rice" - plantname = "Rice Stalks" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ricestalk" - lifespan = 25 - endurance = 15 - maturation = 6 - production = 1 - yield = 4 - potency = 5 - oneharvest = 1 - plant_type = 0 - growthstages = 4 - -/obj/item/seeds/carrotseed - name = "pack of carrot seeds" - desc = "These seeds grow into carrots." - icon_state = "seed-carrot" - mypath = "/obj/item/seeds/carrotseed" - species = "carrot" - plantname = "Carrots" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/carrot" - lifespan = 25 - endurance = 15 - maturation = 10 - production = 1 - yield = 5 - potency = 10 - oneharvest = 1 - plant_type = 0 - growthstages = 3 - -/obj/item/seeds/reishimycelium - name = "pack of reishi mycelium" - desc = "This mycelium grows into something relaxing." - icon_state = "mycelium-reishi" - mypath = "/obj/item/seeds/reishimycelium" - species = "reishi" - plantname = "Reishi" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi" - lifespan = 35 - endurance = 35 - maturation = 10 - production = 5 - yield = 4 - potency = 15 // Sleeping based on potency? - oneharvest = 1 - growthstages = 4 - plant_type = 2 - -/obj/item/seeds/amanitamycelium - name = "pack of fly amanita mycelium" - desc = "This mycelium grows into something horrible." - icon_state = "mycelium-amanita" - mypath = "/obj/item/seeds/amanitamycelium" - species = "amanita" - plantname = "Fly Amanitas" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita" - lifespan = 50 - endurance = 35 - maturation = 10 - production = 5 - yield = 4 - potency = 10 // Damage based on potency? - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/angelmycelium - name = "pack of destroying angel mycelium" - desc = "This mycelium grows into something devestating." - icon_state = "mycelium-angel" - mypath = "/obj/item/seeds/angelmycelium" - species = "angel" - plantname = "Destroying Angels" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel" - lifespan = 50 - endurance = 35 - maturation = 12 - production = 5 - yield = 2 - potency = 35 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/libertymycelium - name = "pack of liberty-cap mycelium" - desc = "This mycelium grows into liberty-cap mushrooms." - icon_state = "mycelium-liberty" - mypath = "/obj/item/seeds/libertymycelium" - species = "liberty" - plantname = "Liberty-Caps" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap" - lifespan = 25 - endurance = 15 - maturation = 7 - production = 1 - yield = 5 - potency = 15 // Lowish potency at start - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/chantermycelium - name = "pack of chanterelle mycelium" - desc = "This mycelium grows into chanterelle mushrooms." - icon_state = "mycelium-chanter" - mypath = "/obj/item/seeds/chantermycelium" - species = "chanter" - plantname = "Chanterelle Mushrooms" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle" - lifespan = 35 - endurance = 20 - maturation = 7 - production = 1 - yield = 5 - potency = 1 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/towermycelium - name = "pack of tower-cap mycelium" - desc = "This mycelium grows into tower-cap mushrooms." - icon_state = "mycelium-tower" - mypath = "/obj/item/seeds/towermycelium" - species = "towercap" - plantname = "Tower Caps" - productname = "/obj/item/weapon/grown/log" - lifespan = 80 - endurance = 50 - maturation = 15 - production = 1 - yield = 5 - potency = 1 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/glowshroom - name = "pack of glowshroom mycelium" - desc = "This mycelium -glows- into mushrooms!" - icon_state = "mycelium-glowshroom" - mypath = "/obj/item/seeds/glowshroom" - species = "glowshroom" - plantname = "Glowshrooms" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom" - lifespan = 120 //ten times that is the delay - endurance = 30 - maturation = 15 - production = 1 - yield = 3 //-> spread - potency = 30 //-> brightness - oneharvest = 1 - growthstages = 4 - plant_type = 2 - -/obj/item/seeds/plumpmycelium - name = "pack of plump-helmet mycelium" - desc = "This mycelium grows into helmets... maybe." - icon_state = "mycelium-plump" - mypath = "/obj/item/seeds/plumpmycelium" - species = "plump" - plantname = "Plump-Helmet Mushrooms" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet" - lifespan = 25 - endurance = 15 - maturation = 8 - production = 1 - yield = 4 - potency = 0 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/walkingmushroommycelium - name = "pack of walking mushroom mycelium" - desc = "This mycelium will grow into huge stuff!" - icon_state = "mycelium-walkingmushroom" - mypath = "/obj/item/seeds/walkingmushroommycelium" - species = "walkingmushroom" - plantname = "Walking Mushrooms" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom" - lifespan = 30 - endurance = 30 - maturation = 5 - production = 1 - yield = 1 - potency = 0 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/nettleseed - name = "pack of nettle seeds" - desc = "These seeds grow into nettles." - icon_state = "seed-nettle" - mypath = "/obj/item/seeds/nettleseed" - species = "nettle" - plantname = "Nettles" - productname = "/obj/item/weapon/grown/nettle" - lifespan = 30 - endurance = 40 // tuff like a toiger - maturation = 6 - production = 6 - yield = 4 - potency = 10 - oneharvest = 0 - growthstages = 5 - plant_type = 1 - -/obj/item/seeds/deathnettleseed - name = "pack of death-nettle seeds" - desc = "These seeds grow into death-nettles." - icon_state = "seed-deathnettle" - mypath = "/obj/item/seeds/deathnettleseed" - species = "deathnettle" - plantname = "Death Nettles" - productname = "/obj/item/weapon/grown/deathnettle" - lifespan = 30 - endurance = 25 - maturation = 8 - production = 6 - yield = 2 - potency = 10 - oneharvest = 0 - growthstages = 5 - plant_type = 1 - -/obj/item/seeds/weeds - name = "pack of weed seeds" - desc = "Yo mang, want some weeds?" - icon_state = "seed" - mypath = "/obj/item/seeds/weeds" - species = "weeds" - plantname = "Starthistle" - productname = "" - lifespan = 100 - endurance = 50 // damm pesky weeds - maturation = 5 - production = 1 - yield = -1 - potency = -1 - oneharvest = 1 - growthstages = 4 - plant_type = 1 - -/obj/item/seeds/harebell - name = "pack of harebell seeds" - desc = "These seeds grow into pretty little flowers." - icon_state = "seed-harebell" - mypath = "/obj/item/seeds/harebell" - species = "harebell" - plantname = "Harebells" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/harebell" - lifespan = 100 - endurance = 20 - maturation = 7 - production = 1 - yield = 2 - potency = 1 - oneharvest = 1 - growthstages = 4 - plant_type = 1 - -/obj/item/seeds/sunflowerseed - name = "pack of sunflower seeds" - desc = "These seeds grow into sunflowers." - icon_state = "seed-sunflower" - mypath = "/obj/item/seeds/sunflowerseed" - species = "sunflower" - plantname = "Sunflowers" - productname = "/obj/item/weapon/grown/sunflower" - lifespan = 25 - endurance = 20 - maturation = 6 - production = 1 - yield = 2 - potency = 1 - oneharvest = 1 - growthstages = 3 - plant_type = 1 - -/obj/item/seeds/brownmold - name = "pack of brown mold" - desc = "Eww.. moldy." - icon_state = "seed" - mypath = "/obj/item/seeds/brownmold" - species = "mold" - plantname = "Brown Mold" - productname = "" - lifespan = 50 - endurance = 30 - maturation = 10 - production = 1 - yield = -1 - potency = 1 - oneharvest = 1 - growthstages = 3 - plant_type = 2 - -/obj/item/seeds/appleseed - name = "pack of apple seeds" - desc = "These seeds grow into apple trees." - icon_state = "seed-apple" - mypath = "/obj/item/seeds/appleseed" - species = "apple" - plantname = "Apple Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple" - lifespan = 55 - endurance = 35 - maturation = 6 - production = 6 - yield = 5 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/poisonedappleseed - name = "pack of apple seeds" - desc = "These seeds grow into apple trees." - icon_state = "seed-apple" - mypath = "/obj/item/seeds/poisonedappleseed" - species = "apple" - plantname = "Apple Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned" - lifespan = 55 - endurance = 35 - maturation = 6 - production = 6 - yield = 5 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/goldappleseed - name = "pack of golden apple seeds" - desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space." - icon_state = "seed-goldapple" - mypath = "/obj/item/seeds/goldappleseed" - species = "goldapple" - plantname = "Golden Apple Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple" - lifespan = 55 - endurance = 35 - maturation = 10 - production = 10 - yield = 3 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/ambrosiavulgarisseed - name = "pack of ambrosia vulgaris seeds" - desc = "These seeds grow into common ambrosia, a plant grown by and from medicine." - icon_state = "seed-ambrosiavulgaris" - mypath = "/obj/item/seeds/ambrosiavulgarisseed" - species = "ambrosiavulgaris" - plantname = "Ambrosia Vulgaris" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris" - lifespan = 60 - endurance = 25 - maturation = 6 - production = 6 - yield = 6 - potency = 5 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/ambrosiadeusseed - name = "pack of ambrosia deus seeds" - desc = "These seeds grow into ambrosia deus. Could it be the food of the gods..?" - icon_state = "seed-ambrosiadeus" - mypath = "/obj/item/seeds/ambrosiadeusseed" - species = "ambrosiadeus" - plantname = "Ambrosia Deus" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus" - lifespan = 60 - endurance = 25 - maturation = 6 - production = 6 - yield = 6 - potency = 5 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/whitebeetseed - name = "pack of white-beet seeds" - desc = "These seeds grow into sugary beet producing plants." - icon_state = "seed-whitebeet" - mypath = "/obj/item/seeds/whitebeetseed" - species = "whitebeet" - plantname = "White-Beet Plants" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet" - lifespan = 60 - endurance = 50 - maturation = 6 - production = 6 - yield = 6 - oneharvest = 1 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/sugarcaneseed - name = "pack of sugarcane seeds" - desc = "These seeds grow into sugarcane." - icon_state = "seed-sugarcane" - mypath = "/obj/item/seeds/sugarcaneseed" - species = "sugarcane" - plantname = "Sugarcane" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane" - lifespan = 60 - endurance = 50 - maturation = 3 - production = 6 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 3 - -/obj/item/seeds/watermelonseed - name = "pack of watermelon seeds" - desc = "These seeds grow into watermelon plants." - icon_state = "seed-watermelon" - mypath = "/obj/item/seeds/watermelonseed" - species = "watermelon" - plantname = "Watermelon Vines" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon" - lifespan = 50 - endurance = 40 - maturation = 6 - production = 6 - yield = 3 - potency = 1 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/pumpkinseed - name = "pack of pumpkin seeds" - desc = "These seeds grow into pumpkin vines." - icon_state = "seed-pumpkin" - mypath = "/obj/item/seeds/pumpkinseed" - species = "pumpkin" - plantname = "Pumpkin Vines" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin" - lifespan = 50 - endurance = 40 - maturation = 6 - production = 6 - yield = 3 - potency = 10 - plant_type = 0 - growthstages = 3 - - -/obj/item/seeds/limeseed - name = "pack of lime seeds" - desc = "These are very sour seeds." - icon_state = "seed-lime" - mypath = "/obj/item/seeds/limeseed" - species = "lime" - plantname = "Lime Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/lime" - lifespan = 55 - endurance = 50 - maturation = 6 - production = 6 - yield = 4 - potency = 15 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/lemonseed - name = "pack of lemon seeds" - desc = "These are sour seeds." - icon_state = "seed-lemon" - mypath = "/obj/item/seeds/lemonseed" - species = "lemon" - plantname = "Lemon Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/lemon" - lifespan = 55 - endurance = 45 - maturation = 6 - production = 6 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/cashseed - name = "pack of money seeds" - desc = "When life gives you lemons, mutate them into cash." - icon_state = "seed-cash" - mypath = "/obj/item/seeds/cashseed" - species = "cashtree" - plantname = "Money Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/money" - lifespan = 55 - endurance = 45 - maturation = 6 - production = 6 - yield = 4 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/orangeseed - name = "pack of orange seed" - desc = "Sour seeds." - icon_state = "seed-orange" - mypath = "/obj/item/seeds/orangeseed" - species = "orange" - plantname = "Orange Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/orange" - lifespan = 60 - endurance = 50 - maturation = 6 - production = 6 - yield = 5 - potency = 1 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/poisonberryseed - name = "pack of poison-berry seeds" - desc = "These seeds grow into poison-berry bushes." - icon_state = "seed-poisonberry" - mypath = "/obj/item/seeds/poisonberryseed" - species = "poisonberry" - plantname = "Poison-Berry Bush" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries" - lifespan = 20 - endurance = 15 - maturation = 5 - production = 5 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/deathberryseed - name = "pack of death-berry seeds" - desc = "These seeds grow into death berries." - icon_state = "seed-deathberry" - mypath = "/obj/item/seeds/deathberryseed" - species = "deathberry" - plantname = "Death Berry Bush" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries" - lifespan = 30 - endurance = 20 - maturation = 5 - production = 5 - yield = 3 - potency = 50 - plant_type = 0 - growthstages = 6 - -/obj/item/seeds/grassseed - name = "pack of grass seeds" - desc = "These seeds grow into grass. Yummy!" - icon_state = "seed-grass" - mypath = "/obj/item/seeds/grassseed" - species = "grass" - plantname = "Grass" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/grass" - lifespan = 60 - endurance = 50 - maturation = 2 - production = 5 - yield = 5 - plant_type = 0 - growthstages = 2 - -/obj/item/seeds/cocoapodseed - name = "pack of cocoa pod seeds" - desc = "These seeds grow into cacao trees. They look fattening." //SIC: cocoa is the seeds. The tress ARE spelled cacao. - icon_state = "seed-cocoapod" - mypath = "/obj/item/seeds/cocoapodseed" - species = "cocoapod" - plantname = "Cocao Tree" //SIC: see above - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod" - lifespan = 20 - endurance = 15 - maturation = 5 - production = 5 - yield = 2 - potency = 10 - plant_type = 0 - growthstages = 5 - -/obj/item/seeds/cherryseed - name = "pack of cherry pits" - desc = "Careful not to crack a tooth on one... That'd be the pits." - icon_state = "seed-cherry" - mypath = "/obj/item/seeds/cherryseed" - species = "cherry" - plantname = "Cherry Tree" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cherries" - lifespan = 35 - endurance = 35 - maturation = 5 - production = 5 - yield = 3 - potency = 10 - plant_type = 0 - growthstages = 5 - -/obj/item/seeds/kudzuseed - name = "pack of kudzu seeds" - desc = "These seeds grow into a weed that grows incredibly fast." - icon_state = "seed-kudzu" - mypath = "/obj/item/seeds/kudzuseed" - species = "kudzu" - plantname = "Kudzu" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod" - lifespan = 20 - endurance = 10 - maturation = 6 - production = 6 - yield = 4 - potency = 10 - growthstages = 4 - plant_type = 1 - -/obj/item/seeds/kudzuseed/attack_self(mob/user as mob) - if(istype(user.loc,/turf/space)) - return - user << "You plant the kudzu. You monster." - new /obj/effect/spacevine_controller(user.loc) - del(src) - - - -/* // Maybe one day when I get it to work like a grenade which exlodes gibs. -/obj/item/seeds/gibtomatoseed - name = "Gib Tomato seeds" - desc = "Used to grow gib tomotoes." - icon_state = "seed-gibtomato" - mypath = "/obj/item/seeds/gibtomatoseed" - species = "gibtomato" - plantname = "Gib Tomato plant" - productname = "/obj/item/weapon/grown/gibtomato" - lifespan = 35 - endurance = 25 - maturation = 6 - production = 6 - yield = 3 - potency = 10 - plant_type = 0 - growthstages = 6 -*/ - -/* -/obj/item/seeds/ - name = "" - icon_state = "seed" - mypath = "/obj/item/seeds/" - species = "" - plantname = "" - productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/" - lifespan = 25 - endurance = 15 - maturation = 10 - production = 1 - yield = -1 - potency = 0 - oneharvest = 1 - growthstages = 3 - plant_type = 0 - -*/ - -// *****************oolokitthesefancystars******** -// Grown FOOD types moved to reagents -// ********************** - -// ********************** -// Other harvested materials from plants (that are not food) -// ********************** - -/obj/item/weapon/grown // Grown weapons - name = "grown_weapon" - icon = 'icons/obj/weapons.dmi' - var/seed = "" - var/plantname = "" - var/productname = "" - var/species = "" - var/lifespan = 20 - var/endurance = 15 - var/maturation = 7 - var/production = 7 - var/yield = 2 - var/potency = 1 - var/plant_type = 0 - New() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src - -/obj/item/weapon/grown/proc/changePotency(newValue) //-QualityVan - potency = newValue - -/obj/item/weapon/grown/log - name = "tower-cap log" - desc = "It's better than bad, it's good!" - icon = 'icons/obj/harvest.dmi' - icon_state = "logs" - force = 5 - flags = TABLEPASS - throwforce = 5 - w_class = 3.0 - throw_speed = 3 - throw_range = 3 - plant_type = 2 - origin_tech = "materials=1" - seed = "/obj/item/seeds/towermycelium" - attack_verb = list("bashed", "battered", "bludgeoned", "whacked") - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy)) - user.show_message("You make planks out of \the [src]!", 1) - for(var/i=0,i<2,i++) - var/obj/item/stack/sheet/wood/NG = new (user.loc) - for (var/obj/item/stack/sheet/wood/G in user.loc) - if(G==NG) - continue - if(G.amount>=G.max_amount) - continue - G.attackby(NG, user) - usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks." - del(src) - return - - -/obj/item/weapon/grown/sunflower // FLOWER POWER! - name = "sunflower" - desc = "It's beautiful! A certain person might beat you to death if you trample these." - icon = 'icons/obj/harvest.dmi' - icon_state = "sunflower" - damtype = "fire" - force = 0 - flags = TABLEPASS - throwforce = 1 - w_class = 1.0 - throw_speed = 1 - throw_range = 3 - plant_type = 1 - seed = "/obj/item/seeds/sunflower" -/* -/obj/item/weapon/grown/gibtomato - desc = "A plump tomato." - icon = 'icons/obj/harvest.dmi' - name = "Gib Tomato" - icon_state = "gibtomato" - damtype = "fire" - force = 0 - flags = TABLEPASS - throwforce = 1 - w_class = 2.0 - throw_speed = 1 - throw_range = 3 - plant_type = 1 - seed = "/obj/item/seeds/gibtomato" - New() - ..() - - -/obj/item/weapon/grown/gibtomato/New() - ..() - src.gibs = new /obj/effect/gibspawner/human(get_turf(src)) - src.gibs.attach(src) - src.smoke.set_up(10, 0, usr.loc) -*/ -/obj/item/weapon/grown/nettle // -- Skie - desc = "It's probably not wise to touch it with bare hands..." - icon = 'icons/obj/weapons.dmi' - name = "nettle" - icon_state = "nettle" - damtype = "fire" - force = 15 - flags = TABLEPASS - throwforce = 1 - w_class = 2.0 - throw_speed = 1 - throw_range = 3 - plant_type = 1 - origin_tech = "combat=1" - seed = "/obj/item/seeds/nettleseed" - New() - ..() - spawn(5) //So potency can be set in the proc that creates these crops - reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) - reagents.add_reagent("sacid", round(potency, 1)) - force = round((5+potency/5), 1) - -/obj/item/weapon/grown/deathnettle // -- Skie - desc = "The \red glowing \black nettle incites \redrage\black in you just from looking at it!" - icon = 'icons/obj/weapons.dmi' - name = "deathnettle" - icon_state = "deathnettle" - damtype = "fire" - force = 30 - flags = TABLEPASS - throwforce = 1 - w_class = 2.0 - throw_speed = 1 - throw_range = 3 - plant_type = 1 - seed = "/obj/item/seeds/deathnettleseed" - origin_tech = "combat=3" - attack_verb = list("stung") - New() - ..() - spawn(5) //So potency can be set in the proc that creates these crops - reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) - reagents.add_reagent("pacid", round(potency, 1)) - force = round((5+potency/2.5), 1) - - suicide_act(mob/user) - viewers(user) << "\red [user] is eating some of the [src.name]! It looks like \he's trying to commit suicide." - return (BRUTELOSS|TOXLOSS) - -// ************************************* -// Pestkiller defines for hydroponics -// ************************************* - -/obj/item/pestkiller - name = "bottle of pestkiller" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - var/toxicity = 0 - var/PestKillStr = 0 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/pestkiller/carbaryl - name = "bottle of carbaryl" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - toxicity = 4 - PestKillStr = 2 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/pestkiller/lindane - name = "bottle of lindane" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle18" - flags = FPRINT | TABLEPASS - toxicity = 6 - PestKillStr = 4 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/pestkiller/phosmet - name = "bottle of phosmet" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle15" - flags = FPRINT | TABLEPASS - toxicity = 8 - PestKillStr = 7 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -// ************************************* -// Hydroponics Tools -// ************************************* - -/obj/item/weapon/weedspray // -- Skie - desc = "It's a toxic mixture, in spray form, to kill small weeds." - icon = 'icons/obj/hydroponics.dmi' - name = "weed-spray" - icon_state = "weedspray" - item_state = "spray" - flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON - slot_flags = SLOT_BELT - throwforce = 4 - w_class = 2.0 - throw_speed = 2 - throw_range = 10 - var/toxicity = 4 - var/WeedKillStr = 2 - - suicide_act(mob/user) - viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide." - return (TOXLOSS) - -/obj/item/weapon/pestspray // -- Skie - desc = "It's some pest eliminator spray! Do not inhale!" - icon = 'icons/obj/hydroponics.dmi' - name = "pest-spray" - icon_state = "pestspray" - item_state = "spray" - flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON - slot_flags = SLOT_BELT - throwforce = 4 - w_class = 2.0 - throw_speed = 2 - throw_range = 10 - var/toxicity = 4 - var/PestKillStr = 2 - - suicide_act(mob/user) - viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide." - return (TOXLOSS) - -/obj/item/weapon/minihoe // -- Numbers - name = "mini hoe" - desc = "It's used for removing weeds or scratching your back." - icon = 'icons/obj/weapons.dmi' - icon_state = "hoe" - item_state = "hoe" - flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON - force = 5.0 - throwforce = 7.0 - w_class = 2.0 - m_amt = 50 - attack_verb = list("slashed", "sliced", "cut", "clawed") - -// ************************************* -// Weedkiller defines for hydroponics -// ************************************* - -/obj/item/weedkiller - name = "bottle of weedkiller" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - var/toxicity = 0 - var/WeedKillStr = 0 - -/obj/item/weedkiller/triclopyr - name = "bottle of glyphosate" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - toxicity = 4 - WeedKillStr = 2 - -/obj/item/weedkiller/lindane - name = "bottle of triclopyr" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle18" - flags = FPRINT | TABLEPASS - toxicity = 6 - WeedKillStr = 4 - -/obj/item/weedkiller/D24 - name = "bottle of 2,4-D" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle15" - flags = FPRINT | TABLEPASS - toxicity = 8 - WeedKillStr = 7 - -// ************************************* -// Nutrient defines for hydroponics -// ************************************* - -/obj/item/nutrient - name = "bottle of nutrient" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - w_class = 2.0 - var/mutmod = 0 - var/yieldmod = 0 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/nutrient/ez - name = "bottle of E-Z-Nutrient" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = FPRINT | TABLEPASS - mutmod = 1 - yieldmod = 1 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/nutrient/l4z - name = "bottle of Left 4 Zed" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle18" - flags = FPRINT | TABLEPASS - mutmod = 2 - yieldmod = 0 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - -/obj/item/nutrient/rh - name = "bottle of Robust Harvest" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle15" - flags = FPRINT | TABLEPASS - mutmod = 0 - yieldmod = 2 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - - +// ******************************************************** +// Here's all the seeds (plants) that can be used in hydro +// ******************************************************** + +/obj/item/seeds + name = "pack of seeds" + icon = 'icons/obj/seeds.dmi' + icon_state = "seed" // unknown plant seed - these shouldn't exist in-game + flags = FPRINT | TABLEPASS + w_class = 2.0 // Makes them pocketable + var/mypath = "/obj/item/seeds" + var/plantname = "Plants" + var/productname = "" + var/species = "" + var/lifespan = 0 + var/endurance = 0 + var/maturation = 0 + var/production = 0 + var/yield = 0 // If is -1, the plant/shroom/weed is never meant to be harvested + var/oneharvest = 0 + var/potency = -1 + var/growthstages = 0 + var/plant_type = 0 // 0 = 'normal plant'; 1 = weed; 2 = shroom + +/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob) + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "*** [plantname] ***" + user << "-Plant Endurance: \blue [endurance]" + user << "-Plant Lifespan: \blue [lifespan]" + if(yield != -1) + user << "-Plant Yield: \blue [yield]" + user << "-Plant Production: \blue [production]" + if(potency != -1) + user << "-Plant Potency: \blue [potency]" + return + ..() // Fallthrough to item/attackby() so that bags can pick seeds up + + +/obj/item/seeds/chiliseed + name = "pack of chili seeds" + desc = "These seeds grow into chili plants. HOT! HOT! HOT!" + icon_state = "seed-chili" + mypath = "/obj/item/seeds/chiliseed" + species = "chili" + plantname = "Chili Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/chili" + lifespan = 20 + endurance = 15 + maturation = 5 + production = 5 + yield = 4 + potency = 20 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/plastiseed + name = "plastellium mycelium" + desc = "This mycelium grows into Plastellium" + icon_state = "mycelium-plast" + mypath = "/obj/item/seeds/plastiseed" + species = "plastellium" + plantname = "Plastellium" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/plastellium" + lifespan = 15 + endurance = 17 + maturation = 5 + production = 6 + yield = 6 + oneharvest = 1 + potency = 20 + plant_type = 2 + growthstages = 3 + +/obj/item/seeds/grapeseed + name = "pack of grape seeds" + desc = "These seeds grow into grape vines." + icon_state = "seed-grapes" + mypath = "/obj/item/seeds/grapeseed" + species = "grape" + plantname = "Grape Vine" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/grapes" + lifespan = 50 + endurance = 25 + maturation = 3 + production = 5 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 2 + +/obj/item/seeds/greengrapeseed + name = "pack of green grape seeds" + desc = "These seeds grow into green-grape vines." + icon_state = "seed-greengrapes" + mypath = "/obj/item/seeds/greengrapeseed" + species = "greengrape" + plantname = "Green-Grape Vine" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes" + lifespan = 50 + endurance = 25 + maturation = 3 + production = 5 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 2 + +/obj/item/seeds/peanutseed + name = "pack of peanut seeds" + desc = "These seeds grow into peanut vines." + icon_state = "seed-peanut" + mypath = "/obj/item/seeds/peanutseed" + species = "peanut" + plantname = "Peanuts" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/peanut" + lifespan = 55 + endurance = 50 + maturation = 6 + production = 6 + yield = 6 + potency = 10 + plant_type = 0 + growthstages = 6 + + +/obj/item/seeds/cabbageseed + name = "pack of cabbage seeds" + desc = "These seeds grow into cabbages." + icon_state = "seed-cabbage" + mypath = "/obj/item/seeds/cabbageseed" + species = "cabbage" + plantname = "Cabbages" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage" + lifespan = 50 + endurance = 25 + maturation = 3 + production = 5 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 1 + +/obj/item/seeds/shandseed + name = "pack of s'rendarr's hand seeds" + desc = "These seeds grow into a helpful herb called S'Rendarr's Hand, native to Ahdomai." + icon_state = "seed-shand" + mypath = "/obj/item/seeds/shandseed" + species = "shand" + plantname = "S'Rendarr's Hand" + productname = "/obj/item/stack/medical/bruise_pack/tajaran" + lifespan = 50 + endurance = 25 + maturation = 3 + production = 5 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 3 + +/obj/item/seeds/mtearseed + name = "pack of messa's tear seeds" + desc = "These seeds grow into a helpful herb called Messa's Tear, native to Ahdomai." + icon_state = "seed-mtear" + mypath = "/obj/item/seeds/mtearseed" + species = "mtear" + plantname = "Messa's Tear" + productname = "/obj/item/stack/medical/ointment/tajaran" + lifespan = 50 + endurance = 25 + maturation = 3 + production = 5 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 3 + +/obj/item/seeds/berryseed + name = "pack of berry seeds" + desc = "These seeds grow into berry bushes." + icon_state = "seed-berry" + mypath = "/obj/item/seeds/berryseed" + species = "berry" + plantname = "Berry Bush" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/berries" + lifespan = 20 + endurance = 15 + maturation = 5 + production = 5 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/glowberryseed + name = "pack of glow-berry seeds" + desc = "These seeds grow into glow-berry bushes." + icon_state = "seed-glowberry" + mypath = "/obj/item/seeds/glowberryseed" + species = "glowberry" + plantname = "Glow-Berry Bush" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries" + lifespan = 30 + endurance = 25 + maturation = 5 + production = 5 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/bananaseed + name = "pack of banana seeds" + desc = "They're seeds that grow into banana trees." + icon_state = "seed-banana" + mypath = "/obj/item/seeds/bananaseed" + species = "banana" + plantname = "Banana Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/banana" + lifespan = 50 + endurance = 30 + maturation = 6 + production = 6 + yield = 3 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/eggplantseed + name = "pack of eggplant seeds" + desc = "These seeds grow to produce berries that look nothing like eggs." + icon_state = "seed-eggplant" + mypath = "/obj/item/seeds/eggplantseed" + species = "eggplant" + plantname = "Eggplants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant" + lifespan = 25 + endurance = 15 + maturation = 6 + production = 6 + yield = 2 + potency = 20 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/eggyseed + name = "pack of eggplant seeds" + desc = "These seeds grow to produce berries that look a lot like eggs." + icon_state = "seed-eggy" + mypath = "/obj/item/seeds/eggy" + species = "eggy" + plantname = "Eggplants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/egg" + lifespan = 75 + endurance = 15 + maturation = 6 + production = 12 + yield = 2 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/bloodtomatoseed + name = "pack of blood-tomato seeds" + desc = "These seeds grow into blood-tomato plants." + icon_state = "seed-bloodtomato" + mypath = "/obj/item/seeds/bloodtomatoseed" + species = "bloodtomato" + plantname = "Blood-Tomato Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato" + lifespan = 25 + endurance = 20 + maturation = 8 + production = 6 + yield = 3 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/tomatoseed + name = "pack of tomato seeds" + desc = "These seeds grow into tomato plants." + icon_state = "seed-tomato" + mypath = "/obj/item/seeds/tomatoseed" + species = "tomato" + plantname = "Tomato Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tomato" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 6 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/killertomatoseed + name = "pack of killer-tomato seeds" + desc = "These seeds grow into killer-tomato plants." + icon_state = "seed-killertomato" + mypath = "/obj/item/seeds/killertomatoseed" + species = "killertomato" + plantname = "Killer-Tomato Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 6 + yield = 2 + potency = 10 + plant_type = 0 + oneharvest = 1 + growthstages = 2 + +/obj/item/seeds/bluetomatoseed + name = "pack of blue-tomato seeds" + desc = "These seeds grow into blue-tomato plants." + icon_state = "seed-bluetomato" + mypath = "/obj/item/seeds/bluetomatoseed" + species = "bluetomato" + plantname = "Blue-Tomato Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 6 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/bluespacetomatoseed + name = "pack of blue-space tomato seeds" + desc = "These seeds grow into blue-space tomato plants." + icon_state = "seed-bluespacetomato" + mypath = "/obj/item/seeds/bluespacetomatoseed" + species = "bluespacetomato" + plantname = "Blue-Space Tomato Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 6 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/cornseed + name = "pack of corn seeds" + desc = "I don't mean to sound corny..." + icon_state = "seed-corn" + mypath = "/obj/item/seeds/cornseed" + species = "corn" + plantname = "Corn Stalks" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/corn" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 6 + yield = 3 + plant_type = 0 + oneharvest = 1 + potency = 20 + growthstages = 3 + +/obj/item/seeds/poppyseed + name = "pack of poppy seeds" + desc = "These seeds grow into poppies." + icon_state = "seed-poppy" + mypath = "/obj/item/seeds/poppyseed" + species = "poppy" + plantname = "Poppy Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/poppy" + lifespan = 25 + endurance = 10 + potency = 20 + maturation = 8 + production = 6 + yield = 6 + plant_type = 0 + oneharvest = 1 + growthstages = 3 + +/obj/item/seeds/potatoseed + name = "pack of potato seeds" + desc = "Boil 'em! Mash 'em! Stick 'em in a stew!" + icon_state = "seed-potato" + mypath = "/obj/item/seeds/potatoseed" + species = "potato" + plantname = "Potato-Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/potato" + lifespan = 30 + endurance = 15 + maturation = 10 + production = 1 + yield = 4 + plant_type = 0 + oneharvest = 1 + potency = 10 + growthstages = 4 + +/obj/item/seeds/icepepperseed + name = "pack of ice-pepper seeds" + desc = "These seeds grow into ice-pepper plants." + icon_state = "seed-icepepper" + mypath = "/obj/item/seeds/icepepperseed" + species = "chiliice" + plantname = "Ice-Pepper Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper" + lifespan = 25 + endurance = 15 + maturation = 4 + production = 4 + yield = 4 + potency = 20 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/soyaseed + name = "pack of soybean seeds" + desc = "These seeds grow into soybean plants." + icon_state = "seed-soybean" + mypath = "/obj/item/seeds/soyaseed" + species = "soybean" + plantname = "Soybean Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans" + lifespan = 25 + endurance = 15 + maturation = 4 + production = 4 + yield = 3 + potency = 5 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/wheatseed + name = "pack of wheat seeds" + desc = "These may, or may not, grow into weed." + icon_state = "seed-wheat" + mypath = "/obj/item/seeds/wheatseed" + species = "wheat" + plantname = "Wheat Stalks" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/wheat" + lifespan = 25 + endurance = 15 + maturation = 6 + production = 1 + yield = 4 + potency = 5 + oneharvest = 1 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/riceseed + name = "pack of rice seeds" + desc = "These seeds grow into rice stalks." + icon_state = "seed-rice" + mypath = "/obj/item/seeds/riceseed" + species = "rice" + plantname = "Rice Stalks" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ricestalk" + lifespan = 25 + endurance = 15 + maturation = 6 + production = 1 + yield = 4 + potency = 5 + oneharvest = 1 + plant_type = 0 + growthstages = 4 + +/obj/item/seeds/carrotseed + name = "pack of carrot seeds" + desc = "These seeds grow into carrots." + icon_state = "seed-carrot" + mypath = "/obj/item/seeds/carrotseed" + species = "carrot" + plantname = "Carrots" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/carrot" + lifespan = 25 + endurance = 15 + maturation = 10 + production = 1 + yield = 5 + potency = 10 + oneharvest = 1 + plant_type = 0 + growthstages = 3 + +/obj/item/seeds/reishimycelium + name = "pack of reishi mycelium" + desc = "This mycelium grows into something relaxing." + icon_state = "mycelium-reishi" + mypath = "/obj/item/seeds/reishimycelium" + species = "reishi" + plantname = "Reishi" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi" + lifespan = 35 + endurance = 35 + maturation = 10 + production = 5 + yield = 4 + potency = 15 // Sleeping based on potency? + oneharvest = 1 + growthstages = 4 + plant_type = 2 + +/obj/item/seeds/amanitamycelium + name = "pack of fly amanita mycelium" + desc = "This mycelium grows into something horrible." + icon_state = "mycelium-amanita" + mypath = "/obj/item/seeds/amanitamycelium" + species = "amanita" + plantname = "Fly Amanitas" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita" + lifespan = 50 + endurance = 35 + maturation = 10 + production = 5 + yield = 4 + potency = 10 // Damage based on potency? + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/angelmycelium + name = "pack of destroying angel mycelium" + desc = "This mycelium grows into something devestating." + icon_state = "mycelium-angel" + mypath = "/obj/item/seeds/angelmycelium" + species = "angel" + plantname = "Destroying Angels" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel" + lifespan = 50 + endurance = 35 + maturation = 12 + production = 5 + yield = 2 + potency = 35 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/libertymycelium + name = "pack of liberty-cap mycelium" + desc = "This mycelium grows into liberty-cap mushrooms." + icon_state = "mycelium-liberty" + mypath = "/obj/item/seeds/libertymycelium" + species = "liberty" + plantname = "Liberty-Caps" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap" + lifespan = 25 + endurance = 15 + maturation = 7 + production = 1 + yield = 5 + potency = 15 // Lowish potency at start + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/chantermycelium + name = "pack of chanterelle mycelium" + desc = "This mycelium grows into chanterelle mushrooms." + icon_state = "mycelium-chanter" + mypath = "/obj/item/seeds/chantermycelium" + species = "chanter" + plantname = "Chanterelle Mushrooms" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle" + lifespan = 35 + endurance = 20 + maturation = 7 + production = 1 + yield = 5 + potency = 1 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/towermycelium + name = "pack of tower-cap mycelium" + desc = "This mycelium grows into tower-cap mushrooms." + icon_state = "mycelium-tower" + mypath = "/obj/item/seeds/towermycelium" + species = "towercap" + plantname = "Tower Caps" + productname = "/obj/item/weapon/grown/log" + lifespan = 80 + endurance = 50 + maturation = 15 + production = 1 + yield = 5 + potency = 1 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/glowshroom + name = "pack of glowshroom mycelium" + desc = "This mycelium -glows- into mushrooms!" + icon_state = "mycelium-glowshroom" + mypath = "/obj/item/seeds/glowshroom" + species = "glowshroom" + plantname = "Glowshrooms" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom" + lifespan = 120 //ten times that is the delay + endurance = 30 + maturation = 15 + production = 1 + yield = 3 //-> spread + potency = 30 //-> brightness + oneharvest = 1 + growthstages = 4 + plant_type = 2 + +/obj/item/seeds/plumpmycelium + name = "pack of plump-helmet mycelium" + desc = "This mycelium grows into helmets... maybe." + icon_state = "mycelium-plump" + mypath = "/obj/item/seeds/plumpmycelium" + species = "plump" + plantname = "Plump-Helmet Mushrooms" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet" + lifespan = 25 + endurance = 15 + maturation = 8 + production = 1 + yield = 4 + potency = 0 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/walkingmushroommycelium + name = "pack of walking mushroom mycelium" + desc = "This mycelium will grow into huge stuff!" + icon_state = "mycelium-walkingmushroom" + mypath = "/obj/item/seeds/walkingmushroommycelium" + species = "walkingmushroom" + plantname = "Walking Mushrooms" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom" + lifespan = 30 + endurance = 30 + maturation = 5 + production = 1 + yield = 1 + potency = 0 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/nettleseed + name = "pack of nettle seeds" + desc = "These seeds grow into nettles." + icon_state = "seed-nettle" + mypath = "/obj/item/seeds/nettleseed" + species = "nettle" + plantname = "Nettles" + productname = "/obj/item/weapon/grown/nettle" + lifespan = 30 + endurance = 40 // tuff like a toiger + maturation = 6 + production = 6 + yield = 4 + potency = 10 + oneharvest = 0 + growthstages = 5 + plant_type = 1 + +/obj/item/seeds/deathnettleseed + name = "pack of death-nettle seeds" + desc = "These seeds grow into death-nettles." + icon_state = "seed-deathnettle" + mypath = "/obj/item/seeds/deathnettleseed" + species = "deathnettle" + plantname = "Death Nettles" + productname = "/obj/item/weapon/grown/deathnettle" + lifespan = 30 + endurance = 25 + maturation = 8 + production = 6 + yield = 2 + potency = 10 + oneharvest = 0 + growthstages = 5 + plant_type = 1 + +/obj/item/seeds/weeds + name = "pack of weed seeds" + desc = "Yo mang, want some weeds?" + icon_state = "seed" + mypath = "/obj/item/seeds/weeds" + species = "weeds" + plantname = "Starthistle" + productname = "" + lifespan = 100 + endurance = 50 // damm pesky weeds + maturation = 5 + production = 1 + yield = -1 + potency = -1 + oneharvest = 1 + growthstages = 4 + plant_type = 1 + +/obj/item/seeds/harebell + name = "pack of harebell seeds" + desc = "These seeds grow into pretty little flowers." + icon_state = "seed-harebell" + mypath = "/obj/item/seeds/harebell" + species = "harebell" + plantname = "Harebells" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/harebell" + lifespan = 100 + endurance = 20 + maturation = 7 + production = 1 + yield = 2 + potency = 1 + oneharvest = 1 + growthstages = 4 + plant_type = 1 + +/obj/item/seeds/sunflowerseed + name = "pack of sunflower seeds" + desc = "These seeds grow into sunflowers." + icon_state = "seed-sunflower" + mypath = "/obj/item/seeds/sunflowerseed" + species = "sunflower" + plantname = "Sunflowers" + productname = "/obj/item/weapon/grown/sunflower" + lifespan = 25 + endurance = 20 + maturation = 6 + production = 1 + yield = 2 + potency = 1 + oneharvest = 1 + growthstages = 3 + plant_type = 1 + +/obj/item/seeds/brownmold + name = "pack of brown mold" + desc = "Eww.. moldy." + icon_state = "seed" + mypath = "/obj/item/seeds/brownmold" + species = "mold" + plantname = "Brown Mold" + productname = "" + lifespan = 50 + endurance = 30 + maturation = 10 + production = 1 + yield = -1 + potency = 1 + oneharvest = 1 + growthstages = 3 + plant_type = 2 + +/obj/item/seeds/appleseed + name = "pack of apple seeds" + desc = "These seeds grow into apple trees." + icon_state = "seed-apple" + mypath = "/obj/item/seeds/appleseed" + species = "apple" + plantname = "Apple Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple" + lifespan = 55 + endurance = 35 + maturation = 6 + production = 6 + yield = 5 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/poisonedappleseed + name = "pack of apple seeds" + desc = "These seeds grow into apple trees." + icon_state = "seed-apple" + mypath = "/obj/item/seeds/poisonedappleseed" + species = "apple" + plantname = "Apple Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned" + lifespan = 55 + endurance = 35 + maturation = 6 + production = 6 + yield = 5 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/goldappleseed + name = "pack of golden apple seeds" + desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space." + icon_state = "seed-goldapple" + mypath = "/obj/item/seeds/goldappleseed" + species = "goldapple" + plantname = "Golden Apple Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple" + lifespan = 55 + endurance = 35 + maturation = 10 + production = 10 + yield = 3 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/ambrosiavulgarisseed + name = "pack of ambrosia vulgaris seeds" + desc = "These seeds grow into common ambrosia, a plant grown by and from medicine." + icon_state = "seed-ambrosiavulgaris" + mypath = "/obj/item/seeds/ambrosiavulgarisseed" + species = "ambrosiavulgaris" + plantname = "Ambrosia Vulgaris" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris" + lifespan = 60 + endurance = 25 + maturation = 6 + production = 6 + yield = 6 + potency = 5 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/ambrosiadeusseed + name = "pack of ambrosia deus seeds" + desc = "These seeds grow into ambrosia deus. Could it be the food of the gods..?" + icon_state = "seed-ambrosiadeus" + mypath = "/obj/item/seeds/ambrosiadeusseed" + species = "ambrosiadeus" + plantname = "Ambrosia Deus" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus" + lifespan = 60 + endurance = 25 + maturation = 6 + production = 6 + yield = 6 + potency = 5 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/whitebeetseed + name = "pack of white-beet seeds" + desc = "These seeds grow into sugary beet producing plants." + icon_state = "seed-whitebeet" + mypath = "/obj/item/seeds/whitebeetseed" + species = "whitebeet" + plantname = "White-Beet Plants" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet" + lifespan = 60 + endurance = 50 + maturation = 6 + production = 6 + yield = 6 + oneharvest = 1 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/sugarcaneseed + name = "pack of sugarcane seeds" + desc = "These seeds grow into sugarcane." + icon_state = "seed-sugarcane" + mypath = "/obj/item/seeds/sugarcaneseed" + species = "sugarcane" + plantname = "Sugarcane" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane" + lifespan = 60 + endurance = 50 + maturation = 3 + production = 6 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 3 + +/obj/item/seeds/watermelonseed + name = "pack of watermelon seeds" + desc = "These seeds grow into watermelon plants." + icon_state = "seed-watermelon" + mypath = "/obj/item/seeds/watermelonseed" + species = "watermelon" + plantname = "Watermelon Vines" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon" + lifespan = 50 + endurance = 40 + maturation = 6 + production = 6 + yield = 3 + potency = 1 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/pumpkinseed + name = "pack of pumpkin seeds" + desc = "These seeds grow into pumpkin vines." + icon_state = "seed-pumpkin" + mypath = "/obj/item/seeds/pumpkinseed" + species = "pumpkin" + plantname = "Pumpkin Vines" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin" + lifespan = 50 + endurance = 40 + maturation = 6 + production = 6 + yield = 3 + potency = 10 + plant_type = 0 + growthstages = 3 + + +/obj/item/seeds/limeseed + name = "pack of lime seeds" + desc = "These are very sour seeds." + icon_state = "seed-lime" + mypath = "/obj/item/seeds/limeseed" + species = "lime" + plantname = "Lime Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/lime" + lifespan = 55 + endurance = 50 + maturation = 6 + production = 6 + yield = 4 + potency = 15 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/lemonseed + name = "pack of lemon seeds" + desc = "These are sour seeds." + icon_state = "seed-lemon" + mypath = "/obj/item/seeds/lemonseed" + species = "lemon" + plantname = "Lemon Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/lemon" + lifespan = 55 + endurance = 45 + maturation = 6 + production = 6 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/cashseed + name = "pack of money seeds" + desc = "When life gives you lemons, mutate them into cash." + icon_state = "seed-cash" + mypath = "/obj/item/seeds/cashseed" + species = "cashtree" + plantname = "Money Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/money" + lifespan = 55 + endurance = 45 + maturation = 6 + production = 6 + yield = 4 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/orangeseed + name = "pack of orange seed" + desc = "Sour seeds." + icon_state = "seed-orange" + mypath = "/obj/item/seeds/orangeseed" + species = "orange" + plantname = "Orange Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/orange" + lifespan = 60 + endurance = 50 + maturation = 6 + production = 6 + yield = 5 + potency = 1 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/poisonberryseed + name = "pack of poison-berry seeds" + desc = "These seeds grow into poison-berry bushes." + icon_state = "seed-poisonberry" + mypath = "/obj/item/seeds/poisonberryseed" + species = "poisonberry" + plantname = "Poison-Berry Bush" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries" + lifespan = 20 + endurance = 15 + maturation = 5 + production = 5 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/deathberryseed + name = "pack of death-berry seeds" + desc = "These seeds grow into death berries." + icon_state = "seed-deathberry" + mypath = "/obj/item/seeds/deathberryseed" + species = "deathberry" + plantname = "Death Berry Bush" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries" + lifespan = 30 + endurance = 20 + maturation = 5 + production = 5 + yield = 3 + potency = 50 + plant_type = 0 + growthstages = 6 + +/obj/item/seeds/grassseed + name = "pack of grass seeds" + desc = "These seeds grow into grass. Yummy!" + icon_state = "seed-grass" + mypath = "/obj/item/seeds/grassseed" + species = "grass" + plantname = "Grass" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/grass" + lifespan = 60 + endurance = 50 + maturation = 2 + production = 5 + yield = 5 + plant_type = 0 + growthstages = 2 + +/obj/item/seeds/cocoapodseed + name = "pack of cocoa pod seeds" + desc = "These seeds grow into cacao trees. They look fattening." //SIC: cocoa is the seeds. The tress ARE spelled cacao. + icon_state = "seed-cocoapod" + mypath = "/obj/item/seeds/cocoapodseed" + species = "cocoapod" + plantname = "Cocao Tree" //SIC: see above + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod" + lifespan = 20 + endurance = 15 + maturation = 5 + production = 5 + yield = 2 + potency = 10 + plant_type = 0 + growthstages = 5 + +/obj/item/seeds/cherryseed + name = "pack of cherry pits" + desc = "Careful not to crack a tooth on one... That'd be the pits." + icon_state = "seed-cherry" + mypath = "/obj/item/seeds/cherryseed" + species = "cherry" + plantname = "Cherry Tree" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cherries" + lifespan = 35 + endurance = 35 + maturation = 5 + production = 5 + yield = 3 + potency = 10 + plant_type = 0 + growthstages = 5 + +/obj/item/seeds/kudzuseed + name = "pack of kudzu seeds" + desc = "These seeds grow into a weed that grows incredibly fast." + icon_state = "seed-kudzu" + mypath = "/obj/item/seeds/kudzuseed" + species = "kudzu" + plantname = "Kudzu" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod" + lifespan = 20 + endurance = 10 + maturation = 6 + production = 6 + yield = 4 + potency = 10 + growthstages = 4 + plant_type = 1 + +/obj/item/seeds/kudzuseed/attack_self(mob/user as mob) + if(istype(user.loc,/turf/space)) + return + user << "You plant the kudzu. You monster." + new /obj/effect/spacevine_controller(user.loc) + del(src) + + + +/* // Maybe one day when I get it to work like a grenade which exlodes gibs. +/obj/item/seeds/gibtomatoseed + name = "Gib Tomato seeds" + desc = "Used to grow gib tomotoes." + icon_state = "seed-gibtomato" + mypath = "/obj/item/seeds/gibtomatoseed" + species = "gibtomato" + plantname = "Gib Tomato plant" + productname = "/obj/item/weapon/grown/gibtomato" + lifespan = 35 + endurance = 25 + maturation = 6 + production = 6 + yield = 3 + potency = 10 + plant_type = 0 + growthstages = 6 +*/ + +/* +/obj/item/seeds/ + name = "" + icon_state = "seed" + mypath = "/obj/item/seeds/" + species = "" + plantname = "" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/" + lifespan = 25 + endurance = 15 + maturation = 10 + production = 1 + yield = -1 + potency = 0 + oneharvest = 1 + growthstages = 3 + plant_type = 0 + +*/ \ No newline at end of file