mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
-Moves the scattered hydroponics-related files into a consolidated hydroponics module folder, and attempts to reorganize code found within those files. I don't think I broke anything.
-You can make dualsabers now by sticking two energy swords end-to-end. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5725 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -0,0 +1,937 @@
|
||||
|
||||
|
||||
// ***********************************************************
|
||||
// Foods that are produced from hydroponics ~~~~~~~~~~
|
||||
// Data from the seeds carry over to these grown foods
|
||||
// ***********************************************************
|
||||
|
||||
//Grown foods
|
||||
//Subclass so we can pass on values
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/
|
||||
var/seed = ""
|
||||
var/plantname = ""
|
||||
var/product //a type path
|
||||
var/species = ""
|
||||
var/lifespan = 0
|
||||
var/endurance = 0
|
||||
var/maturation = 0
|
||||
var/production = 0
|
||||
var/yield = 0
|
||||
var/potency = -1
|
||||
var/plant_type = 0
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
New(newloc,newpotency)
|
||||
if (!isnull(newpotency))
|
||||
potency = newpotency
|
||||
..()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
var/msg
|
||||
msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>\n"
|
||||
switch(plant_type)
|
||||
if(0)
|
||||
msg += "- Plant type: <i>Normal plant</i>\n"
|
||||
if(1)
|
||||
msg += "- Plant type: <i>Weed</i>\n"
|
||||
if(2)
|
||||
msg += "- Plant type: <i>Mushroom</i>\n"
|
||||
msg += "- Potency: <i>[potency]</i>\n"
|
||||
msg += "- Yield: <i>[yield]</i>\n"
|
||||
msg += "- Maturation speed: <i>[maturation]</i>\n"
|
||||
msg += "- Production speed: <i>[production]</i>\n"
|
||||
msg += "- Endurance: <i>[endurance]</i>\n"
|
||||
msg += "- Healing properties: <i>[reagents.get_reagent_amount("nutriment")]</i>\n"
|
||||
msg += "*---------*</span>"
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/*if (istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/obj/item/weapon/plantbag/S = O
|
||||
if (S.mode == 1)
|
||||
for(var/obj/item/G in get_turf(src))
|
||||
if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += G
|
||||
else
|
||||
user << "\blue The plant bag is full."
|
||||
return
|
||||
user << "\blue You pick up all the plants and seeds."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The plant bag is full."*/
|
||||
return
|
||||
|
||||
/*/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/obj/item/weapon/plantbag/S = O
|
||||
if (S.mode == 1)
|
||||
for(var/obj/item/G in get_turf(src))
|
||||
if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += G
|
||||
else
|
||||
user << "\blue The plant bag is full."
|
||||
return
|
||||
user << "\blue You pick up all the plants and seeds."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The plant bag is full."
|
||||
return*/
|
||||
|
||||
/obj/item/weapon/grown/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
var/msg
|
||||
msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>\n"
|
||||
switch(plant_type)
|
||||
if(0)
|
||||
msg += "- Plant type: <i>Normal plant</i>\n"
|
||||
if(1)
|
||||
msg += "- Plant type: <i>Weed</i>\n"
|
||||
if(2)
|
||||
msg += "- Plant type: <i>Mushroom</i>\n"
|
||||
msg += "- Potency: <i>[potency]</i>\n"
|
||||
msg += "- Yield: <i>[yield]</i>\n"
|
||||
msg += "- Maturation speed: <i>[maturation]</i>\n"
|
||||
msg += "- Production speed: <i>[production]</i>\n"
|
||||
msg += "- Endurance: <i>[endurance]</i>\n"
|
||||
msg += "*---------*</span>"
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/corn
|
||||
seed = "/obj/item/seeds/cornseed"
|
||||
name = "ear of corn"
|
||||
desc = "Needs some butter!"
|
||||
icon_state = "corn"
|
||||
potency = 40
|
||||
trash = /obj/item/weapon/corncob
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries
|
||||
seed = "/obj/item/seeds/cherryseed"
|
||||
name = "cherries"
|
||||
desc = "Great for toppings!"
|
||||
icon_state = "cherry"
|
||||
gender = PLURAL
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 15), 1))
|
||||
reagents.add_reagent("sugar", 1+round((potency / 15), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
|
||||
seed = "/obj/item/seeds/poppyseed"
|
||||
name = "poppy"
|
||||
desc = "Long-used as a symbol of rest, peace, and death."
|
||||
icon_state = "poppy"
|
||||
potency = 30
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
reagents.add_reagent("bicaridine", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 3, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
|
||||
seed = "obj/item/seeds/harebellseed"
|
||||
name = "harebell"
|
||||
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten’d not thy breath.\""
|
||||
icon_state = "harebell"
|
||||
potency = 1
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 3, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato
|
||||
seed = "/obj/item/seeds/potatoseed"
|
||||
name = "potato"
|
||||
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
|
||||
icon_state = "potato"
|
||||
potency = 25
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
bitesize = reagents.total_volume
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(W:amount >= 5)
|
||||
W:amount -= 5
|
||||
if(!W:amount) del(W)
|
||||
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
|
||||
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(user.loc)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
|
||||
seed = "/obj/item/seeds/grapeseed"
|
||||
name = "bunch of grapes"
|
||||
desc = "Nutritious!"
|
||||
icon_state = "grapes"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
reagents.add_reagent("sugar", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes
|
||||
seed = "/obj/item/seeds/greengrapeseed"
|
||||
name = "bunch of green grapes"
|
||||
desc = "Nutritious!"
|
||||
icon_state = "greengrapes"
|
||||
potency = 25
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
reagents.add_reagent("kelotane", 3+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
|
||||
seed = "/obj/item/seeds/cabbageseed"
|
||||
name = "cabbage"
|
||||
desc = "Ewwwwwwwwww. Cabbage."
|
||||
icon_state = "cabbage"
|
||||
potency = 25
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = reagents.total_volume
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/berries
|
||||
seed = "/obj/item/seeds/berryseed"
|
||||
name = "bunch of berries"
|
||||
desc = "Nutritious!"
|
||||
icon_state = "berrypile"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries
|
||||
seed = "/obj/item/seeds/glowberryseed"
|
||||
name = "bunch of glow-berries"
|
||||
desc = "Nutritious!"
|
||||
var/on = 1
|
||||
var/brightness_on = 2 //luminosity when on
|
||||
icon_state = "glowberrypile"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", round((potency / 10), 1))
|
||||
reagents.add_reagent("uranium", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Del()
|
||||
if(istype(loc,/mob))
|
||||
loc.SetLuminosity(round(loc.luminosity - potency/5,1))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
|
||||
src.SetLuminosity(0)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/5),1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
|
||||
user.SetLuminosity(round(user.luminosity - (potency/5),1))
|
||||
src.SetLuminosity(round(potency/5,1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
|
||||
seed = "/obj/item/seeds/cocoapodseed"
|
||||
name = "cocoa pod"
|
||||
desc = "Fattening... Mmmmm... chucklate."
|
||||
icon_state = "cocoapod"
|
||||
potency = 50
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
reagents.add_reagent("coco", 4+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
|
||||
seed = "/obj/item/seeds/sugarcaneseed"
|
||||
name = "sugarcane"
|
||||
desc = "Sickly sweet."
|
||||
icon_state = "sugarcane"
|
||||
potency = 50
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("sugar", 4+round((potency / 5), 1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries
|
||||
seed = "/obj/item/seeds/poisonberryseed"
|
||||
name = "bunch of poison-berries"
|
||||
desc = "Taste so good, you could die!"
|
||||
icon_state = "poisonberrypile"
|
||||
gender = PLURAL
|
||||
potency = 15
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("toxin", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries
|
||||
seed = "/obj/item/seeds/deathberryseed"
|
||||
name = "bunch of death-berries"
|
||||
desc = "Taste so good, you could die!"
|
||||
icon_state = "deathberrypile"
|
||||
gender = PLURAL
|
||||
potency = 50
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("toxin", 3+round(potency / 3, 1))
|
||||
reagents.add_reagent("lexorin", 1+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
|
||||
seed = "/obj/item/seeds/ambrosiavulgaris"
|
||||
name = "ambrosia vulgaris branch"
|
||||
desc = "This is a plant containing various healing chemicals."
|
||||
icon_state = "ambrosiavulgaris"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("space_drugs", 1+round(potency / 8, 1))
|
||||
reagents.add_reagent("kelotane", 1+round(potency / 8, 1))
|
||||
reagents.add_reagent("bicaridine", 1+round(potency / 10, 1))
|
||||
reagents.add_reagent("toxin", 1+round(potency / 10, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
|
||||
seed = "/obj/item/seeds/ambrosiadeus"
|
||||
name = "ambrosia deus branch"
|
||||
desc = "Eating this makes you feel immortal!"
|
||||
icon_state = "ambrosiadeus"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("bicaridine", 1+round(potency / 8, 1))
|
||||
reagents.add_reagent("synaptizine", 1+round(potency / 8, 1))
|
||||
reagents.add_reagent("hyperzine", 1+round(potency / 10, 1))
|
||||
reagents.add_reagent("space_drugs", 1+round(potency / 10, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apple
|
||||
seed = "/obj/item/seeds/appleseed"
|
||||
name = "apple"
|
||||
desc = "It's a little piece of Eden."
|
||||
icon_state = "apple"
|
||||
potency = 15
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.maximum_volume = 20
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = reagents.maximum_volume // Always eat the apple in one
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
|
||||
seed = "/obj/item/seeds/poisonedappleseed"
|
||||
name = "apple"
|
||||
desc = "It's a little piece of Eden."
|
||||
icon_state = "apple"
|
||||
potency = 15
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.maximum_volume = 20
|
||||
reagents.add_reagent("cyanide", 1+round((potency / 5), 1))
|
||||
bitesize = reagents.maximum_volume // Always eat the apple in one
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple
|
||||
seed = "/obj/item/seeds/goldappleseed"
|
||||
name = "golden apple"
|
||||
desc = "Emblazoned upon the apple is the word 'Kallisti'."
|
||||
icon_state = "goldapple"
|
||||
potency = 15
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
reagents.add_reagent("gold", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Mineral Content: <i>[reagents.get_reagent_amount("gold")]%</i></span>"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
|
||||
seed = "/obj/item/seeds/watermelonseed"
|
||||
name = "watermelon"
|
||||
desc = "It's full of watery goodness."
|
||||
icon_state = "watermelon"
|
||||
potency = 10
|
||||
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
|
||||
slices_num = 5
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 6), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
|
||||
seed = "/obj/item/seeds/pumpkinseed"
|
||||
name = "pumpkin"
|
||||
desc = "It's large and scary."
|
||||
icon_state = "pumpkin"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 6), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/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) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy))
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/pumpkinhead (user.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lime
|
||||
seed = "/obj/item/seeds/limeseed"
|
||||
name = "lime"
|
||||
desc = "It's so sour, your face will twist."
|
||||
icon_state = "lime"
|
||||
potency = 20
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon
|
||||
seed = "/obj/item/seeds/lemonseed"
|
||||
name = "lemon"
|
||||
desc = "When life gives you lemons, be grateful they aren't limes."
|
||||
icon_state = "lemon"
|
||||
potency = 20
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/orange
|
||||
seed = "/obj/item/seeds/orangeseed"
|
||||
name = "orange"
|
||||
desc = "It's an tangy fruit."
|
||||
icon_state = "orange"
|
||||
potency = 20
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
|
||||
seed = "/obj/item/seeds/whitebeetseed"
|
||||
name = "white-beet"
|
||||
desc = "You can't beat white-beet."
|
||||
icon_state = "whitebeet"
|
||||
potency = 15
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", round((potency / 20), 1))
|
||||
reagents.add_reagent("sugar", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
|
||||
seed = "/obj/item/seeds/bananaseed"
|
||||
name = "banana"
|
||||
desc = "It's an excellent prop for a clown."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banana"
|
||||
item_state = "banana"
|
||||
trash = /obj/item/weapon/bananapeel
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("banana", 1+round((potency / 10), 1))
|
||||
bitesize = 5
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/chili
|
||||
seed = "/obj/item/seeds/chiliseed"
|
||||
name = "chili"
|
||||
desc = "It's spicy! Wait... IT'S BURNING ME!!"
|
||||
icon_state = "chilipepper"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 25), 1))
|
||||
reagents.add_reagent("capsaicin", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/chili/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Capsaicin: <i>[reagents.get_reagent_amount("capsaicin")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
|
||||
seed = "/obj/item/seeds/eggplantseed"
|
||||
name = "eggplant"
|
||||
desc = "Maybe there's a chicken inside?"
|
||||
icon_state = "eggplant"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
|
||||
seed = "/obj/item/seeds/soyaseed"
|
||||
name = "soybeans"
|
||||
desc = "It's pretty bland, but oh the possibilities..."
|
||||
gender = PLURAL
|
||||
icon_state = "soybeans"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
|
||||
seed = "/obj/item/seeds/moonflowerseed"
|
||||
name = "moonflower"
|
||||
desc = "Store in a location at least 50 yards away from werewolves."
|
||||
icon_state = "moonflower"
|
||||
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("moonshine", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
|
||||
seed = "/obj/item/seeds/tomatoseed"
|
||||
name = "tomato"
|
||||
desc = "I say to-mah-to, you say tom-mae-to."
|
||||
icon_state = "tomato"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/tomato_smudge(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato
|
||||
seed = "/obj/item/seeds/killertomatoseed"
|
||||
name = "killer-tomato"
|
||||
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
|
||||
icon_state = "killertomato"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)
|
||||
lifespan = 120
|
||||
endurance = 30
|
||||
maturation = 15
|
||||
production = 1
|
||||
yield = 3
|
||||
potency = 30
|
||||
plant_type = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /mob/living/simple_animal/tomato(user.loc)
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the killer-tomato.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato
|
||||
seed = "/obj/item/seeds/bloodtomatoseed"
|
||||
name = "blood-tomato"
|
||||
desc = "So bloody...so...very...bloody....AHHHH!!!!"
|
||||
icon_state = "bloodtomato"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
|
||||
reagents.add_reagent("blood", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato
|
||||
seed = "/obj/item/seeds/bluetomatoseed"
|
||||
name = "blue-tomato"
|
||||
desc = "I say blue-mah-to, you say blue-mae-to."
|
||||
icon_state = "bluetomato"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
reagents.add_reagent("lube", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
|
||||
return
|
||||
|
||||
M.stop_pulling()
|
||||
M << "\blue You slipped on the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
|
||||
seed = "/obj/item/seeds/wheatseed"
|
||||
name = "wheat"
|
||||
desc = "Sigh... wheat... a-grain?"
|
||||
gender = PLURAL
|
||||
icon_state = "wheat"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 25), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
|
||||
seed = "/obj/item/seeds/grassseed"
|
||||
name = "grass"
|
||||
desc = "Green and lush."
|
||||
icon_state = "grassclump"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grass/attack_self(mob/user as mob)
|
||||
user << "<span class='notice'>You prepare the astroturf.</span>"
|
||||
new/obj/item/stack/tile/grass(user.loc)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod
|
||||
seed = "/obj/item/seeds/kudzuseed"
|
||||
name = "kudzu pod"
|
||||
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
|
||||
icon_state = "kudzupod"
|
||||
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("anti_toxin",1+round((potency / 25), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
|
||||
seed = "/obj/item/seeds/icepepperseed"
|
||||
name = "ice-pepper"
|
||||
desc = "It's a mutant strain of chili"
|
||||
icon_state = "icepepper"
|
||||
potency = 20
|
||||
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("frostoil", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Frostoil: <i>[reagents.get_reagent_amount("frostoil")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
|
||||
seed = "/obj/item/seeds/carrotseed"
|
||||
name = "carrot"
|
||||
desc = "It's good for the eyes!"
|
||||
icon_state = "carrot"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
reagents.add_reagent("imidazoline", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
|
||||
seed = "/obj/item/seeds/reishimycelium"
|
||||
name = "reishi"
|
||||
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
|
||||
icon_state = "reishi"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("stoxin", 3+round(potency / 3, 1))
|
||||
reagents.add_reagent("space_drugs", 1+round(potency / 25, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Sleep Toxin: <i>[reagents.get_reagent_amount("stoxin")]%</i></span>"
|
||||
user << "<span class='info'>- Space Drugs: <i>[reagents.get_reagent_amount("space_drugs")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
|
||||
seed = "/obj/item/seeds/amanitamycelium"
|
||||
name = "fly amanita"
|
||||
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
|
||||
icon_state = "amanita"
|
||||
potency = 10
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1)
|
||||
reagents.add_reagent("amatoxin", 3+round(potency / 3, 1))
|
||||
reagents.add_reagent("psilocybin", 1+round(potency / 25, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Amatoxins: <i>[reagents.get_reagent_amount("amatoxin")]%</i></span>"
|
||||
user << "<span class='info'>- Psilocybin: <i>[reagents.get_reagent_amount("psilocybin")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
|
||||
seed = "/obj/item/seeds/angelmycelium"
|
||||
name = "destroying angel"
|
||||
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
|
||||
icon_state = "angel"
|
||||
potency = 35
|
||||
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("amatoxin", 13+round(potency / 3, 1))
|
||||
reagents.add_reagent("psilocybin", 1+round(potency / 25, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Amatoxins: <i>[reagents.get_reagent_amount("amatoxin")]%</i></span>"
|
||||
user << "<span class='info'>- Psilocybin: <i>[reagents.get_reagent_amount("psilocybin")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
|
||||
seed = "/obj/item/seeds/libertymycelium"
|
||||
name = "liberty-cap"
|
||||
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
|
||||
icon_state = "libertycap"
|
||||
potency = 15
|
||||
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("psilocybin", 3+round(potency / 5, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
. = ..()
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "<span class='info'>- Psilocybin: <i>[reagents.get_reagent_amount("psilocybin")]%</i></span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
|
||||
seed = "/obj/item/seeds/plumpmycelium"
|
||||
name = "plump-helmet"
|
||||
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
|
||||
icon_state = "plumphelmet"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
|
||||
seed = "/obj/item/seeds/walkingmushroom"
|
||||
name = "walking mushroom"
|
||||
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
|
||||
icon_state = "walkingmushroom"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)
|
||||
lifespan = 120
|
||||
endurance = 30
|
||||
maturation = 15
|
||||
production = 1
|
||||
yield = 3
|
||||
potency = 30
|
||||
plant_type = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /mob/living/simple_animal/mushroom(user.loc)
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the walking mushroom.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
|
||||
seed = "/obj/item/seeds/chantermycelium"
|
||||
name = "chanterelle cluster"
|
||||
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
|
||||
icon_state = "chanterelle"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment",1+round((potency / 25), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
|
||||
seed = "/obj/item/seeds/glowshroom"
|
||||
name = "glowshroom cluster"
|
||||
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
|
||||
icon_state = "glowshroom"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("radium",1+round((potency / 20), 1))
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)
|
||||
else
|
||||
src.SetLuminosity(round(potency/10,1))
|
||||
lifespan = 120 //ten times that is the delay
|
||||
endurance = 30
|
||||
maturation = 15
|
||||
production = 1
|
||||
yield = 3
|
||||
potency = 30
|
||||
plant_type = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
|
||||
|
||||
planted.delay = lifespan * 50
|
||||
planted.endurance = endurance
|
||||
planted.yield = yield
|
||||
planted.potency = potency
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the glowshroom.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Del()
|
||||
if(istype(loc,/mob))
|
||||
loc.SetLuminosity(round(loc.luminosity - potency/10,1))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/10),1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/10),1))
|
||||
SetLuminosity(round(potency/10,1))
|
||||
|
||||
//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/money
|
||||
seed = "/obj/item/seeds/cashseed"
|
||||
name = "dosh"
|
||||
desc = "Green and lush."
|
||||
icon_state = "spawner"
|
||||
potency = 10
|
||||
New()
|
||||
switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
|
||||
if(0 to 10)
|
||||
new/obj/item/weapon/spacecash/(src.loc)
|
||||
if(11 to 20)
|
||||
new/obj/item/weapon/spacecash/c10(src.loc)
|
||||
if(21 to 30)
|
||||
new/obj/item/weapon/spacecash/c20(src.loc)
|
||||
if(31 to 40)
|
||||
new/obj/item/weapon/spacecash/c50(src.loc)
|
||||
if(41 to 50)
|
||||
new/obj/item/weapon/spacecash/c100(src.loc)
|
||||
if(51 to 60)
|
||||
new/obj/item/weapon/spacecash/c200(src.loc)
|
||||
if(61 to 80)
|
||||
new/obj/item/weapon/spacecash/c500(src.loc)
|
||||
else
|
||||
new/obj/item/weapon/spacecash/c1000(src.loc)
|
||||
spawn(5) //Workaround to keep harvesting from working weirdly.
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
|
||||
seed = "/obj/item/seeds/bluespacetomatoseed"
|
||||
name = "blue-space tomato"
|
||||
desc = "So lubricated, you might slip through space-time."
|
||||
icon_state = "bluespacetomato"
|
||||
potency = 20
|
||||
origin_tech = "bluespace=3"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
|
||||
reagents.add_reagent("singulo", 1+round((potency / 5), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
@@ -0,0 +1,138 @@
|
||||
// **********************
|
||||
// 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/product //a type path
|
||||
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")
|
||||
|
||||
/obj/item/weapon/grown/log/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("<span class='notice'>You make planks out of the [src]!</span>", 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 = 0
|
||||
seed = "/obj/item/seeds/sunflower"
|
||||
|
||||
/obj/item/weapon/grown/novaflower
|
||||
name = "novaflower"
|
||||
desc = "It's beautiful! A certain person might beat you to death if you trample these."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "novaflower"
|
||||
damtype = "fire"
|
||||
force = 0
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 0
|
||||
seed = "/obj/item/seeds/novaflower"
|
||||
attack_verb = list("seared", "heated", "whacked", "steamed")
|
||||
|
||||
/obj/item/weapon/grown/nettle // -- Skie
|
||||
desc = "It's probably <B>not</B> 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 = 1.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 \red<B> rage</B>\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 = 1.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 <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|TOXLOSS)
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Hydroponic Item Procs and Stuff
|
||||
* Contains:
|
||||
* Sunflowers Novaflowers Nettle Deathnettle Corncob
|
||||
*/
|
||||
|
||||
//Sun/Novaflower
|
||||
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
||||
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(!..()) return
|
||||
if(istype(M, /mob/living))
|
||||
M << "\red You are heated by the warmth of the of the [name]!"
|
||||
M.bodytemperature += potency/2 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
|
||||
/obj/item/weapon/grown/novaflower/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
if(endurance > 0)
|
||||
endurance -= rand(1,(endurance/3)+1)
|
||||
else
|
||||
usr << "All the petals have fallen off the [name] from violent whacking."
|
||||
del(src)
|
||||
|
||||
|
||||
//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/limb/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)
|
||||
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/limb/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()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'> [user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey])</font>")
|
||||
|
||||
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)
|
||||
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))
|
||||
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
||||
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
//Bluespace Tomatoes
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/mob/M = usr
|
||||
var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport.
|
||||
var/inner_teleport_radius = potency/15
|
||||
var/list/turfs = new/list()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats.
|
||||
new/obj/effect/decal/cleanable/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
del(src)
|
||||
return
|
||||
for(var/turf/T in orange(M,outer_teleport_radius))
|
||||
if(T in orange(M,inner_teleport_radius)) continue
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-outer_teleport_radius || T.x<outer_teleport_radius) continue
|
||||
if(T.y>world.maxy-outer_teleport_radius || T.y<outer_teleport_radius) continue
|
||||
turfs += T
|
||||
if(!turfs.len)
|
||||
var/list/turfs_to_pick_from = list()
|
||||
for(var/turf/T in orange(M,outer_teleport_radius))
|
||||
if(!(T in orange(M,inner_teleport_radius)))
|
||||
turfs_to_pick_from += T
|
||||
turfs += pick(/turf in turfs_to_pick_from)
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
switch(rand(1,2))//Decides randomly to teleport the thrower or the throwee.
|
||||
if(1) // Teleports the person who threw the tomato.
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/molten_item(M.loc) //Leaves a pile of goo behind for dramatic effect.
|
||||
M.loc = picked //
|
||||
sleep(1)
|
||||
s.set_up(3, 1, M)
|
||||
s.start() //Two set of sparks, one before the teleport and one after.
|
||||
if(2) //Teleports mob the tomato hit instead.
|
||||
for(var/mob/A in get_turf(hit_atom))//For the mobs in the tile that was hit...
|
||||
s.set_up(3, 1, A)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/molten_item(A.loc) //Leave a pile of goo behind for dramatic effect...
|
||||
A.loc = picked//And teleport them to the chosen location.
|
||||
sleep(1)
|
||||
s.set_up(3, 1, A)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed, causing a distortion in space-time.</span>","<span class='moderate'>You hear a splat and a crackle.</span>")
|
||||
del(src)
|
||||
return
|
||||
@@ -0,0 +1,201 @@
|
||||
// Plant analyzer
|
||||
/obj/item/device/analyzer/plant_analyzer
|
||||
name = "plant analyzer"
|
||||
desc = "A scanner used to evaluate a plant's various areas of growth."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hydro"
|
||||
item_state = "analyzer"
|
||||
origin_tech = "magnets=1;biotech=1"
|
||||
|
||||
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 | USEDELAY
|
||||
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 <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/pestspray // -- Skie
|
||||
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
name = "pest-spray"
|
||||
icon_state = "pestspray"
|
||||
item_state = "spray"
|
||||
flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
|
||||
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 <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
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 | USEDELAY
|
||||
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/glyphosate
|
||||
name = "bottle of glyphosate"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 4
|
||||
WeedKillStr = 2
|
||||
|
||||
/obj/item/weedkiller/triclopyr
|
||||
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 = 1.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)
|
||||
|
||||
|
||||
@@ -0,0 +1,908 @@
|
||||
/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.
|
||||
adjustSYield(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...
|
||||
adjustSYield(1)
|
||||
//world << "Yield increased by 1, to a total of [myseed.yield]"
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
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++
|
||||
|
||||
//Nutrients//////////////////////////////////////////////////////////////
|
||||
// Nutrients deplete slowly
|
||||
if(prob(50))
|
||||
adjustNutri(-1)
|
||||
|
||||
// Lack of nutrients hurts non-weeds
|
||||
if(nutrilevel <= 0 && myseed.plant_type != 1)
|
||||
adjustHealth(-rand(1,3))
|
||||
|
||||
//Water//////////////////////////////////////////////////////////////////
|
||||
// Drink random amount of water
|
||||
adjustWater(-rand(1,6))
|
||||
|
||||
// If the plant is dry, it loses health pretty fast, unless mushroom
|
||||
if(waterlevel <= 10 && myseed.plant_type != 2)
|
||||
adjustHealth(-rand(0,1))
|
||||
if(waterlevel <= 0)
|
||||
adjustHealth(-rand(0,2))
|
||||
|
||||
// Sufficient water level and nutrient level = plant healthy
|
||||
else if(waterlevel > 10 && nutrilevel > 0)
|
||||
adjustHealth(rand(1,2))
|
||||
if(prob(5)) //5 percent chance the weed population will increase
|
||||
adjustWeeds(1)
|
||||
|
||||
//Toxins/////////////////////////////////////////////////////////////////
|
||||
|
||||
// Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly
|
||||
if(toxic >= 40 && toxic < 80)
|
||||
adjustHealth(-1)
|
||||
adjustToxic(-rand(1,10))
|
||||
else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out
|
||||
adjustHealth(-3)
|
||||
adjustToxic(-rand(1,10))
|
||||
|
||||
//Pests & Weeds//////////////////////////////////////////////////////////
|
||||
|
||||
else if(pestlevel >= 5)
|
||||
adjustHealth(-1)
|
||||
|
||||
// If it's a weed, it doesn't stunt the growth
|
||||
if(weedlevel >= 5 && myseed.plant_type != 1 )
|
||||
adjustHealth(-1)
|
||||
|
||||
//Health & Age///////////////////////////////////////////////////////////
|
||||
|
||||
// Plant dies if health <= 0
|
||||
if(health <= 0)
|
||||
dead = 1
|
||||
harvest = 0
|
||||
adjustWeeds(1) // Weeds flourish
|
||||
pestlevel = 0 // Pests die
|
||||
|
||||
// If the plant is too old, lose health fast
|
||||
if(age > myseed.lifespan)
|
||||
adjustHealth(-rand(1,5))
|
||||
|
||||
// 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
|
||||
adjustPests(1)
|
||||
else
|
||||
if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
|
||||
adjustWeeds(1)
|
||||
|
||||
// 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
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
|
||||
obj/machinery/hydroponics/update_icon()
|
||||
//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 || pestlevel >= 5 || 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)
|
||||
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
|
||||
update_icon()
|
||||
visible_message("\blue [src] has been overtaken by [myseed.plantname].")
|
||||
|
||||
|
||||
|
||||
obj/machinery/hydroponics/proc/mutate(var/lifemut=2, var/endmut=5, var/productmut=1, var/yieldmut=2, var/potmut=25) // Mutates the current seed
|
||||
adjustSLife(rand(-lifemut,lifemut))
|
||||
adjustSEnd(rand(-endmut,endmut))
|
||||
adjustSProduct(rand(-productmut,productmut))
|
||||
adjustSYield(rand(-yieldmut,yieldmut))
|
||||
adjustSPot(rand(-potmut,potmut))
|
||||
|
||||
|
||||
obj/machinery/hydroponics/proc/hardmutate()
|
||||
mutate(4, 10, 2, 4, 50)
|
||||
|
||||
|
||||
obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
|
||||
|
||||
if(myseed.mutatelist.len > 0)
|
||||
var/mutantseed = pick(myseed.mutatelist)
|
||||
del(myseed)
|
||||
myseed = new mutantseed
|
||||
|
||||
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
|
||||
update_icon()
|
||||
visible_message("\red[src] has suddenly mutated into \blue [myseed.plantname]!")
|
||||
|
||||
|
||||
|
||||
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
|
||||
update_icon()
|
||||
visible_message("\red The mutated weeds in [src] spawned a \blue [myseed.plantname]!")
|
||||
else
|
||||
usr << "The few weeds in [src] seem to react, but only for a moment..."
|
||||
|
||||
|
||||
|
||||
obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier
|
||||
health = 0
|
||||
dead = 1
|
||||
harvest = 0
|
||||
update_icon()
|
||||
visible_message("\red[src] is looking very unhealthy!")
|
||||
|
||||
|
||||
|
||||
obj/machinery/hydroponics/proc/mutatepest()
|
||||
if(pestlevel > 5)
|
||||
visible_message("The pests seem to behave oddly...")
|
||||
for(var/i=0, i<3, i++)
|
||||
var/obj/effect/spider/spiderling/S = new(src.loc)
|
||||
S.grow_as = /mob/living/simple_animal/hostile/giant_spider/hunter
|
||||
else
|
||||
usr << "The pests seem to behave oddly, but quickly settle down..."
|
||||
|
||||
|
||||
|
||||
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/bucket))
|
||||
var/b_amount = O.reagents.get_reagent_amount("water")
|
||||
if(b_amount > 0 && waterlevel < 100)
|
||||
O.reagents.remove_reagent("water", b_amount)
|
||||
adjustWater(b_amount)
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
user << "You fill [src] with [b_amount] units of water."
|
||||
adjustToxic(-round(b_amount/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
|
||||
|
||||
else if(waterlevel >= 100)
|
||||
user << "\red [src] is already full."
|
||||
else
|
||||
user << "\red [O] is not filled with water."
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/nutrient))
|
||||
var/obj/item/nutrient/myNut = O
|
||||
user.u_equip(O)
|
||||
adjustNutri(10)
|
||||
yieldmod = myNut.yieldmod
|
||||
mutmod = myNut.mutmod
|
||||
user << "You replace the nutrient solution in the [src]."
|
||||
del(O)
|
||||
update_icon()
|
||||
|
||||
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 [S] is empty."
|
||||
return
|
||||
user << "\red You inject the [myseed.plantname] with a chemical solution."
|
||||
|
||||
//SOON
|
||||
|
||||
// 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))
|
||||
adjustToxic(-round(S.reagents.get_reagent_amount("anti_toxin")*2))
|
||||
|
||||
// NIGGA, YOU JUST WENT ON FULL RETARD.
|
||||
if(S.reagents.has_reagent("toxin", 1))
|
||||
adjustToxic(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))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("milk")*0.1))
|
||||
adjustWater(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))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("beer")*0.05))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("beer")*0.25))
|
||||
adjustWater(round(S.reagents.get_reagent_amount("beer")*0.7))
|
||||
|
||||
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
|
||||
if(S.reagents.has_reagent("fluorine", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("fluorine")*2))
|
||||
adjustToxic(round(S.reagents.get_reagent_amount("flourine")*2.5))
|
||||
adjustWater(-round(S.reagents.get_reagent_amount("flourine")*0.5))
|
||||
adjustWeeds(-rand(1,4))
|
||||
|
||||
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
|
||||
if(S.reagents.has_reagent("chlorine", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("chlorine")*1))
|
||||
adjustToxic(round(S.reagents.get_reagent_amount("chlorine")*1.5))
|
||||
adjustWater(-round(S.reagents.get_reagent_amount("chlorine")*0.5))
|
||||
adjustWeeds(-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))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("phosphorus")*0.75))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("phosphorus")*0.1))
|
||||
adjustWater(-round(S.reagents.get_reagent_amount("phosphorus")*0.5))
|
||||
adjustWeeds(-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))
|
||||
adjustWeeds(rand(1,2))
|
||||
adjustPests(rand(1,2))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("sugar")*0.1))
|
||||
|
||||
// It is water!
|
||||
if(S.reagents.has_reagent("water", 1))
|
||||
adjustWater(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))
|
||||
adjustWater(round(S.reagents.get_reagent_amount("holywater")*1))
|
||||
adjustHealth(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))
|
||||
adjustWater(round(S.reagents.get_reagent_amount("sodawater")*1))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("sodawater")*0.1))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("sodawater")*0.1))
|
||||
|
||||
// Man, you guys are retards
|
||||
if(S.reagents.has_reagent("sacid", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("sacid")*1))
|
||||
adjustToxic(round(S.reagents.get_reagent_amount("sacid")*1.5))
|
||||
adjustWeeds(-rand(1,2))
|
||||
|
||||
// SERIOUSLY
|
||||
if(S.reagents.has_reagent("pacid", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("pacid")*2))
|
||||
adjustToxic(round(S.reagents.get_reagent_amount("pacid")*3))
|
||||
adjustWeeds(-rand(1,4))
|
||||
|
||||
// Plant-B-Gone is just as bad
|
||||
if(S.reagents.has_reagent("plantbgone", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("plantbgone")*2))
|
||||
adjustToxic(-round(S.reagents.get_reagent_amount("plantbgone")*3))
|
||||
adjustWeeds(-rand(4,8))
|
||||
|
||||
// Healing
|
||||
if(S.reagents.has_reagent("cryoxadone", 1))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("cryoxadone")*3))
|
||||
adjustToxic(-round(S.reagents.get_reagent_amount("cryoxadone")*3))
|
||||
|
||||
// Ammonia is bad ass.
|
||||
if(S.reagents.has_reagent("ammonia", 1))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("ammonia")*0.5))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("ammonia")*1))
|
||||
|
||||
// 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))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("diethylamine")*1))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("diethylamine")*2))
|
||||
adjustPests(-rand(1,2))
|
||||
|
||||
// Compost, effectively
|
||||
if(S.reagents.has_reagent("nutriment", 1))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("nutriment")*0.5))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("nutriment")*1))
|
||||
|
||||
// Poor man's mutagen.
|
||||
if(S.reagents.has_reagent("radium", 1))
|
||||
adjustHealth(-round(S.reagents.get_reagent_amount("radium")*1.5))
|
||||
adjustToxic(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))
|
||||
adjustWater(round(S.reagents.get_reagent_amount("adminordrazine")*1))
|
||||
adjustHealth(round(S.reagents.get_reagent_amount("adminordrazine")*1))
|
||||
adjustNutri(round(S.reagents.get_reagent_amount("adminordrazine")*1))
|
||||
adjustPests(-rand(1,5))
|
||||
adjustWeeds(-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()
|
||||
else
|
||||
user << "You can't get any extract out of this plant."
|
||||
else
|
||||
user << "There's nothing to apply the solution into."
|
||||
update_icon()
|
||||
|
||||
else if( istype(O, /obj/item/seeds/) )
|
||||
if(!planted)
|
||||
user.u_equip(O)
|
||||
user << "You plant [O]."
|
||||
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)
|
||||
update_icon()
|
||||
|
||||
else
|
||||
user << "\red [src] already has seeds in it!"
|
||||
|
||||
else if(istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
if(planted && myseed)
|
||||
user << "*** <B>[myseed.plantname]</B> ***" //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 << "<B>No plant found.</B>"
|
||||
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)
|
||||
adjustHealth(-rand(5,20))
|
||||
adjustPests(-2)
|
||||
adjustWeeds(-3)
|
||||
adjustToxic(4)//Oops
|
||||
visible_message("\red <B>[src] has been sprayed with [O][(user ? " by [user]." : ".")]")
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weapon/minihoe))
|
||||
if(weedlevel > 0)
|
||||
user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from [src].")
|
||||
weedlevel = 0
|
||||
update_icon()
|
||||
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)
|
||||
adjustToxic(myWKiller.toxicity)
|
||||
adjustWeeds(-myWKiller.WeedKillStr)
|
||||
user << "You apply the weedkiller solution into the [src]."
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
del(O)
|
||||
update_icon()
|
||||
|
||||
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)
|
||||
adjustToxic(myPKiller.toxicity)
|
||||
adjustPests(-myPKiller.PestKillStr)
|
||||
user << "You apply the pestkiller solution into the [src]."
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
del(O)
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "You [anchored ? "wrench" : "unwrench"] [src]."
|
||||
else if(istype(O, /obj/item/weapon/shovel))
|
||||
if(istype(src, /obj/machinery/hydroponics/soil))
|
||||
user << "You clear up [src]!"
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/hydroponics/attack_hand(mob/user as mob)
|
||||
if(istype(user, /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
|
||||
user << "You remove the dead plant from [src]."
|
||||
del(myseed)
|
||||
update_icon()
|
||||
else
|
||||
if(planted && !dead)
|
||||
user << "[src] has \blue [myseed.plantname] \black planted."
|
||||
if(health <= (myseed.endurance / 2))
|
||||
user << "The plant looks unhealthy."
|
||||
else
|
||||
user << "[src] is empty."
|
||||
user << "Water: [waterlevel]/100"
|
||||
user << "Nutrient: [nutrilevel]/10"
|
||||
if(weedlevel >= 5) // Visual aid for those blind
|
||||
user << "The [src] is filled with weeds!"
|
||||
if(pestlevel >= 5) // Visual aid for those blind
|
||||
user << "The [src] is filled with tiny worms!"
|
||||
user << "" // Empty line for readability.
|
||||
|
||||
/obj/item/seeds/proc/harvest(mob/user = usr)
|
||||
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 product(user.loc, potency) // User gets a consumable
|
||||
if(!t_prod) return
|
||||
t_prod.seed = type
|
||||
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/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 product(user.loc, potency) // User gets a consumable
|
||||
|
||||
t_prod.seed = type
|
||||
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/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 product(user.loc, potency) // User gets a consumable -QualityVan
|
||||
t_prod.seed = type
|
||||
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/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 product(user.loc, potency) // User gets a consumable -QualityVan
|
||||
t_prod.seed = type
|
||||
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/obj/machinery/hydroponics/parent = loc //for ease of access
|
||||
var/t_amount = 0
|
||||
|
||||
while(t_amount < (yield * parent.yieldmod))
|
||||
new product(user.loc)
|
||||
t_amount++
|
||||
|
||||
parent.update_tray()
|
||||
|
||||
/obj/item/seeds/replicapod/harvest(mob/user = usr) //now that one is fun -- Urist
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
var/make_podman = 0
|
||||
var/mob/ghost
|
||||
if(ckey && config.revival_pod_plants)
|
||||
ghost = find_dead_player("[ckey]")
|
||||
if(ismob(ghost))
|
||||
if(istype(ghost,/mob/dead/observer))
|
||||
var/mob/dead/observer/O = ghost
|
||||
if(istype(mind,/datum/mind))
|
||||
if(O.can_reenter_corpse)
|
||||
make_podman = 1
|
||||
else
|
||||
make_podman = 1
|
||||
|
||||
if(make_podman) //all conditions met!
|
||||
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
|
||||
if(realName)
|
||||
podman.real_name = realName
|
||||
else
|
||||
podman.real_name = "Pod Person [rand(0,999)]"
|
||||
var/oldactive = mind.active
|
||||
mind.active = 1
|
||||
mind.transfer_to(podman)
|
||||
mind.active = oldactive
|
||||
// -- Mode/mind specific stuff goes here. TODO! Broken :( Should be merged into mob/living/Login
|
||||
switch(ticker.mode.name)
|
||||
if("revolution")
|
||||
if(podman.mind in ticker.mode:revolutionaries)
|
||||
ticker.mode:add_revolutionary(podman.mind)
|
||||
ticker.mode:update_all_rev_icons() //So the icon actually appears
|
||||
if(podman.mind in ticker.mode:head_revolutionaries)
|
||||
ticker.mode:update_all_rev_icons()
|
||||
if("nuclear emergency")
|
||||
if(podman.mind in ticker.mode:syndicates)
|
||||
ticker.mode:update_all_synd_icons()
|
||||
if("cult")
|
||||
if(podman.mind in ticker.mode:cult)
|
||||
ticker.mode:add_cultist(podman.mind)
|
||||
ticker.mode:update_all_cult_icons() //So the icon actually appears
|
||||
|
||||
// -- End mode specific stuff
|
||||
|
||||
podman.gender = ghost.gender
|
||||
if(podman.gender in list(NEUTER, PLURAL)) //Sanity check, which should never actually happen.
|
||||
podman.gender = pick(MALE,FEMALE)
|
||||
|
||||
if(!podman.dna)
|
||||
podman.dna = new /datum/dna()
|
||||
podman.dna.real_name = podman.real_name
|
||||
if(ui)
|
||||
podman.dna.uni_identity = ui
|
||||
updateappearance(podman, ui)
|
||||
if(se)
|
||||
podman.dna.struc_enzymes = se
|
||||
if(!prob(potency)) //if it fails, plantman!
|
||||
if(podman.dna)
|
||||
podman.dna.mutantrace = "plant"
|
||||
podman.update_mutantrace()
|
||||
|
||||
else //else, one packet of seeds. maybe two
|
||||
var/seed_count = 1
|
||||
if(prob(yield * parent.yieldmod * 20))
|
||||
seed_count++
|
||||
for(var/i=0,i<seed_count,i++)
|
||||
var/obj/item/seeds/replicapod/harvestseeds = new /obj/item/seeds/replicapod(user.loc)
|
||||
harvestseeds.lifespan = lifespan
|
||||
harvestseeds.endurance = endurance
|
||||
harvestseeds.maturation = maturation
|
||||
harvestseeds.production = production
|
||||
harvestseeds.yield = yield
|
||||
harvestseeds.potency = potency
|
||||
|
||||
parent.update_tray()
|
||||
|
||||
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers))
|
||||
|
||||
user << "You inject the contents of the syringe into the seeds."
|
||||
|
||||
for(var/datum/reagent/blood/bloodSample in W:reagents.reagent_list)
|
||||
var/mob/living/carbon/human/source = bloodSample.data["donor"] //hacky, since it gets the CURRENT condition of the mob, not how it was when the blood sample was taken
|
||||
if(!istype(source))
|
||||
continue
|
||||
//ui = bloodSample.data["blood_dna"] doesn't work for whatever reason
|
||||
ui = source.dna.uni_identity
|
||||
se = source.dna.struc_enzymes
|
||||
if(source.ckey)
|
||||
ckey = source.ckey
|
||||
else if(source.mind)
|
||||
ckey = ckey(source.mind.key)
|
||||
realName = source.real_name
|
||||
gender = source.gender
|
||||
|
||||
if(!isnull(source.mind))
|
||||
mind = source.mind
|
||||
|
||||
W:reagents.clear_reagents()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/proc/update_tray(mob/user = usr)
|
||||
harvest = 0
|
||||
lastproduce = age
|
||||
if((yieldmod * myseed.yield) <= 0)
|
||||
user << "\red You fail to harvest anything useful."
|
||||
else
|
||||
user << "You harvest from the [myseed.plantname]."
|
||||
if(myseed.oneharvest)
|
||||
del(myseed)
|
||||
planted = 0
|
||||
dead = 0
|
||||
update_icon()
|
||||
|
||||
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
|
||||
/obj/machinery/hydroponics/proc/adjustNutri(var/adjustamt)
|
||||
nutrilevel += adjustamt
|
||||
nutrilevel = max(nutrilevel, 0)
|
||||
nutrilevel = min(nutrilevel, 10)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustWater(var/adjustamt)
|
||||
waterlevel += adjustamt
|
||||
waterlevel = max(waterlevel, 0)
|
||||
waterlevel = min(waterlevel, 100)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustHealth(var/adjustamt)
|
||||
health += adjustamt
|
||||
health = max(health, 0)
|
||||
health = min(health, myseed.endurance)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustToxic(var/adjustamt)
|
||||
toxic += adjustamt
|
||||
toxic = max(toxic, 0)
|
||||
toxic = min(toxic, 100)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustPests(var/adjustamt)
|
||||
pestlevel += adjustamt
|
||||
pestlevel = max(pestlevel, 0)
|
||||
pestlevel = min(pestlevel, 10)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustWeeds(var/adjustamt)
|
||||
weedlevel += adjustamt
|
||||
weedlevel = max(weedlevel, 0)
|
||||
pestlevel = min(pestlevel, 10)
|
||||
|
||||
/// Seed Setters ///
|
||||
/obj/machinery/hydroponics/proc/adjustSYield(var/adjustamt)//0,10
|
||||
if(myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
myseed.yield += adjustamt
|
||||
myseed.yield = max(myseed.yield, 0)
|
||||
myseed.yield = min(myseed.yield, 10)
|
||||
if(myseed.yield <= 0 && myseed.plant_type == 2)
|
||||
myseed.yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustSLife(var/adjustamt)//10,100
|
||||
myseed.lifespan += adjustamt
|
||||
myseed.lifespan = max(myseed.lifespan, 10)
|
||||
myseed.lifespan = min(myseed.lifespan, 100)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustSEnd(var/adjustamt)//10,100
|
||||
myseed.endurance += adjustamt
|
||||
myseed.endurance = max(myseed.endurance, 10)
|
||||
myseed.endurance = min(myseed.endurance, 100)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustSProduct(var/adjustamt)//2,10
|
||||
myseed.production += adjustamt
|
||||
myseed.production = max(myseed.endurance, 2)
|
||||
myseed.production = min(myseed.endurance, 10)
|
||||
|
||||
/obj/machinery/hydroponics/proc/adjustSPot(var/adjustamt)//0,100
|
||||
if(myseed.potency != -1) //Not all plants have a potency
|
||||
myseed.potency += adjustamt
|
||||
myseed.potency = max(myseed.potency, 0)
|
||||
myseed.potency = min(myseed.potency, 100)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/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
|
||||
|
||||
update_icon() // 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
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user