Hydroponics tray changes and new plants (#18366)

You can now remove all plants and weeds from a hydroponics tray by using a spade on it. This process takes five seconds.

Hydroponics trays now have a unique variable, using_irrigation, that replaces the previous iteration of irrigation hoses that used the anchored variable to track it instead.

Fixes a possible runtime error that can occur when using irrigation hoses to transfer non-water reagents (specifically nutrients, although it hasn't been tested with any other reagents).

Added meatwheat, which is mutated from normal wheat plants. It's essentially a blood-red version of wheat that can be crushed into a meat slab by activating it with an empty hand. These meatwheat clumps are slightly bloodier than normal meat, but it still works for recipes that use normal meat slabs.

Added ambrosia gaia, which is mutated from ambrosia deus. It's yellow, glows brightly, and contains only earthsblood (renamed adminordrazine). The plant is destroyed after a single harvest, and its product can be planted in an empty hydroponics tray to cause it to become self-sufficient, no longer requiring nutrients, water, or weed/pest removal. Gaia-blessed trays will glow bright yellow in comparison to normal trays, and gaia-blessed soil will turn yellow. Both will emit light.

Added cherry bombs, which are mutated from blue cherries. They're orange and have a black stem, and start with a tiny amount of black powder in them. Activating them in an empty hand will ignite them and cause them to explode after three seconds, with explosion strength varying based on potency (at the most, it's around that of a minibomb).
This commit is contained in:
Xhuis
2016-06-09 18:40:06 +12:00
committed by oranges
parent 2abc6c1e0c
commit 68b51d88cf
13 changed files with 207 additions and 35 deletions
@@ -182,6 +182,14 @@
SSobj.burning -= src
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/meat/slab/meatwheat
name = "meatwheat clump"
desc = "This doesn't look like meat, but your standards aren't <i>that</i> high to begin with."
list_reagents = list("nutriment" = 3, "vitamin" = 2, "blood" = 5)
filling_color = rgb(150, 0, 0)
icon_state = "meatwheat_clump"
bitesize = 4
////////////////////////////////////// MEAT STEAKS ///////////////////////////////////////////////////////////
+23 -1
View File
@@ -38,7 +38,7 @@
species = "ambrosiadeus"
plantname = "Ambrosia Deus"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus
mutatelist = list()
mutatelist = list(/obj/item/seeds/ambrosia/gaia)
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
rarity = 40
@@ -49,3 +49,25 @@
icon_state = "ambrosiadeus"
filling_color = "#008B8B"
origin_tech = "biotech=4;materials=3"
//Ambrosia Gaia
/obj/item/seeds/ambrosia/gaia
name = "pack of ambrosia gaia seeds"
desc = "These seeds grow into ambrosia gaia, incredibly rare but imbued with breathtaking potential."
icon_state = "seed-ambrosia_gaia"
species = "ambrosia_gaia"
plantname = "Ambrosia Gaia"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia
mutatelist = list()
reagents_add = list("earthsblood" = 0.4, "nutriment" = 0.2, "vitamin" = 0.1)
rarity = 100 //These are some pretty good plants right here
oneharvest = TRUE
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia
name = "ambrosia gaia"
desc = "The bringer of light."
icon_state = "ambrosia_gaia"
filling_color = rgb(255, 175, 0)
origin_tech = "biotech=7"
luminosity = 3
seed = /obj/item/seeds/ambrosia/gaia
+44 -1
View File
@@ -122,7 +122,7 @@
species = "bluecherry"
plantname = "Blue Cherry Tree"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries
mutatelist = list()
mutatelist = list(/obj/item/seeds/cherry/bomb)
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
rarity = 10
@@ -134,6 +134,49 @@
filling_color = "#6495ED"
bitesize_mod = 2
//Cherry Bombs
/obj/item/seeds/cherry/bomb
name = "pack of cherry bomb pits"
desc = "They give you vibes of dread and frustration."
icon_state = "seed-cherry_bomb"
species = "cherry_bomb"
plantname = "Cherry Bomb Tree"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb
mutatelist = list()
reagents_add = list("nutriment" = 0.1, "sugar" = 0.1, "blackpowder" = 0.1)
rarity = 25
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb
name = "cherry bombs"
desc = "You think you can hear the hissing of a tiny fuse."
icon_state = "cherry_bomb"
filling_color = rgb(20, 20, 20)
seed = /obj/item/seeds/cherry/bomb
bitesize_mod = 2
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/attack_self(mob/living/user)
var/area/A = get_area(user)
user.visible_message("<span class='warning'>[user] plucks the stem from [src]!</span>", "<span class='userdanger'>You pluck the stem from [src], which begins to hiss loudly!</span>")
message_admins("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x], [user.y], [user.z]) <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>(JMP)</a>")
log_game("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x],[user.y],[user.z]).")
prime()
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/burn()
prime()
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/proc/prime()
icon_state = "cherry_bomb_lit"
playsound(src, 'sound/effects/fuse.ogg', seed.potency, 0)
sleep(30)
if(!src)
return
var/d_strength = round(seed.potency / 100)
var/h_strength = round(seed.potency / 50)
var/l_strength = round(seed.potency / 20)
var/f_strength = l_strength
explosion(get_turf(src), d_strength, h_strength, l_strength, f_strength)
qdel(src)
// Grapes
/obj/item/seeds/grape
+30 -2
View File
@@ -11,7 +11,7 @@
potency = 15
oneharvest = 1
icon_dead = "wheat-dead"
mutatelist = list(/obj/item/seeds/wheat/oat)
mutatelist = list(/obj/item/seeds/wheat/oat, /obj/item/seeds/wheat/meat)
reagents_add = list("nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
@@ -60,4 +60,32 @@
gender = PLURAL
icon_state = "rice"
filling_color = "#FAFAD2"
bitesize_mod = 2
bitesize_mod = 2
//Meatwheat - grows into synthetic meat
/obj/item/seeds/wheat/meat
name = "pack of meatwheat seeds"
desc = "If you ever wanted to drive a vegetarian to insanity, here's how."
icon_state = "seed-meatwheat"
species = "meatwheat"
plantname = "Meatwheat"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/meatwheat
mutatelist = list()
/obj/item/weapon/reagent_containers/food/snacks/grown/meatwheat
name = "meatwheat"
desc = "Some blood-drenched wheat stalks. You can crush them into what passes for meat if you squint hard enough."
icon_state = "meatwheat"
gender = PLURAL
filling_color = rgb(150, 0, 0)
bitesize_mod = 2
seed = /obj/item/seeds/wheat/meat
/obj/item/weapon/reagent_containers/food/snacks/grown/meatwheat/attack_self(mob/living/user)
user.visible_message("<span class='notice'>[user] crushes [src] into meat.</span>", "<span class='notice'>You crush [src] into something that resembles meat.</span>")
playsound(user, 'sound/effects/blobattack.ogg', 50, 1)
var/obj/item/weapon/reagent_containers/food/snacks/meat/slab/meatwheat/M = new(get_turf(user))
user.drop_item()
qdel(src)
user.put_in_hands(M)
return 1
+75 -30
View File
@@ -3,7 +3,7 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray"
density = 1
anchored = 1 // anchored == 2 means the hoses are screwed in place
anchored = 1
var/waterlevel = 100 //The amount of water in the tray (max 100)
var/maxwater = 100 //The maximum amount of water in the tray
var/nutrilevel = 10 //The amount of nutrient in the tray (max 10)
@@ -24,6 +24,8 @@
var/rating = 1
var/unwrenchable = 1
var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpolinate one plant
var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
pixel_y=8
@@ -77,7 +79,7 @@
return
if(istype(I, /obj/item/weapon/crowbar))
if(anchored==2)
if(using_irrigation)
user << "Unscrew the hoses first!"
else if(default_deconstruction_crowbar(I, 1))
return
@@ -92,8 +94,8 @@
var/atom/a = processing_atoms[1]
for(var/step_dir in cardinal)
var/obj/machinery/hydroponics/h = locate() in get_step(a, step_dir)
// Soil plots aren't dense. anchored == 2 means the hoses are screwed in place
if(h && h.anchored==2 && h.density && !(h in connected) && !(h in processing_atoms))
// Soil plots aren't dense
if(h && h.using_irrigation && h.density && !(h in connected) && !(h in processing_atoms))
processing_atoms += h
processing_atoms -= a
@@ -118,6 +120,13 @@
if(myseed && (myseed.loc != src))
myseed.loc = src
if(self_sustaining)
adjustNutri(2 / rating)
adjustWater(rand(8, 10) / rating)
adjustWeeds(-5 / rating)
adjustPests(-5 / rating)
adjustToxic(-5 / rating)
if(world.time > (lastcycle + cycledelay))
lastcycle = world.time
if(myseed && !dead)
@@ -243,17 +252,25 @@
//Refreshes the icon and sets the luminosity
overlays.Cut()
if(self_sustaining)
if(istype(src, /obj/machinery/hydroponics/soil))
color = rgb(255, 175, 0)
else
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "gaia_blessing")
SetLuminosity(3)
update_icon_hoses()
if(myseed)
update_icon_plant()
update_icon_lights()
if(myseed && myseed.get_gene(/datum/plant_gene/trait/glow))
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
SetLuminosity(G.get_lum(myseed))
else
SetLuminosity(0)
if(!self_sustaining)
if(myseed && myseed.get_gene(/datum/plant_gene/trait/glow))
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
SetLuminosity(G.get_lum(myseed))
else
SetLuminosity(0)
return
@@ -261,7 +278,7 @@
var/n = 0
for(var/Dir in cardinal)
var/obj/machinery/hydroponics/t = locate() in get_step(src,Dir)
if(t && t.anchored == 2 && src.anchored == 2)
if(t && t.using_irrigation && using_irrigation)
n += Dir
icon_state = "hoses-[n]"
@@ -307,8 +324,11 @@
else
user << "<span class='info'>[src] is empty.</span>"
user << "<span class='info'>Water: [waterlevel]/[maxwater]</span>"
user << "<span class='info'>Nutrient: [nutrilevel]/[maxnutri]</span>"
if(!self_sustaining)
user << "<span class='info'>Water: [waterlevel]/[maxwater]</span>"
user << "<span class='info'>Nutrient: [nutrilevel]/[maxnutri]</span>"
else
user << "<span class='info'>It doesn't require any maintenance.</span>"
if(weedlevel >= 5)
user << "<span class='warning'>[src] is filled with weeds!</span>"
@@ -651,7 +671,23 @@
/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
//Called when mob user "attacks" it with object O
if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia)) //Checked early on so it doesn't have to deal with composting checks
if(self_sustaining)
user << "<span class='warning'>This [name] is already self-sustaining!</span>"
return
if(myseed || weedlevel)
user << "<span class='warning'>[src] needs to be clear of plants and weeds!</span>"
return
if(alert(user, "This will make [src] self-sustaining but consume [O] forever. Are you sure?", "[name]", "I'm Sure", "Abort") == "Abort" || !user)
return
user.visible_message("<span class='notice'>[user] gently pulls open the soil for [O] and places it inside.</span>", "<span class='notice'>You tenderly root [O] into [src].</span>")
user.drop_item()
qdel(O)
visible_message("<span class='boldnotice'>[src] begins to glow with a beautiful light!</span>")
self_sustaining = TRUE
update_icon()
else if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
var/obj/item/weapon/reagent_containers/reagent_source = O
if(istype(reagent_source, /obj/item/weapon/reagent_containers/syringe))
@@ -688,8 +724,7 @@
if(istype(reagent_source, /obj/item/weapon/reagent_containers/glass/))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
// anchored == 2 means the hoses are screwed in place
if(irrigate && reagent_source.amount_per_transfer_from_this > 30 && reagent_source.reagents.total_volume >= 30 && anchored == 2)
if(irrigate && reagent_source.amount_per_transfer_from_this > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation)
trays = FindConnected()
if (trays.len > 1)
visi_msg += ", setting off the irrigation system"
@@ -702,7 +737,7 @@
for(var/obj/machinery/hydroponics/H in trays)
//cause I don't want to feel like im juggling 15 tamagotchis and I can get to my real work of ripping flooring apart in hopes of validating my life choices of becoming a space-gardener
var/datum/reagents/S = new /datum/reagents()
var/datum/reagents/S = new /datum/reagents() //This is a strange way, but I don't know of a better one so I can't fix it at the moment...
S.my_atom = H
reagent_source.reagents.trans_to(S,split)
@@ -767,7 +802,7 @@
S.handle_item_insertion(G, 1)
else if(istype(O, /obj/item/weapon/wrench) && unwrenchable)
if(anchored == 2)
if(using_irrigation)
user << "<span class='warning'>Unscrew the hoses first!</span>"
return
@@ -792,20 +827,30 @@
user.visible_message("[user] unwrenches [src].", \
"<span class='notice'>You unwrench [src].</span>")
else if(istype(O, /obj/item/weapon/wirecutters) && unwrenchable) //THIS NEED TO BE DONE DIFFERENTLY, SOMEONE REFACTOR THE TRAY CODE ALREADY
if(anchored)
if(anchored == 2)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
anchored = 1
user << "<span class='notice'>You snip \the [src]'s hoses.</span>"
else if(istype(O, /obj/item/weapon/wirecutters) && unwrenchable)
using_irrigation = !using_irrigation
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.</span>", \
"<span class='notice'>You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.</span>")
for(var/obj/machinery/hydroponics/h in range(1,src))
h.update_icon()
else if(anchored == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
anchored = 2
user << "<span class='notice'>You reconnect \the [src]'s hoses.</span>"
else if(istype(O, /obj/item/weapon/shovel/spade) && unwrenchable)
if(!myseed && !weedlevel)
user << "<span class='warning'>[src] doesn't have any plants or weeds!</span>"
return
user.visible_message("<span class='notice'>[user] starts digging out [src]'s plants...</span>", "<span class='notice'>You start digging out [src]'s plants...</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
if(!do_after(user, 50, target = src) || (!myseed && !weedlevel))
return
user.visible_message("<span class='notice'>[user] digs out the plants in [src]!</span>", "<span class='notice'>You dig out all of [src]'s plants!</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
if(myseed) //Could be that they're just using it as a de-weeder
qdel(myseed)
myseed = null
weedlevel = 0 //Side-effect of cleaning up those nasty weeds
update_icon()
for(var/obj/machinery/hydroponics/h in range(1,src))
h.update_icon()
else
return ..()
@@ -884,7 +929,7 @@
return // Has no lights
/obj/machinery/hydroponics/soil/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/shovel))
if(istype(O, /obj/item/weapon/shovel) && !istype(O, /obj/item/weapon/shovel/spade))
user << "<span class='notice'>You clear up [src]!</span>"
qdel(src)
else
+1 -1
View File
@@ -128,7 +128,7 @@ var/const/INJECT = 5 //injection
return id
/datum/reagents/proc/trans_to(obj/target, amount=1, multiplier=1, preserve_data=1, no_react = 0)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
if(!target )
if(!target || !total_volume)
return
var/datum/reagents/R
if(istype(target, /datum/reagents))
@@ -1003,6 +1003,32 @@ datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/M)
..()
. = 1
/datum/reagent/medicine/earthsblood
name = "Earthsblood"
id = "earthsblood"
description = "Ichor from an extremely powerful plant. Great for restoring wounds, but it's a little heavy on the brain."
color = rgb(255, 175, 0)
overdose_threshold = 25
/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/M)
M.adjustBruteLoss(-3 * REM, 0)
M.adjustFireLoss(-3 * REM, 0)
M.adjustOxyLoss(-15 * REM, 0)
M.adjustToxLoss(-3 * REM, 0)
M.adjustBrainLoss(0.5 * REM) //This does, after all, come from ambrosia
M.adjustCloneLoss(-1 * REM, 0)
M.adjustStaminaLoss(-30 * REM, 0)
M.jitteriness = min(max(0, M.jitteriness + 3), 30)
M.druggy = min(max(0, M.druggy + 3), 15) //See above
..()
. = 1
/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M)
M.hallucination = min(max(0, M.hallucination + 10), 50)
M.adjustToxLoss(5 * REM, 0)
..()
. = 1
/datum/reagent/medicine/haloperidol
name = "Haloperidol"
id = "haloperidol"