Plant Refactor 4

This commit is contained in:
c0
2016-03-07 12:46:12 +03:00
parent 9f302e6ed4
commit 08bdcc3024
38 changed files with 485 additions and 529 deletions
@@ -81,7 +81,7 @@
return
if(sound)
playsound(src.loc, 'sound/weapons/chainsawhit.ogg', 100, 1)
new L.plank_type(src.loc, 1 + round(L.potency / 25))
new L.plank_type(src.loc, 1 + round(L.seed.potency / 25))
qdel(L)
/mob/living/simple_animal/chicken/rabbit/normal
+3 -3
View File
@@ -11,7 +11,6 @@
var/eatverb
var/wrapped = 0
var/dried_type = null
var/potency = null
var/dry = 0
var/cooked_type = null //for microwave cooking. path of the resulting item after microwaving
var/filling_color = "#FFFFFF" //color to use when added to custom food.
@@ -28,8 +27,9 @@
usr.unEquip(src) //so icons update :[
if(trash)
if(ispath(trash,/obj/item/weapon/grown))
var/obj/item/TrashItem = new trash(usr,src.potency)
if(ispath(trash, /obj/item/weapon/grown) && istype(src, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = src
var/obj/item/TrashItem = new trash(usr, G.seed)
usr.put_in_hands(TrashItem)
else if(ispath(trash,/obj/item))
var/obj/item/TrashItem = new trash(usr)
@@ -148,10 +148,10 @@
/obj/machinery/juicer/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O)
if (!istype(O))
return 5
else if (O.potency == -1)
else if (O.seed.potency == -1)
return 5
else
return round(5*sqrt(O.potency))
return round(5*sqrt(O.seed.potency))
/obj/machinery/juicer/proc/juice()
power_change() //it is a portable machine
+34 -60
View File
@@ -3,62 +3,44 @@
// Data from the seeds carry over to these grown foods
// ***********************************************************
// Base type. Subtypes are found in /grown.
// Base type. Subtypes are found in /grown dir.
/obj/item/weapon/reagent_containers/food/snacks/grown
icon = 'icons/obj/hydroponics/harvest.dmi'
var/seed = null
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
var/plantname = ""
var/product //a type path
var/lifespan = 0
var/endurance = 0
var/maturation = 0
var/production = 0
var/yield = 0
var/plant_type = PLANT_NORMAL
var/bitesize_mod = 0
// If set, bitesize = 1 + round(reagents.total_volume / bitesize_mod)
var/list/reagents_add = list()
// A list of reagents to add.
// Format: "reagent_id" = potency multiplier
// Stronger reagents must always come first to avoid being displaced by weaker ones.
// Total amount of any reagent in plant is calculated by formula: 1 + round(potency * multiplier)
potency = -1
dried_type = -1
// Saves us from having to define each stupid grown's dried_type as itself.
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
burn_state = FLAMMABLE
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, new_potency = 50)
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, var/obj/item/seeds/new_seed = null)
..()
potency = new_potency
if(new_seed)
seed = new_seed.Copy()
else if(ispath(seed))
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
seed = new seed()
seed.potency = 50
seed.prepare_result(src)
else // Something is terribly wrong
qdel(src)
return
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
if(dried_type == -1)
dried_type = src.type
if(seed && lifespan == 0)
// This is for adminspawn or map-placed growns. They get the default stats of their seed type. This feels like a hack but people insist on putting these things on the map...
var/obj/item/seeds/S = new seed(src)
lifespan = S.lifespan
endurance = S.endurance
maturation = S.maturation
production = S.production
yield = S.yield
qdel(S) //Foods drop their contents when eaten, so delete the default seed.
add_juice()
transform *= TransformUsingVariable(potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!
transform *= TransformUsingVariable(seed.potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/add_juice()
if(reagents)
for(var/reagent_id in reagents_add)
if(reagent_id == "blood") // Hack to make blood in plants always O-
reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id]), list("blood_type"="O-"))
continue
reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id]))
if(bitesize_mod)
bitesize = 1 + round(reagents.total_volume / bitesize_mod)
return 1
@@ -67,46 +49,38 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
..()
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(PLANT_NORMAL)
msg += "- Plant type: <i>Normal plant</i>\n"
if(PLANT_WEED)
msg += "- Plant type: <i>Weed</i>. Can grow in nutrient-poor soil.\n"
if(PLANT_MUSHROOM)
msg += "- Plant type: <i>Mushroom</i>. Can grow in dry soil.\n"
else
msg += "- Plant type: <i>UNKNOWN</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 += "- Nutritional value: <i>[reagents.get_reagent_amount("nutriment")]</i>\n"
msg += "- Other substances: <i>[reagents.total_volume-reagents.get_reagent_amount("nutriment")]</i>\n"
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
msg += seed.get_analyzer_text()
msg += "\n- Nutritional value: [reagents.get_reagent_amount("nutriment")]\n"
msg += "- Other substances: [reagents.total_volume-reagents.get_reagent_amount("nutriment")]\n"
msg += "*---------*</span>"
var/list/scannable_reagents = list("charcoal" = "Anti-Toxin", "morphine" = "Morphine", "amatoxin" = "Amatoxins",
"toxin" = "Toxins", "mushroomhallucinogen" = "Mushroom Hallucinogen", "condensedcapsaicin" = "Condensed Capsaicin",
"capsaicin" = "Capsaicin", "frostoil" = "Frost Oil", "gold" = "Mineral Content",
"capsaicin" = "Capsaicin", "frostoil" = "Frost Oil", "gold" = "Mineral Content", "glycerol" = "Glycerol",
"radium" = "Highly Radioactive Material", "uranium" = "Radioactive Material")
var/reag_txt = ""
for(var/reagent_id in scannable_reagents)
if(reagent_id in reagents_add)
if(reagent_id in seed.reagents_add)
var/amt = reagents.get_reagent_amount(reagent_id)
reag_txt += "<span class='info'>- [scannable_reagents[reagent_id]]: [amt*100/reagents.maximum_volume]%</span>\n"
reag_txt += "\n<span class='info'>- [scannable_reagents[reagent_id]]: [amt*100/reagents.maximum_volume]%</span>"
user << msg
if(reag_txt)
user << reag_txt
user << "<span class='info'>*---------*</span>"
msg += reag_txt
msg += "<span class='info'>*---------*</span>"
user << msg
return
return
// For item-containing growns such as eggy or gatfruit
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/attack_self(mob/user as mob)
if(trash)
new trash(user.loc)
user.unEquip(src)
if(trash)
var/obj/item/weapon/T
if(ispath(trash, /obj/item/weapon/grown))
T = new trash(user.loc, seed)
else
T = new trash(user.loc)
user.put_in_hands(T)
user << "<span class='notice'>You open [src]\'s shell, revealing [T].</span>"
qdel(src)
+4 -5
View File
@@ -1,12 +1,11 @@
// Ambrosia - base type
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia
seed = /obj/item/seeds/ambrosia
name = "ambrosia branch"
desc = "This is a plant."
icon_state = "ambrosiavulgaris"
slot_flags = SLOT_HEAD
filling_color = "#008000"
reagents_add = list("nutriment" = 0)
// It means 1 nutriment no matter how low or high potency is
bitesize_mod = 2
// Ambrosia Vulgaris
@@ -23,12 +22,12 @@
potency = 5
icon_dead = "ambrosia-dead"
mutatelist = list(/obj/item/seeds/ambrosia/deus)
reagents_add = list("space_drugs" = 0.15, "salglu_solution" = 0.25, "vitamin" = 0.04, "nutriment" = 0, "toxin" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris
seed = /obj/item/seeds/ambrosia
name = "ambrosia vulgaris branch"
desc = "This is a plant containing various healing chemicals."
reagents_add = list("space_drugs" = 0.15, "salglu_solution" = 0.25, "vitamin" = 0.04, "nutriment" = 0, "toxin" = 0.1)
// Ambrosia Deus
/obj/item/seeds/ambrosia/deus
@@ -39,6 +38,7 @@
plantname = "Ambrosia Deus"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus
mutatelist = list()
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0)
rarity = 40
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus
@@ -46,5 +46,4 @@
name = "ambrosia deus branch"
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
filling_color = "#008B8B"
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0)
filling_color = "#008B8B"
+4 -4
View File
@@ -12,6 +12,7 @@
icon_grow = "apple-grow"
icon_dead = "apple-dead"
mutatelist = list(/obj/item/seeds/apple/gold)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/apple
seed = /obj/item/seeds/apple
@@ -19,18 +20,17 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
filling_color = "#FF4500"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize = 100 // Always eat the apple in one bite
// Posioned Apple
/obj/item/seeds/apple/poisoned
product = /obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
mutatelist = list()
reagents_add = list("cyanide" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 50 // Source of cyanide, and hard (almost impossible) to obtain normally.
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
seed = /obj/item/seeds/apple/poisoned
reagents_add = list("cyanide" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
// Gold Apple
/obj/item/seeds/apple/gold
@@ -43,6 +43,7 @@
maturation = 10
production = 10
mutatelist = list()
reagents_add = list("gold" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 40 // Alchemy!
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/gold
@@ -50,5 +51,4 @@
name = "golden apple"
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
filling_color = "#FFD700"
reagents_add = list("gold" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
filling_color = "#FFD700"
+7 -7
View File
@@ -10,6 +10,7 @@
endurance = 30
icon_dead = "banana-dead"
mutatelist = list(/obj/item/seeds/banana/mime, /obj/item/seeds/banana/bluespace)
reagents_add = list("banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
seed = /obj/item/seeds/banana
@@ -19,7 +20,6 @@
item_state = "banana"
trash = /obj/item/weapon/grown/bananapeel
filling_color = "#FFFF00"
reagents_add = list("banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
@@ -36,7 +36,7 @@
return (OXYLOSS)
// Mimana
// Mimana - invisible sprites are totally a feature!
/obj/item/seeds/banana/mime
name = "pack of mimana seeds"
desc = "They're seeds that grow into mimana trees. When grown, keep away from mime."
@@ -46,6 +46,7 @@
product = /obj/item/weapon/reagent_containers/food/snacks/grown/banana/mime
growthstages = 4
mutatelist = list()
reagents_add = list("nothing" = 0.1, "mutetoxin" = 0.1, "nutriment" = 0.02)
rarity = 15
/obj/item/weapon/reagent_containers/food/snacks/grown/banana/mime
@@ -55,7 +56,6 @@
icon_state = "mimana"
trash = /obj/item/weapon/grown/bananapeel/mimanapeel
filling_color = "#FFFFEE"
reagents_add = list("nothing" = 0.1, "mutetoxin" = 0.1, "nutriment" = 0.02)
// Bluespace Banana
@@ -68,6 +68,7 @@
plantname = "Bluespace Banana Tree"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/banana/bluespace
mutatelist = list()
reagents_add = list("singulo" = 0.2, "banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/banana/bluespace
@@ -77,7 +78,6 @@
trash = /obj/item/weapon/grown/bananapeel/bluespace
filling_color = "#0000FF"
origin_tech = "bluespace=3"
reagents_add = list("singulo" = 0.2, "banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
@@ -101,8 +101,8 @@
/obj/item/weapon/grown/bananapeel/Crossed(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
var/stun = Clamp(potency / 10, 1, 10)
var/weaken = Clamp(potency / 20, 0.5, 5)
var/stun = Clamp(seed.potency / 10, 1, 10)
var/weaken = Clamp(seed.potency / 20, 0.5, 5)
M.slip(stun, weaken, src)
return 1
@@ -114,7 +114,7 @@
/obj/item/weapon/grown/bananapeel/bluespace/Crossed(AM)
if(..())
var/teleport_radius = max(round(potency / 10), 1)
var/teleport_radius = max(round(seed.potency / 10), 1)
do_teleport(AM, get_turf(AM), teleport_radius)
AM << "<span class='notice'>You slip through spacetime!</span>"
+3 -3
View File
@@ -13,6 +13,7 @@
icon_grow = "soybean-grow"
icon_dead = "soybean-dead"
mutatelist = list(/obj/item/seeds/soya/koi)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
seed = /obj/item/seeds/soya
@@ -21,7 +22,6 @@
gender = PLURAL
icon_state = "soybeans"
filling_color = "#F0E68C"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
bitesize_mod = 2
// Koibean
@@ -32,8 +32,9 @@
species = "koibean"
plantname = "Koibean Plants"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/koibeans
mutatelist = list()
potency = 10
mutatelist = list()
reagents_add = list("carpotoxin" = 0.05, "vitamin" = 0.04, "nutriment" = 0.05)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/koibeans
@@ -42,5 +43,4 @@
desc = "Something about these seems fishy."
icon_state = "koibeans"
filling_color = "#F0E68C"
reagents_add = list("carpotoxin" = 0.05, "vitamin" = 0.04, "nutriment" = 0.05)
bitesize_mod = 2
+12 -13
View File
@@ -13,6 +13,7 @@
icon_grow = "berry-grow" // Uses one growth icons set for all the subtypes
icon_dead = "berry-dead" // Same for the dead icon
mutatelist = list(/obj/item/seeds/berry/glow, /obj/item/seeds/berry/poison)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/berries
seed = /obj/item/seeds/berry
@@ -21,7 +22,6 @@
icon_state = "berrypile"
gender = PLURAL
filling_color = "#FF00FF"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize_mod = 2
// Poison Berries
@@ -33,6 +33,7 @@
plantname = "Poison-Berry Bush"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/berries/poison
mutatelist = list(/obj/item/seeds/berry/death)
reagents_add = list("toxin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 10 // Mildly poisonous berries are common in reality
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/poison
@@ -41,7 +42,6 @@
desc = "Taste so good, you could die!"
icon_state = "poisonberrypile"
filling_color = "#C71585"
reagents_add = list("toxin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1)
// Death Berries
/obj/item/seeds/berry/death
@@ -54,6 +54,7 @@
lifespan = 30
potency = 50
mutatelist = list()
reagents_add = list("lexorin" = 0.25, "toxin" = 0.35, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/death
@@ -62,7 +63,6 @@
desc = "Taste so good, you could die!"
icon_state = "deathberrypile"
filling_color = "#708090"
reagents_add = list("lexorin" = 0.25, "toxin" = 0.35, "vitamin" = 0.04, "nutriment" = 0.1)
// Glow Berries
/obj/item/seeds/berry/glow
@@ -75,6 +75,7 @@
lifespan = 30
endurance = 25
mutatelist = list()
reagents_add = list("uranium" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow
@@ -85,22 +86,21 @@
var/brightness_on = 2 //luminosity when on
icon_state = "glowberrypile"
filling_color = "#7CFC00"
reagents_add = list("uranium" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow/Destroy()
if(istype(loc,/mob))
loc.AddLuminosity(round(-potency / 5))
loc.AddLuminosity(round(-seed.potency / 5))
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow/pickup(mob/user)
..()
src.SetLuminosity(0)
user.AddLuminosity(round(potency / 5))
user.AddLuminosity(round(seed.potency / 5))
/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow/dropped(mob/user)
..()
user.AddLuminosity(round(-potency / 5))
src.SetLuminosity(round(potency / 5))
user.AddLuminosity(round(-seed.potency / 5))
src.SetLuminosity(round(seed.potency / 5))
// Cherries
@@ -119,6 +119,7 @@
icon_grow = "cherry-grow"
icon_dead = "cherry-dead"
mutatelist = list(/obj/item/seeds/cherry/blue)
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries
seed = /obj/item/seeds/cherry
@@ -127,7 +128,6 @@
icon_state = "cherry"
gender = PLURAL
filling_color = "#FF0000"
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
bitesize_mod = 2
// Blue Cherries
@@ -147,7 +147,6 @@
desc = "They're cherries that are blue."
icon_state = "bluecherry"
filling_color = "#6495ED"
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
bitesize_mod = 2
@@ -168,6 +167,7 @@
icon_grow = "grape-grow"
icon_dead = "grape-dead"
mutatelist = list(/obj/item/seeds/grape/green)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
seed = /obj/item/seeds/grape
@@ -176,7 +176,6 @@
icon_state = "grapes"
dried_type = /obj/item/weapon/reagent_containers/food/snacks/no_raisin
filling_color = "#FF1493"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
bitesize_mod = 2
// Green Grapes
@@ -187,6 +186,7 @@
species = "greengrape"
plantname = "Green-Grape Vine"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/grapes/green
reagents_add = list("salglu_solution" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
// No rarity: technically it's a beneficial mutant, but it's not exactly "new"...
mutatelist = list()
@@ -194,5 +194,4 @@
seed = /obj/item/seeds/grape/green
name = "bunch of green grapes"
icon_state = "greengrapes"
filling_color = "#7FFF00"
reagents_add = list("salglu_solution" = 0.25, "vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
filling_color = "#7FFF00"
+2 -4
View File
@@ -12,6 +12,7 @@
oneharvest = 1
icon_dead = "wheat-dead"
mutatelist = list(/obj/item/seeds/wheat/oat)
reagents_add = list("nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
seed = /obj/item/seeds/wheat
@@ -21,7 +22,6 @@
icon_state = "wheat"
filling_color = "#F0E68C"
bitesize_mod = 2
reagents_add = list("nutriment" = 0.04)
// Oat
/obj/item/seeds/wheat/oat
@@ -41,7 +41,6 @@
icon_state = "oat"
filling_color = "#556B2F"
bitesize_mod = 2
reagents_add = list("nutriment" = 0.04)
// Rice
/obj/item/seeds/wheat/rice
@@ -61,5 +60,4 @@
gender = PLURAL
icon_state = "rice"
filling_color = "#FAFAD2"
bitesize_mod = 2
reagents_add = list("nutriment" = 0.04)
bitesize_mod = 2
+3 -4
View File
@@ -13,8 +13,8 @@
potency = 20
icon_grow = "chili-grow" // Uses one growth icons set for all the subtypes
icon_dead = "chili-dead" // Same for the dead icon
mutatelist = list(/obj/item/seeds/chili/ice, /obj/item/seeds/chili/ghost)
reagents_add = list("capsaicin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/chili
seed = /obj/item/seeds/chili
@@ -22,7 +22,6 @@
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
reagents_add = list("capsaicin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.04)
bitesize_mod = 2
// Ice Chili
@@ -38,6 +37,7 @@
production = 4
rarity = 20
mutatelist = list()
reagents_add = list("frostoil" = 0.25, "vitamin" = 0.02, "nutriment" = 0.02)
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
seed = /obj/item/seeds/chili/ice
@@ -45,7 +45,6 @@
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
filling_color = "#0000CD"
reagents_add = list("frostoil" = 0.25, "vitamin" = 0.02, "nutriment" = 0.02)
bitesize_mod = 2
// Ghost Chili
@@ -62,6 +61,7 @@
yield = 3
rarity = 20
mutatelist = list()
reagents_add = list("condensedcapsaicin" = 0.3, "capsaicin" = 0.55, "nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili
seed = /obj/item/seeds/chili/ghost
@@ -70,7 +70,6 @@
icon_state = "ghostchilipepper"
var/mob/held_mob
filling_color = "#F8F8FF"
reagents_add = list("condensedcapsaicin" = 0.3, "capsaicin" = 0.55, "nutriment" = 0.04)
bitesize_mod = 4
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user)
+5 -3
View File
@@ -4,7 +4,6 @@
name = "citrus"
desc = "It's so sour, your face will twist."
icon_state = "lime"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
bitesize_mod = 2
// Lime
@@ -20,6 +19,7 @@
yield = 4
potency = 15
mutatelist = list(/obj/item/seeds/orange)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lime
seed = /obj/item/seeds/lime
@@ -43,6 +43,7 @@
icon_grow = "lime-grow"
icon_dead = "lime-dead"
mutatelist = list(/obj/item/seeds/lime)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange
seed = /obj/item/seeds/orange
@@ -65,6 +66,7 @@
icon_grow = "lime-grow"
icon_dead = "lime-dead"
mutatelist = list(/obj/item/seeds/cash)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lemon
seed = /obj/item/seeds/lemon
@@ -86,6 +88,7 @@
lifespan = 55
endurance = 45
yield = 4
reagents_add = list("nutriment" = 0.05)
rarity = 50 // Nanotrasen approves...
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit
@@ -93,12 +96,11 @@
name = "Money Fruit"
desc = "Looks like a lemon with someone buldging from the inside."
icon_state = "moneyfruit"
reagents_add = list("nutriment" = 0.05)
bitesize_mod = 2
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit/add_juice()
..()
switch(potency)
switch(seed.potency)
if(0 to 10)
trash = /obj/item/stack/spacecash
if(11 to 20)
@@ -14,6 +14,7 @@
icon_grow = "cocoapod-grow"
icon_dead = "cocoapod-dead"
mutatelist = list(/obj/item/seeds/cocoapod/vanillapod)
reagents_add = list("cocoa" = 0.25, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
seed = /obj/item/seeds/cocoapod
@@ -21,7 +22,6 @@
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
filling_color = "#FFD700"
reagents_add = list("cocoa" = 0.25, "nutriment" = 0.1)
bitesize_mod = 2
// Vanilla Pod
@@ -33,11 +33,11 @@
plantname = "Vanilla Tree"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod
mutatelist = list()
reagents_add = list("vanilla" = 0.25, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod
seed = /obj/item/seeds/cocoapod/vanillapod
name = "vanilla pod"
desc = "Fattening... Mmmmm... vanilla."
icon_state = "vanillapod"
filling_color = "#FFD700"
reagents_add = list("vanilla" = 0.25, "nutriment" = 0.1)
filling_color = "#FFD700"
+2 -2
View File
@@ -13,6 +13,7 @@
icon_grow = "corn-grow" // Uses one growth icons set for all the subtypes
icon_dead = "corn-dead" // Same for the dead icon
mutatelist = list(/obj/item/seeds/corn/snapcorn)
reagents_add = list("cornoil" = 0.1, "vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/corn
seed = /obj/item/seeds/corn
@@ -22,7 +23,6 @@
cooked_type = /obj/item/weapon/reagent_containers/food/snacks/popcorn
filling_color = "#FFFF00"
trash = /obj/item/weapon/grown/corncob
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize_mod = 2
/obj/item/weapon/grown/corncob
@@ -69,7 +69,7 @@
/obj/item/weapon/grown/snapcorn/add_juice()
..()
snap_pops = max(round(potency/8), 1)
snap_pops = max(round(seed.potency/8), 1)
/obj/item/weapon/grown/snapcorn/attack_self(mob/user)
..()
+2 -3
View File
@@ -11,6 +11,7 @@
icon_grow = "eggplant-grow"
icon_dead = "eggplant-dead"
mutatelist = list(/obj/item/seeds/eggplant/eggy)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
seed = /obj/item/seeds/eggplant
@@ -18,7 +19,6 @@
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#800080"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize_mod = 2
// Egg-Plant
@@ -30,7 +30,7 @@
lifespan = 75
production = 12
mutatelist = list()
// No rarity: Centcom ships these to us in the exotic seeds crate.
reagents_add = list("nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy
seed = /obj/item/seeds/eggplant/eggy
@@ -39,5 +39,4 @@
icon_state = "eggyplant"
trash = /obj/item/weapon/reagent_containers/food/snacks/egg
filling_color = "#F8F8FF"
reagents_add = list("nutriment" = 0.1)
bitesize_mod = 2
+10 -12
View File
@@ -15,6 +15,7 @@
icon_grow = "poppy-grow"
icon_dead = "poppy-dead"
mutatelist = list(/obj/item/seeds/poppy/geranium, /obj/item/seeds/poppy/lily)
reagents_add = list("salglu_solution" = 0.05, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
seed = /obj/item/seeds/poppy
@@ -23,7 +24,6 @@
icon_state = "poppy"
slot_flags = SLOT_HEAD
filling_color = "#FF6347"
reagents_add = list("salglu_solution" = 0.05, "nutriment" = 0.05)
bitesize_mod = 3
// Lily
@@ -78,6 +78,7 @@
oneharvest = 1
growthstages = 4
plant_type = PLANT_WEED
reagents_add = list("nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
seed = /obj/item/seeds/harebell
@@ -86,7 +87,6 @@
icon_state = "harebell"
slot_flags = SLOT_HEAD
filling_color = "#E6E6FA"
reagents_add = list("nutriment" = 0.05)
bitesize_mod = 3
@@ -106,6 +106,7 @@
icon_grow = "sunflower-grow"
icon_dead = "sunflower-dead"
mutatelist = list(/obj/item/seeds/sunflower/moonflower, /obj/item/seeds/sunflower/novaflower)
reagents_add = list("cornoil" = 0.08, "nutriment" = 0.04)
/obj/item/weapon/grown/sunflower // FLOWER POWER!
seed = /obj/item/seeds/sunflower
@@ -133,6 +134,7 @@
plantname = "Moonflowers"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
mutatelist = list()
reagents_add = list("moonshine" = 0.1, "vitamin" = 0.02, "nutriment" = 0.02)
rarity = 15
/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
@@ -142,7 +144,6 @@
icon_state = "moonflower"
slot_flags = SLOT_HEAD
filling_color = "#E6E6FA"
reagents_add = list("moonshine" = 0.1, "vitamin" = 0.02, "nutriment" = 0.02)
bitesize_mod = 2
// Novaflower
@@ -154,6 +155,7 @@
plantname = "Novaflowers"
product = /obj/item/weapon/grown/novaflower
mutatelist = list()
reagents_add = list("condensedcapsaicin" = 0.25, "capsaicin" = 0.3, "nutriment" = 0)
rarity = 20
/obj/item/weapon/grown/novaflower
@@ -168,27 +170,23 @@
w_class = 1
throw_speed = 1
throw_range = 3
plant_type = PLANT_NORMAL
attack_verb = list("roasted", "scorched", "burned")
/obj/item/weapon/grown/novaflower/add_juice()
if(..())
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("capsaicin", round((potency / 3.5), 1))
reagents.add_reagent("condensedcapsaicin", round((potency / 4), 1))
force = round((5 + potency / 5), 1)
..()
force = round((5 + seed.potency / 5), 1)
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M, mob/user)
if(!..()) return
if(istype(M, /mob/living))
M << "<span class='danger'>You are lit on fire from the intense heat of the [name]!</span>"
M.adjust_fire_stacks(potency / 20)
M.adjust_fire_stacks(seed.potency / 20)
M.IgniteMob()
/obj/item/weapon/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(endurance > 0)
endurance -= rand(1, (endurance / 3) + 1)
if(force > 0)
force -= rand(1, (force / 3) + 1)
else
usr << "<span class='warning'>All the petals have fallen off the [name] from violent whacking!</span>"
usr.unEquip(src)
@@ -15,6 +15,7 @@
icon_grow = "grass-grow"
icon_dead = "grass-dead"
mutatelist = list(/obj/item/seeds/grass/carpet)
reagents_add = list("nutriment" = 0.02)
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
seed = /obj/item/seeds/grass
@@ -23,13 +24,12 @@
icon_state = "grassclump"
filling_color = "#32CD32"
bitesize_mod = 2
reagents_add = list("nutriment" = 0.02)
/obj/item/weapon/reagent_containers/food/snacks/grown/grass/attack_self(mob/user)
user << "<span class='notice'>You prepare the astroturf.</span>"
var/grassAmt = 1 + round(potency / 50) // The grass we're holding
var/grassAmt = 1 + round(seed.potency / 50) // The grass we're holding
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/grass/G in user.loc) // The grass on the floor
grassAmt += 1 + round(G.potency / 50)
grassAmt += 1 + round(G.seed.potency)
qdel(G)
while(grassAmt > 0)
var/obj/item/stack/tile/GT = new /obj/item/stack/tile/grass(user.loc)
@@ -63,9 +63,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/attack_self(mob/user)
user << "<span class='notice'>You roll out the red carpet.</span>"
var/carpetAmt = 1 + round(potency / 50) // The carpet we're holding
var/carpetAmt = 1 + round(seed.potency / 50) // The carpet we're holding
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/C in user.loc) // The carpet on the floor
carpetAmt += 1 + round(C.potency / 50)
carpetAmt += 1 + round(C.seed.potency / 50)
qdel(C)
while(carpetAmt > 0)
var/obj/item/stack/tile/CT = new /obj/item/stack/tile/carpet(user.loc)
+9 -16
View File
@@ -14,22 +14,18 @@
plant_type = PLANT_WEED
rarity = 30
var/list/mutations = list()
reagents_add = list("charcoal" = 0.04, "nutriment" = 0.02)
/obj/item/seeds/kudzu/New(loc, obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod/parent)
..()
if(parent)
mutations = parent.mutations
/obj/item/seeds/kudzu/Copy()
var/obj/item/seeds/kudzu/S = ..()
S.mutations = mutations.Copy()
return S
/obj/item/seeds/kudzu/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swallows the pack of kudzu seeds! It looks like \he's trying to commit suicide..</span>")
plant(user)
return (BRUTELOSS)
/obj/item/seeds/kudzu/harvest()
var/list/prod = ..()
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod/K in prod)
K.mutations = mutations
/obj/item/seeds/kudzu/proc/plant(mob/user)
if(istype(user.loc,/turf/space))
return
@@ -44,15 +40,14 @@
user << "<span class='notice'>You plant the kudzu. You monster.</span>"
/obj/item/seeds/kudzu/get_analyzer_text()
var/list/mut_text = list()
var/text = ..()
var/text_string = ""
for(var/datum/spacevine_mutation/SM in mutations)
text_string += "[(text_string == "") ? "" : ", "][SM.name]"
mut_text += "-Plant Mutations: [(text_string == "") ? "None" : text_string]"
return mut_text
text += "\n- Plant Mutations: [(text_string == "") ? "None" : text_string]"
return text
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/S)
var/list/temp_mut_list = list()
if(S.has_reagent("sterilizine", 5))
@@ -90,7 +85,5 @@
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"
var/list/mutations = list()
filling_color = "#6B8E23"
bitesize_mod = 2
reagents_add = list("charcoal" = 0.04, "nutriment" = 0.02)
bitesize_mod = 2
+3 -3
View File
@@ -10,6 +10,7 @@
endurance = 40
icon_dead = "watermelon-dead"
mutatelist = list(/obj/item/seeds/watermelon/holy)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
seed = /obj/item/seeds/watermelon
@@ -21,7 +22,6 @@
dried_type = null
w_class = 3
filling_color = "#008000"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2, "water" = 0.1)
bitesize_mod = 3
// Holymelon
@@ -33,6 +33,7 @@
plantname = "Holy Melon Vines"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/holymelon
mutatelist = list()
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/holymelon
@@ -41,5 +42,4 @@
desc = "The water within this melon has been blessed by some deity that's particularly fond of watermelon."
icon_state = "holymelon"
filling_color = "#FFD700"
dried_type = null
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
dried_type = null
+4 -4
View File
@@ -31,6 +31,7 @@
yield = 4
growthstages = 1
mutatelist = list(/obj/item/seeds/replicapod)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
seed = /obj/item/seeds/cabbage
@@ -38,7 +39,6 @@
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
filling_color = "#90EE90"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize_mod = 2
@@ -55,6 +55,7 @@
maturation = 3
yield = 4
growthstages = 3
reagents_add = list("sugar" = 0.25)
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
seed = /obj/item/seeds/sugarcane
@@ -62,7 +63,6 @@
desc = "Sickly sweet."
icon_state = "sugarcane"
filling_color = "#FFD700"
reagents_add = list("sugar" = 0.25)
bitesize_mod = 2
@@ -82,6 +82,7 @@
potency = 60
growthstages = 2
rarity = 60 // Obtainable only with xenobio+superluck.
reagents_add = list("sulfur" = 0.1, "carbon" = 0.1, "nitrogen" = 0.07, "potassium" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/gatfruit
seed = /obj/item/seeds/gatfruit
@@ -90,5 +91,4 @@
icon_state = "gatfruit"
origin_tech = "combat=3"
trash = /obj/item/weapon/gun/projectile/revolver
bitesize_mod = 2
reagents_add = list("sulfur" = 0.1, "carbon" = 0.1, "nitrogen" = 0.07, "potassium" = 0.05)
bitesize_mod = 2
+23 -31
View File
@@ -20,6 +20,7 @@
oneharvest = 1
growthstages = 4
plant_type = PLANT_MUSHROOM
reagents_add = list("morphine" = 0.35, "charcoal" = 0.35, "nutriment" = 0)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
seed = /obj/item/seeds/reishi
@@ -27,7 +28,6 @@
desc = "<I>Ganoderma lucidum</I>: A special fungus known for its medicinal and stress relieving properties."
icon_state = "reishi"
filling_color = "#FF4500"
reagents_add = list("morphine" = 0.35, "charcoal" = 0.35, "nutriment" = 0)
// Fly Amanita
@@ -47,6 +47,7 @@
growthstages = 3
plant_type = PLANT_MUSHROOM
mutatelist = list(/obj/item/seeds/angel)
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.35, "nutriment" = 0)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
seed = /obj/item/seeds/amanita
@@ -54,7 +55,6 @@
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
filling_color = "#FF0000"
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.35, "nutriment" = 0)
// Destroying Angel
@@ -74,6 +74,7 @@
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.8, "nutriment" = 0)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
@@ -82,7 +83,6 @@
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
filling_color = "#C0C0C0"
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.8, "nutriment" = 0)
// Liberty Cap
@@ -100,6 +100,7 @@
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
reagents_add = list("mushroomhallucinogen" = 0.25, "nutriment" = 0.02)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
seed = /obj/item/seeds/liberty
@@ -107,7 +108,6 @@
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
filling_color = "#DAA520"
reagents_add = list("mushroomhallucinogen" = 0.25, "nutriment" = 0.02)
// Plump Helmet
@@ -126,6 +126,7 @@
growthstages = 3
plant_type = PLANT_MUSHROOM
mutatelist = list(/obj/item/seeds/plump/walkingmushroom)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
seed = /obj/item/seeds/plump
@@ -133,7 +134,6 @@
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#9370DB"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
// Walking Mushroom
@@ -149,6 +149,7 @@
maturation = 5
yield = 1
mutatelist = list()
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.12)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
@@ -157,16 +158,15 @@
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#9370DB"
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.12)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user)
if(istype(user.loc,/turf/space))
return
var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
M.maxHealth += round(endurance / 4)
M.melee_damage_lower += round(potency / 20)
M.melee_damage_upper += round(potency / 20)
M.move_to_delay -= round(production / 50)
M.maxHealth += round(seed.endurance / 4)
M.melee_damage_lower += round(seed.potency / 20)
M.melee_damage_upper += round(seed.potency / 20)
M.move_to_delay -= round(seed.production / 50)
M.health = M.maxHealth
qdel(src)
user << "<span class='notice'>You plant the walking mushroom.</span>"
@@ -189,6 +189,7 @@
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
reagents_add = list("nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
seed = /obj/item/seeds/chanter
@@ -196,7 +197,6 @@
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFA500"
reagents_add = list("nutriment" = 0.1)
// Glowshroom
@@ -218,6 +218,7 @@
plant_type = PLANT_MUSHROOM
rarity = 20
mutatelist = list(/obj/item/seeds/glowshroom/glowcap)
reagents_add = list("radium" = 0.05, "nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
seed = /obj/item/seeds/glowshroom
@@ -226,48 +227,39 @@
icon_state = "glowshroom"
filling_color = "#00FA9A"
var/effect_path = /obj/effect/glowshroom
reagents_add = list("radium" = 0.05, "nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/New(var/loc, var/new_potency = 10)
..()
if(lifespan == 0) //basically, if you're spawning these via admin or on the map, then set up some default stats.
lifespan = 120
endurance = 30
maturation = 15
production = 1
yield = 3
potency = 30
plant_type = PLANT_MUSHROOM
if(istype(src.loc,/mob))
pickup(src.loc)//adjusts the lighting on the mob
else
src.SetLuminosity(round(potency / 10,1))
src.SetLuminosity(round(seed.potency / 10,1))
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user)
if(istype(user.loc,/turf/space))
return
var/obj/effect/glowshroom/planted = new effect_path(user.loc)
planted.delay = planted.delay - production * 100 //So the delay goes DOWN with better stats instead of up. :I
planted.endurance = endurance
planted.yield = yield
planted.potency = potency
planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
planted.endurance = seed.endurance
planted.yield = seed.yield
planted.potency = seed.potency
user << "<span class='notice'>You plant [src].</span>"
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Destroy()
if(istype(loc,/mob))
loc.AddLuminosity(round(-potency / 10,1))
loc.AddLuminosity(round(-seed.potency / 10,1))
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
..()
SetLuminosity(0)
user.AddLuminosity(round(potency / 10,1))
user.AddLuminosity(round(seed.potency / 10,1))
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
..()
user.AddLuminosity(round(-potency / 10,1))
SetLuminosity(round(potency / 10,1))
user.AddLuminosity(round(-seed.potency / 10,1))
SetLuminosity(round(seed.potency / 10,1))
// Glowcap
@@ -282,6 +274,7 @@
plant_type = PLANT_MUSHROOM
product = /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
mutatelist = list()
reagents_add = list("teslium" = 0.02, "nutriment" = 0.04)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
@@ -291,13 +284,12 @@
icon_state = "glowcap"
filling_color = "#00FA9A"
effect_path = /obj/effect/glowshroom/glowcap
reagents_add = list("teslium" = 0.02, "nutriment" = 0.04)
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap/On_Consume()
if(!reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/weapon/stock_parts/cell/C in usr.GetAllContents())
var/newcharge = (potency*0.01)*C.maxcharge
var/newcharge = (seed.potency*0.01)*C.maxcharge
if(C.charge < newcharge)
C.charge = newcharge
if(isobj(C.loc))
+5 -6
View File
@@ -11,6 +11,7 @@
growthstages = 5
plant_type = PLANT_WEED
mutatelist = list(/obj/item/seeds/nettle/death)
reagents_add = list("sacid" = 0.5)
/obj/item/seeds/nettle/death
name = "pack of death-nettle seeds"
@@ -23,7 +24,8 @@
maturation = 8
yield = 2
mutatelist = list()
rarity = 10
reagents_add = list("facid" = 0.5, "sacid" = 0.5)
rarity = 20
/obj/item/weapon/grown/nettle //abstract type
@@ -38,7 +40,6 @@
w_class = 1
throw_speed = 1
throw_range = 3
plant_type = PLANT_WEED
origin_tech = "combat=1"
attack_verb = list("stung")
@@ -79,8 +80,7 @@
/obj/item/weapon/grown/nettle/basic/add_juice()
..()
reagents.add_reagent("sacid", round((potency / 2), 1))
force = round((5 + potency / 5), 1)
force = round((5 + seed.potency / 5), 1)
/obj/item/weapon/grown/nettle/death
@@ -94,8 +94,7 @@
/obj/item/weapon/grown/nettle/death/add_juice()
..()
reagents.add_reagent("facid", round((potency / 2), 1))
force = round((5 + potency / 2.5), 1)
force = round((5 + seed.potency / 2.5), 1)
/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user)
..()
+4 -4
View File
@@ -15,6 +15,7 @@
icon_grow = "potato-grow"
icon_dead = "potato-dead"
mutatelist = list(/obj/item/seeds/potato/sweet)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/potato
seed = /obj/item/seeds/potato
@@ -22,7 +23,6 @@
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
filling_color = "#E9967A"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize = 100
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W, mob/user, params)
@@ -32,7 +32,7 @@
if (C.use(5))
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
pocell.maxcharge = src.potency * 20
pocell.maxcharge = seed.potency * 20
pocell.charge = pocell.maxcharge
qdel(src)
return
@@ -49,10 +49,10 @@
plantname = "Sweet Potato Plants"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/potato/sweet
mutatelist = list()
reagents_add = list("vitamin" = 0.1, "sugar" = 0.1, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/sweet
seed = /obj/item/seeds/potato/sweet
name = "sweet potato"
desc = "It's sweet."
icon_state = "sweetpotato"
reagents_add = list("vitamin" = 0.1, "sugar" = 0.1, "nutriment" = 0.1)
icon_state = "sweetpotato"
+2 -2
View File
@@ -12,6 +12,7 @@
icon_grow = "pumpkin-grow"
icon_dead = "pumpkin-dead"
mutatelist = list(/obj/item/seeds/pumpkin/blumpkin)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
seed = /obj/item/seeds/pumpkin
@@ -19,7 +20,6 @@
desc = "It's large and scary."
icon_state = "pumpkin"
filling_color = "#FFA500"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
bitesize_mod = 2
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
@@ -39,6 +39,7 @@
plantname = "Blumpkin Vines"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin
mutatelist = list()
reagents_add = list("ammonia" = 0.2, "nutriment" = 0.2)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin
@@ -47,5 +48,4 @@
desc = "The pumpkin's toxic sibling."
icon_state = "blumpkin"
filling_color = "#87CEFA"
reagents_add = list("ammonia" = 0.2, "nutriment" = 0.2)
bitesize_mod = 2
+63 -1
View File
@@ -42,4 +42,66 @@
user << "<span class='warning'>The seeds reject the sample!</span>"
else
user << "<span class='warning'>The seeds already contain a genetic sample!</span>"
..()
..()
/obj/item/seeds/replicapod/get_analyzer_text()
var/text = ..()
if(contains_sample)
text += "\n It contains a blood sample!"
return text
/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/ckey_holder = null
if(config.revival_pod_plants)
if(ckey)
for(var/mob/M in player_list)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(O.ckey == ckey && O.can_reenter_corpse)
make_podman = 1
break
else
if(M.ckey == ckey && M.stat == DEAD && !M.suiciding)
make_podman = 1
break
else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key
for(var/mob/M in player_list)
if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
ckey_holder = M.ckey
break
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)]"
mind.transfer_to(podman)
if(ckey)
podman.ckey = ckey
else
podman.ckey = ckey_holder
podman.gender = blood_gender
podman.faction |= factions
if(!features["mcolor"])
features["mcolor"] = "#59CE00"
podman.hardset_dna(null,null,podman.real_name,blood_type,/datum/species/pod,features)//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman
podman.set_cloned_appearance()
else //else, one packet of seeds. maybe two
var/seed_count = 1
if(prob(getYield() * 20))
seed_count++
for(var/i=0,i<seed_count,i++)
var/obj/item/seeds/replicapod/harvestseeds = src.Copy()
harvestseeds.loc = user.loc
parent.update_tray()
+5 -5
View File
@@ -12,6 +12,7 @@
oneharvest = 1
growthstages = 3
mutatelist = list(/obj/item/seeds/carrot/parsnip)
reagents_add = list("oculine" = 0.25, "vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
seed = /obj/item/seeds/carrot
@@ -20,7 +21,6 @@
icon_state = "carrot"
filling_color = "#FFA500"
bitesize_mod = 2
reagents_add = list("oculine" = 0.25, "vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/kitchen/knife) || istype(I, /obj/item/weapon/hatchet))
@@ -43,13 +43,13 @@
product = /obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
icon_dead = "carrot-dead"
mutatelist = list()
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
seed = /obj/item/seeds/carrot/parsnip
name = "parsnip"
desc = "Closely related to carrots."
icon_state = "parsnip"
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
bitesize_mod = 2
@@ -65,7 +65,9 @@
endurance = 50
yield = 6
oneharvest = 1
icon_dead = "whitebeet-dead"
mutatelist = list(/obj/item/seeds/redbeet)
reagents_add = list("vitamin" = 0.04, "sugar" = 0.2, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
seed = /obj/item/seeds/whitebeet
@@ -73,7 +75,6 @@
desc = "You can't beat white-beet."
icon_state = "whitebeet"
filling_color = "#F4A460"
reagents_add = list("vitamin" = 0.04, "sugar" = 0.2, "nutriment" = 0.05)
bitesize_mod = 2
// Red Beet
@@ -87,13 +88,12 @@
lifespan = 60
endurance = 50
yield = 6
icon_dead = "whitebeet-dead"
oneharvest = 1
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/redbeet
seed = /obj/item/seeds/redbeet
name = "red beet"
desc = "You can't beat red beet."
icon_state = "redbeet"
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
bitesize_mod = 2
+5 -5
View File
@@ -13,6 +13,7 @@
growthstages = 5
icon_dead = "tea-dead"
mutatelist = list(/obj/item/seeds/tea/astra)
reagents_add = list("vitamin" = 0.04, "teapowder" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/tea
seed = /obj/item/seeds/tea
@@ -20,7 +21,6 @@
desc = "These aromatic tips of the tea plant can be dried to make tea."
icon_state = "tea_aspera_leaves"
filling_color = "#008000"
reagents_add = list("vitamin" = 0.04, "teapowder" = 0.1)
// Tea Astra
/obj/item/seeds/tea/astra
@@ -30,6 +30,7 @@
plantname = "Tea Astra Plant"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra
mutatelist = list()
reagents_add = list("salglu_solution" = 0.05, "vitamin" = 0.04, "teapowder" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra
@@ -37,7 +38,6 @@
name = "Tea Astra tips"
icon_state = "tea_astra_leaves"
filling_color = "#4582B4"
reagents_add = list("salglu_solution" = 0.05, "vitamin" = 0.04, "teapowder" = 0.1)
// Coffee
@@ -56,6 +56,7 @@
growthstages = 5
icon_dead = "coffee-dead"
mutatelist = list(/obj/item/seeds/coffee/robusta)
reagents_add = list("vitamin" = 0.04, "coffeepowder" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee
seed = /obj/item/seeds/coffee
@@ -64,7 +65,6 @@
icon_state = "coffee_arabica"
filling_color = "#DC143C"
bitesize_mod = 2
reagents_add = list("vitamin" = 0.04, "coffeepowder" = 0.1)
// Coffee Robusta
/obj/item/seeds/coffee/robusta
@@ -75,10 +75,10 @@
plantname = "Coffee Robusta Bush"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta
mutatelist = list()
reagents_add = list("morphine" = 0.05, "vitamin" = 0.04, "coffeepowder" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta
seed = /obj/item/seeds/coffee/robusta
name = "coffee robusta beans"
icon_state = "coffee_robusta"
reagents_add = list("morphine" = 0.05, "vitamin" = 0.04, "coffeepowder" = 0.1)
icon_state = "coffee_robusta"
+3 -3
View File
@@ -14,6 +14,7 @@
growthstages = 3
icon_dead = "tobacco-dead"
mutatelist = list(/obj/item/seeds/tobacco/space)
reagents_add = list("nicotine" = 0.03, "nutriment" = 0.03)
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco
seed = /obj/item/seeds/tobacco
@@ -21,7 +22,6 @@
desc = "Dry them out to make some smokes."
icon_state = "tobacco_leaves"
filling_color = "#008000"
reagents_add = list("nicotine" = 0.03, "nutriment" = 0.03)
// Space Tobacco
/obj/item/seeds/tobacco/space
@@ -32,11 +32,11 @@
plantname = "Space Tobacco Plant"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space
mutatelist = list()
reagents_add = list("salbutamol" = 0.05, "nicotine" = 0.08, "nutriment" = 0.03)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space
seed = /obj/item/seeds/tobacco/space
name = "space tobacco leaves"
desc = "Dry them out to make some space-smokes."
icon_state = "stobacco_leaves"
reagents_add = list("salbutamol" = 0.05, "nicotine" = 0.08, "nutriment" = 0.03)
icon_state = "stobacco_leaves"
+12 -12
View File
@@ -10,6 +10,7 @@
icon_grow = "tomato-grow"
icon_dead = "tomato-dead"
mutatelist = list(/obj/item/seeds/tomato/blue, /obj/item/seeds/tomato/blood, /obj/item/seeds/tomato/killer)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
seed = /obj/item/seeds/tomato
@@ -18,7 +19,6 @@
icon_state = "tomato"
var/splat_type = /obj/effect/decal/cleanable/tomato_smudge
filling_color = "#FF6347"
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
bitesize_mod = 2
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/proc/squish(atom/target)
@@ -44,6 +44,7 @@
plantname = "Blood-Tomato Plants"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blood
mutatelist = list()
reagents_add = list("blood" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blood
@@ -53,7 +54,6 @@
icon_state = "bloodtomato"
splat_type = /obj/effect/gibspawner/generic
filling_color = "#FF0000"
reagents_add = list("blood" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
// Blue Tomato
@@ -65,8 +65,9 @@
plantname = "Blue-Tomato Plants"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue
yield = 2
mutatelist = list(/obj/item/seeds/tomato/blue/bluespace)
icon_grow = "bluetomato-grow"
mutatelist = list(/obj/item/seeds/tomato/blue/bluespace)
reagents_add = list("lube" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue
@@ -76,13 +77,12 @@
icon_state = "bluetomato"
splat_type = /obj/effect/decal/cleanable/oil
filling_color = "#0000FF"
reagents_add = list("lube" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/Crossed(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
var/stun = Clamp(potency / 10, 1, 10)
var/weaken = Clamp(potency / 20, 0.5, 5)
var/stun = Clamp(seed.potency / 10, 1, 10)
var/weaken = Clamp(seed.potency / 20, 0.5, 5)
M.slip(stun, weaken, src)
@@ -96,6 +96,7 @@
product = /obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace
yield = 2
mutatelist = list()
reagents_add = list("lube" = 0.2, "singulo" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 50
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace
@@ -104,7 +105,6 @@
desc = "So lubricated, you might slip through space-time."
icon_state = "bluespacetomato"
origin_tech = "bluespace=3"
reagents_add = list("lube" = 0.2, "singulo" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/attack_self(mob/user)
squish(user)
@@ -114,7 +114,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/squish(atom/squishee)
..()
var/teleport_radius = max(round(potency / 10), 1)
var/teleport_radius = max(round(seed.potency / 10), 1)
if(isliving(squishee))
var/turf/T = get_turf(squishee)
new /obj/effect/decal/cleanable/molten_item(T) //Leave a pile of goo behind for dramatic effect...
@@ -161,10 +161,10 @@
spawn(30)
if(!qdeleted(src))
var/mob/living/simple_animal/hostile/killertomato/K = new /mob/living/simple_animal/hostile/killertomato(get_turf(src.loc))
K.maxHealth += round(endurance / 3)
K.melee_damage_lower += round(potency / 10)
K.melee_damage_upper += round(potency / 10)
K.move_to_delay -= round(production / 50)
K.maxHealth += round(seed.endurance / 3)
K.melee_damage_lower += round(seed.potency / 10)
K.melee_damage_upper += round(seed.potency / 10)
K.move_to_delay -= round(seed.production / 50)
K.health = K.maxHealth
K.visible_message("<span class='notice'>The Killer Tomato growls as it suddenly awakens.</span>")
if(user)
+1 -3
View File
@@ -13,7 +13,6 @@
potency = 50
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
icon_dead = "towercap-dead"
mutatelist = list(/obj/item/seeds/tower/steel)
@@ -40,7 +39,6 @@
w_class = 3
throw_speed = 2
throw_range = 3
plant_type = PLANT_MUSHROOM
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
var/plank_type = /obj/item/stack/sheet/mineral/wood
@@ -56,7 +54,7 @@
..()
if(W.sharpness)
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25))
var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(seed.potency / 25))
var/old_plank_amount = plank.amount
for(var/obj/item/stack/ST in user.loc)
if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
+20 -39
View File
@@ -6,55 +6,36 @@
name = "grown_weapon"
icon = 'icons/obj/hydroponics/harvest.dmi'
burn_state = FLAMMABLE
var/seed = null
var/plantname = ""
var/product //a type path
var/lifespan = 0
var/endurance = 15
var/maturation = 7
var/production = 7
var/yield = 2
var/potency = 20
var/plant_type = PLANT_NORMAL
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
/obj/item/weapon/grown/New(newloc, new_potency = 50)
/obj/item/weapon/grown/New(newloc, var/obj/item/seeds/new_seed = null)
..()
potency = new_potency
create_reagents(50)
if(new_seed)
seed = new_seed.Copy()
else if(ispath(seed))
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
seed = new seed()
seed.potency = 50
seed.prepare_result(src)
else // Something is terribly wrong
qdel(src)
return
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
transform *= TransformUsingVariable(potency, 100, 0.5)
if(seed && lifespan == 0) //This is for adminspawn or map-placed growns. They get the default stats of their seed type. This feels like a hack but people insist on putting these things on the map...
var/obj/item/seeds/S = new seed(src)
lifespan = S.lifespan
endurance = S.endurance
maturation = S.maturation
production = S.production
yield = S.yield
qdel(S) //Foods drop their contents when eaten, so delete the default seed.
create_reagents(50)
add_juice()
transform *= TransformUsingVariable(seed.potency, 100, 0.5)
/obj/item/weapon/grown/attackby(obj/item/O, mob/user, params)
..()
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(PLANT_NORMAL)
msg += "- Plant type: <i>Normal plant</i>\n"
if(PLANT_WEED)
msg += "- Plant type: <i>Weed</i>. Can grow in nutrient-poor soil.\n"
if(PLANT_MUSHROOM)
msg += "- Plant type: <i>Mushroom</i>. Can grow in dry soil.\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>"
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>\n"
msg += seed.get_analyzer_text()
msg += "</span>"
usr << msg
return
+75 -216
View File
@@ -19,7 +19,6 @@
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
var/rating = 1
@@ -84,9 +83,7 @@
var/list/processing_atoms = list(src)
while(processing_atoms.len)
var/atom/a = processing_atoms[1]
for(var/step_dir in cardinal)
var/obj/machinery/hydroponics/h = locate() in get_step(a, step_dir)
// Soil plots aren't dense. anchored == 2 means the hoses are screwed in place
@@ -100,21 +97,14 @@
/obj/machinery/hydroponics/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(!planted)
..()
return
if(!myseed)
return ..()
if(istype(Proj ,/obj/item/projectile/energy/floramut))
mutate()
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
if(myseed.yield == 0)//Oh god don't divide by zero you'll doom us all.
adjustSYield(1 * rating)
//world << "Yield increased by 1, from 0, to a total of [myseed.yield]"
else if(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 * rating)
//world << "Yield increased by 1, to a total of [myseed.yield]"
return myseed.bullet_act(Proj)
else
..()
return
return ..()
/obj/machinery/hydroponics/process()
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
@@ -124,9 +114,12 @@
if(world.time > (lastcycle + cycledelay))
lastcycle = world.time
if(planted && !dead)
if(myseed && !dead)
// Advance age
age++
if(age < myseed.maturation)
lastproduce = age
needs_update = 1
//Nutrients//////////////////////////////////////////////////////////////
@@ -210,9 +203,8 @@
adjustWeeds(1 / rating)
// 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)
if(myseed.plant_type == PLANT_NORMAL) // If a normal plant
weedinvasion()
else
@@ -246,13 +238,12 @@
overlays.Cut()
update_icon_hoses()
UpdateDescription()
if(planted)
if(myseed)
update_icon_plant()
update_icon_lights()
if(istype(myseed,/obj/item/seeds/glowshroom))
if(istype(myseed, /obj/item/seeds/glowshroom))
SetLuminosity(round(myseed.potency / 10))
else
SetLuminosity(0)
@@ -277,12 +268,9 @@
I = image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.icon_grow][myseed.growthstages]")
else
I = image('icons/obj/hydroponics/growing.dmi', icon_state = myseed.icon_harvest)
else if(age < myseed.maturation)
else
var/t_growthstate = min(round((age / myseed.maturation) * myseed.growthstages), myseed.growthstages)
I = image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.icon_grow][t_growthstate]")
lastproduce = age //Cheating by putting this here, it means that it isn't instantly ready to harvest
else
I = image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.icon_grow][myseed.growthstages]") // Same
I.layer = MOB_LAYER + 0.1
overlays += I
@@ -299,14 +287,28 @@
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_harvest3")
/obj/machinery/hydroponics/proc/UpdateDescription()
desc = null
if (planted)
desc = "[src] has <span class='info'>[myseed.plantname]</span> planted."
/obj/machinery/hydroponics/examine(user)
..()
if(myseed)
user << "<span class='info'>It has <span class='name'>[myseed.plantname]</span> planted.</span>"
if (dead)
desc += " It's dead."
user << "<span class='warning'>It's dead.</span>"
else if (harvest)
desc += " It's ready to harvest."
user << "<span class='green'>It's ready to harvest.</span>"
else if (health <= (myseed.endurance / 2))
user << "<span class='warning'>It looks unhealthy.</span>"
else
user << "<span class='info'>[src] is empty.</span>"
user << "<span class='info'>Water: [waterlevel]/[maxwater]</span>"
user << "<span class='info'>Nutrient: [nutrilevel]/[maxnutri]</span>"
if(weedlevel >= 5)
user << "<span class='warning'>[src] is filled with weeds!</span>"
if(pestlevel >= 5)
user << "<span class='warning'>[src] is filled with tiny worms!</span>"
user << "" // Empty line for readability.
/obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens.
dead = 0
@@ -314,26 +316,26 @@
if(myseed) // In case there's nothing in the tray beforehand
oldPlantName = myseed.plantname
qdel(myseed)
myseed = null
else
oldPlantName = "Empty tray"
switch(rand(1,18)) // randomly pick predominative weed
if(16 to 18)
myseed = new /obj/item/seeds/reishi
myseed = new /obj/item/seeds/reishi(src)
if(14 to 15)
myseed = new /obj/item/seeds/nettle
myseed = new /obj/item/seeds/nettle(src)
if(12 to 13)
myseed = new /obj/item/seeds/harebell
myseed = new /obj/item/seeds/harebell(src)
if(10 to 11)
myseed = new /obj/item/seeds/amanita
myseed = new /obj/item/seeds/amanita(src)
if(8 to 9)
myseed = new /obj/item/seeds/chanter
myseed = new /obj/item/seeds/chanter(src)
if(6 to 7)
myseed = new /obj/item/seeds/tower
myseed = new /obj/item/seeds/tower(src)
if(4 to 5)
myseed = new /obj/item/seeds/plump
myseed = new /obj/item/seeds/plump(src)
else
myseed = new /obj/item/seeds/weeds
planted = 1
myseed = new /obj/item/seeds/weeds(src)
age = 0
health = myseed.endurance
lastcycle = world.time
@@ -345,13 +347,13 @@
/obj/machinery/hydroponics/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25) // Mutates the current seed
if(!planted)
if(!myseed)
return
adjustSLife(rand(-lifemut,lifemut))
adjustSEnd(rand(-endmut,endmut))
adjustSProduct(rand(-productmut,productmut))
adjustSYield(rand(-yieldmut,yieldmut))
adjustSPot(rand(-potmut,potmut))
myseed.adjust_lifespan(rand(-lifemut,lifemut))
myseed.adjust_endurance(rand(-endmut,endmut))
myseed.adjust_production(rand(-productmut,productmut))
myseed.adjust_yield(rand(-yieldmut,yieldmut))
myseed.adjust_potency(rand(-potmut,potmut))
/obj/machinery/hydroponics/proc/hardmutate()
@@ -359,21 +361,19 @@
/obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
if(!planted || dead)
if(!myseed || dead)
return
var/oldPlantName = myseed.plantname
if(myseed.mutatelist.len > 0)
var/mutantseed = pick(myseed.mutatelist)
qdel(myseed)
myseed = null
myseed = new mutantseed
else
return
dead = 0
hardmutate()
planted = 1
age = 0
health = myseed.endurance
lastcycle = world.time
@@ -389,11 +389,11 @@
if( weedlevel > 5 )
if(myseed)
qdel(myseed)
myseed = null
var/newWeed = pick(/obj/item/seeds/liberty, /obj/item/seeds/angel, /obj/item/seeds/nettle/death, /obj/item/seeds/kudzu)
myseed = new newWeed
dead = 0
hardmutate()
planted = 1
age = 0
health = myseed.endurance
lastcycle = world.time
@@ -426,7 +426,6 @@
usr << "The pests seem to behave oddly, but quickly settle down..."
/obj/machinery/hydroponics/proc/applyChemicals(datum/reagents/S)
if(myseed)
myseed.on_chem_reaction(S) //In case seeds have some special interactions with special chems, currently only used by vines
@@ -587,13 +586,15 @@
if(S.has_reagent("ammonia", 1))
adjustHealth(round(S.get_reagent_amount("ammonia") * 0.5))
adjustNutri(round(S.get_reagent_amount("ammonia") * 1))
adjustSYield(round(S.get_reagent_amount("ammonia") * 0.01))
if(myseed)
myseed.adjust_yield(round(S.get_reagent_amount("ammonia") * 0.01))
// Saltpetre is used for gardening IRL, to simplify highly, it speeds up growth and strengthens plants
if(S.has_reagent("saltpetre", 1))
adjustHealth(round(S.get_reagent_amount("saltpetre") * 0.25))
adjustSProduct(-round(S.get_reagent_amount("saltpetre") * 0.02))
adjustSPot(round(S.get_reagent_amount("saltpetre") * 0.01))
if(myseed)
myseed.adjust_production(-round(S.get_reagent_amount("saltpetre") * 0.02))
myseed.adjust_potency(round(S.get_reagent_amount("saltpetre") * 0.01))
// Ash is also used IRL in gardening, as a fertilizer enhancer and weed killer
if(S.has_reagent("ash", 1))
@@ -605,7 +606,8 @@
if(S.has_reagent("diethylamine", 1))
adjustHealth(round(S.get_reagent_amount("diethylamine") * 1))
adjustNutri(round(S.get_reagent_amount("diethylamine") * 2))
adjustSYield(round(S.get_reagent_amount("diethylamine") * 0.02))
if(myseed)
myseed.adjust_yield(round(S.get_reagent_amount("diethylamine") * 0.02))
adjustPests(-rand(1,2))
// Compost, effectively
@@ -646,7 +648,6 @@
usr << "Nothing happens..."
/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
//Called when mob user "attacks" it with object O
if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
var/obj/item/weapon/reagent_containers/reagent_source = O
@@ -715,49 +716,36 @@
reagent_source.update_icon()
return 1
else if(istype(O, /obj/item/seeds/))
if(!planted)
if(/obj/item/seeds/kudzu)
else if(istype(O, /obj/item/seeds))
if(!myseed)
if(istype(O, /obj/item/seeds/kudzu))
investigate_log("had Kudzu planted in it by [user.ckey]([user]) at ([x],[y],[z])","kudzu")
user.unEquip(O)
user << "<span class='notice'>You plant [O].</span>"
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 << "<span class='warning'>[src] already has seeds in it!</span>"
else if(istype(O, /obj/item/device/analyzer/plant_analyzer))
if(planted && myseed)
if(myseed)
user << "*** <B>[myseed.plantname]</B> ***" //Carn: now reports the plants growing, not the seeds.
user << "-Plant Age: <span class='notice'>[age]</span>"
user << "-Plant Endurance: <span class='notice'>[myseed.endurance]</span>"
user << "-Plant Lifespan: <span class='notice'>[myseed.lifespan]</span>"
if(myseed.yield != -1)
user << "-Plant Yield: <span class='notice'>[myseed.yield]</span>"
user << "-Plant Production: <span class='notice'>[myseed.production]</span>"
if(myseed.potency != -1)
user << "-Plant Potency: <span class='notice'>[myseed.potency]</span>"
var/list/text_strings = myseed.get_analyzer_text()
if(text_strings)
for(var/string in text_strings)
user << string
user << "- Plant Age: <span class='notice'>[age]</span>"
var/list/text_string = myseed.get_analyzer_text()
if(text_string)
user << text_string
else
user << "<B>No plant found.</B>"
user << "-Weed level: <span class='notice'>[weedlevel] / 10</span>"
user << "-Pest level: <span class='notice'>[pestlevel] / 10</span>"
user << "-Toxicity level: <span class='notice'>[toxic] / 100</span>"
user << "-Water level: <span class='notice'>[waterlevel] / [maxwater]</span>"
user << "-Nutrition level: <span class='notice'>[nutrilevel] / [maxnutri]</span>"
user << "- Weed level: <span class='notice'>[weedlevel] / 10</span>"
user << "- Pest level: <span class='notice'>[pestlevel] / 10</span>"
user << "- Toxicity level: <span class='notice'>[toxic] / 100</span>"
user << "- Water level: <span class='notice'>[waterlevel] / [maxwater]</span>"
user << "- Nutrition level: <span class='notice'>[nutrilevel] / [maxnutri]</span>"
user << ""
else if(istype(O, /obj/item/weapon/cultivator))
@@ -825,123 +813,18 @@
if(harvest)
myseed.harvest()
else if(dead)
planted = 0
dead = 0
user << "<span class='notice'>You remove the dead plant from [src].</span>"
qdel(myseed)
myseed = null
update_icon()
else
if(planted && !dead)
user << "[src] has <span class='info'>[myseed.plantname]</span> planted."
if(health <= (myseed.endurance / 2))
user << "The plant looks unhealthy."
else
user << "[src] is empty."
user << "Water: [waterlevel]/[maxwater]"
user << "Nutrient: [nutrilevel]/[maxnutri]"
if(weedlevel >= 5)
user << "[src] is filled with weeds!"
if(pestlevel >= 5)
user << "[src] is filled with tiny worms!"
user << "" // Empty line for readability.
/obj/item/seeds/proc/getYield()
var/obj/machinery/hydroponics/parent = loc
if (parent.yieldmod == 0)
return min(yield, 1)//1 if above zero, 0 otherwise
return (yield * parent.yieldmod)
/obj/item/seeds/proc/harvest(mob/user = usr)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
var/list/result = list()
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
var/product_name
while(t_amount < getYield())
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, potency)
result.Add(t_prod) // User gets a consumable
if(!t_prod)
return
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++
product_name = t_prod.name
if(getYield() >= 1)
feedback_add_details("food_harvested","[product_name]|[getYield()]")
parent.update_tray()
return result
/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/ckey_holder = null
if(config.revival_pod_plants)
if(ckey)
for(var/mob/M in player_list)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(O.ckey == ckey && O.can_reenter_corpse)
make_podman = 1
break
else
if(M.ckey == ckey && M.stat == 2 && !M.suiciding)
make_podman = 1
break
else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key
for(var/mob/M in player_list)
if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
ckey_holder = M.ckey
break
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)]"
mind.transfer_to(podman)
if(ckey)
podman.ckey = ckey
else
podman.ckey = ckey_holder
podman.gender = blood_gender
podman.faction |= factions
if(!features["mcolor"])
features["mcolor"] = "#59CE00"
podman.hardset_dna(null,null,podman.real_name,blood_type,/datum/species/pod,features)//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman
podman.set_cloned_appearance()
else //else, one packet of seeds. maybe two
var/seed_count = 1
if(prob(getYield() * 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()
examine(user)
/obj/machinery/hydroponics/proc/update_tray(mob/user = usr)
harvest = 0
lastproduce = age
if(istype(myseed,/obj/item/seeds/replicapod/))
if(istype(myseed,/obj/item/seeds/replicapod))
user << "<span class='notice'>You harvest from the [myseed.plantname].</span>"
else if(myseed.getYield() <= 0)
user << "<span class='warning'>You fail to harvest anything useful!</span>"
@@ -949,7 +832,7 @@
user << "<span class='notice'>You harvest [myseed.getYield()] items from the [myseed.plantname].</span>"
if(myseed.oneharvest)
qdel(myseed)
planted = 0
myseed = null
dead = 0
update_icon()
@@ -964,7 +847,7 @@
adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
/obj/machinery/hydroponics/proc/adjustHealth(adjustamt)
if(planted && !dead)
if(myseed && !dead)
health = Clamp(health + adjustamt, 0, myseed.endurance)
/obj/machinery/hydroponics/proc/adjustToxic(adjustamt)
@@ -976,30 +859,6 @@
/obj/machinery/hydroponics/proc/adjustWeeds(adjustamt)
weedlevel = Clamp(weedlevel + adjustamt, 0, 10)
/// Seed Setters ///
/obj/machinery/hydroponics/proc/adjustSYield(adjustamt)
if(myseed && myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable
myseed.yield = Clamp(myseed.yield + adjustamt, 0, 10)
if(myseed.yield <= 0 && myseed.plant_type == PLANT_MUSHROOM)
myseed.yield = 1 // Mushrooms always have a minimum yield of 1.
/obj/machinery/hydroponics/proc/adjustSLife(adjustamt)
if(myseed)
myseed.lifespan = Clamp(myseed.lifespan + adjustamt, 10, 100)
/obj/machinery/hydroponics/proc/adjustSEnd(adjustamt)
if(myseed)
myseed.endurance = Clamp(myseed.endurance + adjustamt, 10, 100)
/obj/machinery/hydroponics/proc/adjustSProduct(adjustamt)
if(myseed)
myseed.production = Clamp(myseed.production + adjustamt, 2, 10)
/obj/machinery/hydroponics/proc/adjustSPot(adjustamt)
if(myseed && myseed.potency != -1) //Not all plants have a potency
myseed.potency = Clamp(myseed.potency + adjustamt, 0, 100)
/obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood
var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato)
var/chosen = pick(livingplants)
+9 -21
View File
@@ -9,32 +9,20 @@
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/))
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
while(t_amount < t_max)
var/obj/item/seeds/t_prod = new F.seed(O.loc, O)
t_prod.lifespan = F.lifespan
t_prod.endurance = F.endurance
t_prod.maturation = F.maturation
t_prod.production = F.production
t_prod.yield = F.yield
t_prod.potency = F.potency
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = O.loc
t_amount++
qdel(O)
return 1
else if(istype(O, /obj/item/weapon/grown/))
else if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
if(F.seed)
while(t_amount < t_max)
var/obj/item/seeds/t_prod = new F.seed(O.loc, O)
t_prod.lifespan = F.lifespan
t_prod.endurance = F.endurance
t_prod.maturation = F.maturation
t_prod.production = F.production
t_prod.yield = F.yield
t_prod.potency = F.potency
t_amount++
qdel(O)
return 1
else return 0
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = O.loc
t_amount++
qdel(O)
return 1
/*else if(istype(O, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/S = O
+132 -15
View File
@@ -23,9 +23,15 @@
var/oneharvest = 0 // If a plant is cleared from the tray after harvesting, e.g. a carrot.
var/potency = 10 // The 'power' of a plant. Generally effects the amount of reagent in a plant, also used in other ways.
var/growthstages = 6 // Amount of growth sprites the plant has.
var/plant_type = PLANT_NORMAL // 0 = 'normal plant'; 1 = weed; 2 = shroom
var/plant_type = PLANT_NORMAL // 0 = PLANT_NORMAL; 1 = PLANT_WEED; 2 = PLANT_MUSHROOM; 3 = PLANT_ALIEN
var/rarity = 0 // How rare the plant is. Used for giving points to cargo when shipping off to Centcom.
var/list/mutatelist = list() // The type of plants that this plant can mutate into.
var/list/reagents_add = list()
// A list of reagents to add to product.
// Format: "reagent_id" = potency multiplier
// Stronger reagents must always come first to avoid being displaced by weaker ones.
// Total amount of any reagent in plant is calculated by formula: 1 + round(potency * multiplier)
/obj/item/seeds/New(loc, parent)
..()
@@ -41,32 +47,143 @@
if(!icon_harvest && plant_type != PLANT_MUSHROOM && yield != -1)
icon_harvest = "[species]-harvest"
/obj/item/seeds/proc/Copy()
var/obj/item/seeds/S = new type
// Copy all the stats
S.lifespan = lifespan
S.endurance = endurance
S.maturation = maturation
S.production = production
S.yield = yield
S.potency = potency
return S
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(istype(Proj ,/obj/item/projectile/energy/florayield))
var/rating = 1
if(istype(loc, /obj/machinery/hydroponics))
var/obj/machinery/hydroponics/H = loc
rating = H.rating
if(yield == 0)//Oh god don't divide by zero you'll doom us all.
adjust_yield(1 * rating)
else if(prob(1/(yield * yield) * 100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
adjust_yield(1 * rating)
else
return ..()
// Harvest procs
/obj/item/seeds/proc/getYield()
var/return_yield = yield
var/obj/machinery/hydroponics/parent = loc
if(istype(loc, /obj/machinery/hydroponics))
if(parent.yieldmod == 0)
return_yield = min(return_yield, 1)//1 if above zero, 0 otherwise
else
return_yield *= parent.yieldmod
return return_yield
/obj/item/seeds/proc/harvest(mob/user = usr)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
var/list/result = list()
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
var/product_name
while(t_amount < getYield())
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
prepare_result(t_prod)
result.Add(t_prod) // User gets a consumable
if(!t_prod)
return
t_amount++
product_name = t_prod.name
if(getYield() >= 1)
feedback_add_details("food_harvested","[product_name]|[getYield()]")
parent.update_tray()
return result
/obj/item/seeds/proc/prepare_result(var/obj/item/weapon/reagent_containers/food/snacks/grown/T)
if(T.reagents)
for(var/reagent_id in reagents_add)
if(reagent_id == "blood") // Hack to make blood in plants always O-
T.reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id]), list("blood_type"="O-"))
continue
T.reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id]))
return 1
/// Setters procs ///
/obj/item/seeds/proc/adjust_yield(adjustamt)
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
yield = Clamp(yield + adjustamt, 0, 10)
if(yield <= 0 && plant_type == PLANT_MUSHROOM)
yield = 1 // Mushrooms always have a minimum yield of 1.
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
lifespan = Clamp(lifespan + adjustamt, 10, 100)
/obj/item/seeds/proc/adjust_endurance(adjustamt)
endurance = Clamp(endurance + adjustamt, 10, 100)
/obj/item/seeds/proc/adjust_production(adjustamt)
production = Clamp(production + adjustamt, 2, 10)
/obj/item/seeds/proc/adjust_potency(adjustamt)
potency = Clamp(potency + adjustamt, 0, 100)
/obj/item/seeds/proc/get_analyzer_text() //in case seeds have something special to tell to the analyzer
return
var/text = ""
switch(plant_type)
if(PLANT_NORMAL)
text += "- Plant type: Normal plant\n"
if(PLANT_WEED)
text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n"
if(PLANT_MUSHROOM)
text += "- Plant type: Mushroom. Can grow in dry soil.\n"
else
text += "- Plant type: <span class='warning'>UNKNOWN</span> \n"
if(potency != -1)
text += "- Potency: [potency]\n"
if(yield != -1)
text += "- Yield: [yield]\n"
text += "- Maturation speed: [maturation]\n"
text += "- Production speed: [production]\n"
text += "- Endurance: [endurance]\n"
text += "- Lifespan: [lifespan]\n"
if(rarity)
text += "- Species Discovery Value: [rarity]\n"
text += "*---------*"
return text
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) //in case seeds have some special interaction with special chems
return
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
user << "*** <B>[plantname]</B> ***"
user << "-Plant Endurance: <span class='notice'>[endurance]</span>"
user << "-Plant Lifespan: <span class='notice'>[lifespan]</span>"
user << "-Species Discovery Value: <span class='notice'>[rarity]</span>"
if(yield != -1)
user << "-Plant Yield: <span class='notice'>[yield]</span>"
user << "-Plant Production: <span class='notice'>[production]</span>"
if(potency != -1)
user << "-Plant Potency: <span class='notice'>[potency]</span>"
var/list/text_strings = get_analyzer_text()
if(text_strings)
for(var/string in text_strings)
user << string
user << "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.</span>"
var/text = get_analyzer_text()
if(text)
user << "<span class='notice'>[text]</span>"
return
..() // Fallthrough to item/attackby() so that bags can pick seeds up
// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
// Maybe some day it would be used as unit test.
/proc/check_plants_growth_stages_icons()
+1 -1
View File
@@ -22,7 +22,7 @@
switch(loot)
if(1 to 5) //5% chance
new /obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src)
new /obj/item/weapon/lighter(src)
if(6 to 10)
+2 -2
View File
@@ -839,7 +839,7 @@
for(var/obj/machinery/hydroponics/tester in view(12,src))
considered[tester] = 1
if(!tester.planted)
if(!tester.myseed)
considered[tester] += 50
if(tester.weedlevel > 0)
considered[tester] += 5
@@ -866,7 +866,7 @@
else
if(HP.harvest || HP.dead)
HP.attack_hand(src)
else if(!HP.planted)
else if(!HP.myseed)
var/seedType = pick(typesof(/obj/item/seeds) - /obj/item/seeds)
var/obj/item/seeds/SEED = new seedType(src)
customEmote("[src] [pick("gibbers","drools","slobbers","claps wildly","spits")] towards [TARGET], producing a [SEED]!")
@@ -41,7 +41,6 @@
//Blender Stuff
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans = list("soymilk" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("ketchup" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/corn = list("cornoil" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/oat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
@@ -275,18 +274,18 @@
/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(obj/item/weapon/grown/O)
if (!istype(O))
return 5
else if (O.potency == -1)
else if (O.seed.potency == -1)
return 5
else
return round(O.potency)
return round(O.seed.potency)
/obj/machinery/reagentgrinder/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O)
if (!istype(O))
return 5
else if (O.potency == -1)
else if (O.seed.potency == -1)
return 5
else
return round(5*sqrt(O.potency))
return round(5*sqrt(O.seed.potency))
/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O)
holdingitems -= O
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/item/weapon/reagent_containers/New(location, vol = 0)
..()
if (vol > 0)
if (isnum(vol) && vol > 0)
volume = vol
create_reagents(volume)
if(spawned_disease)