Moved grown.dm to hydro folder for traits.

This commit is contained in:
Zuhayr
2015-01-30 22:44:55 +10:30
parent d08861e25b
commit 3ff956da69

View File

@@ -1,648 +0,0 @@
//Grown foods.
/obj/item/weapon/reagent_containers/food/snacks/grown
name = "fruit"
desc = "It's a fruit."
icon = 'icons/obj/harvest.dmi'
var/plantname
var/datum/seed/seed
var/potency = -1
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc,planttype)
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
// Fill the object up with the appropriate reagents.
if(planttype)
plantname = planttype
seed = seed_types[plantname]
if(!seed || !seed.chems)
return
potency = seed.potency
for(var/rid in seed.chems)
var/list/reagent_data = seed.chems[rid]
var/rtotal = reagent_data[1]
if(reagent_data.len > 1 && potency > 0)
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
if(reagents.total_volume > 0)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(var/mob/living/M)
if(seed && seed.juicy == 2)
if(istype(M))
if(M.buckled)
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.shoes && H.shoes.flags & NOSLIP)
return
M.stop_pulling()
M << "<span class='notice'>You slipped on the [name]!</span>"
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
M.Stun(8)
M.Weaken(5)
seed.thrown_at(src,M)
sleep(-1)
if(src) del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
..()
if(seed) seed.thrown_at(src,hit_atom)
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(seed && seed.produces_power && istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(C.use(5))
//TODO: generalize this.
user << "<span class='notice'>You add some cable to the [src.name] and slide it inside the battery casing.</span>"
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(get_turf(user))
if(src.loc == user && !(user.l_hand && user.r_hand) && istype(user,/mob/living/carbon/human))
user.put_in_hands(pocell)
pocell.maxcharge = src.potency * 10
pocell.charge = pocell.maxcharge
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/attack(var/mob/living/carbon/M, var/mob/user, var/def_zone)
if(user == M)
return ..()
if(user.a_intent == "hurt")
// This is being copypasted here because reagent_containers (WHY DOES FOOD DESCEND FROM THAT) overrides it completely.
// TODO: refactor all food paths to be less horrible and difficult to work with in this respect. ~Z
if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0
user.lastattacked = M
M.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/hit = H.attacked_by(src, user, def_zone)
if(hit && hitsound)
playsound(loc, hitsound, 50, 1, -1)
return hit
else
if(attack_verb.len)
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
else
user.visible_message("<span class='danger'>[M] has been attacked with [src] by [user]!</span>")
if (hitsound)
playsound(loc, hitsound, 50, 1, -1)
switch(damtype)
if("brute")
M.take_organ_damage(force)
if(prob(33))
var/turf/simulated/location = get_turf(M)
if(istype(location)) location.add_blood_floor(M)
if("fire")
if (!(COLD_RESISTANCE in M.mutations))
M.take_organ_damage(0, force)
M.updatehealth()
if(seed && seed.stings)
if(!reagents || reagents.total_volume <= 0)
return
reagents.remove_any(rand(1,3))
seed.thrown_at(src,M)
sleep(-1)
if(!src)
return
if(prob(35))
if(user)
user << "<span class='danger'>\The [src] has fallen to bits.</span>"
user.drop_from_inventory(src)
del(src)
add_fingerprint(user)
return 1
else
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
if(!seed)
return
if(istype(user.loc,/turf/space))
return
if(user.a_intent == "hurt")
user.visible_message("<span class='danger'>\The [user] squashes \the [src]!</span>")
seed.thrown_at(src,user)
sleep(-1)
if(src) del(src)
return
if(seed.spread == 0)
return
// TODO: Generalize.
var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
planted.delay = 50
planted.endurance = 100
planted.potency = potency
user << "<span class='notice'>You plant the [src.name].</span>"
del(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
..()
if(!seed)
return
if(seed.biolum)
user.SetLuminosity(user.luminosity + seed.biolum)
SetLuminosity(0)
if(seed.stings)
var/mob/living/carbon/human/H = user
if(istype(H) && H.gloves)
return
if(!reagents || reagents.total_volume <= 0)
return
reagents.remove_any(rand(1,3))
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/grown/dropped(mob/user)
if(!..() || !seed)
return
if(seed.biolum)
user.SetLuminosity(user.luminosity - seed.biolum)
SetLuminosity(seed.biolum)
// Food object defines follow.
/obj/item/weapon/reagent_containers/food/snacks/grown/corn
name = "ear of corn"
desc = "Needs some butter!"
plantname = "corn"
icon_state = "corn"
potency = 40
filling_color = "#FFEE00"
trash = /obj/item/weapon/corncob
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
gender = PLURAL
plantname = "cherry"
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
name = "poppy"
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
potency = 30
filling_color = "#CC6464"
plantname = "poppies"
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
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<65>d not thy breath.\""
icon_state = "harebell"
potency = 1
filling_color = "#D4B2C9"
plantname = "harebells"
/obj/item/weapon/reagent_containers/food/snacks/grown/potato
name = "potato"
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
potency = 25
filling_color = "#E6E8DA"
plantname = "potato"
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
filling_color = "#A332AD"
plantname = "grapes"
/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes
name = "bunch of green grapes"
desc = "Nutritious!"
icon_state = "greengrapes"
potency = 25
filling_color = "#A6FFA3"
plantname = "greengrapes"
/obj/item/weapon/reagent_containers/food/snacks/grown/peanut
name = "peanut"
desc = "Nuts!"
icon_state = "peanut"
filling_color = "857e27"
potency = 25
plantname = "peanut"
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
name = "cabbage"
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
potency = 25
filling_color = "#A2B5A1"
plantname = "cabbage"
/obj/item/weapon/reagent_containers/food/snacks/grown/berries
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
filling_color = "#C2C9FF"
plantname = "berries"
/obj/item/weapon/reagent_containers/food/snacks/grown/plastellium
name = "clump of plastellium"
desc = "Hmm, needs some processing"
icon_state = "plastellium"
filling_color = "#C4C4C4"
plantname = "plastic"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries
name = "bunch of glow-berries"
desc = "Nutritious!"
filling_color = "#D3FF9E"
icon_state = "glowberrypile"
plantname = "glowberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
name = "cocoa pod"
desc = "Can be ground into cocoa powder."
icon_state = "cocoapod"
potency = 50
filling_color = "#9C8E54"
plantname = "cocoa"
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
name = "sugarcane"
desc = "Sickly sweet."
icon_state = "sugarcane"
potency = 50
filling_color = "#C0C9AD"
plantname = "sugarcane"
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries
name = "bunch of poison-berries"
desc = "Taste so good, you could die!"
icon_state = "poisonberrypile"
gender = PLURAL
potency = 15
filling_color = "#B422C7"
plantname = "poisonberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries
name = "bunch of death-berries"
desc = "Taste so good, you could die!"
icon_state = "deathberrypile"
gender = PLURAL
potency = 50
filling_color = "#4E0957"
plantname = "deathberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
name = "ambrosia vulgaris branch"
desc = "This is a plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
potency = 10
filling_color = "#125709"
plantname = "ambrosia"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
name = "ambrosia deus branch"
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
potency = 10
filling_color = "#229E11"
plantname = "ambrosiadeus"
/obj/item/weapon/reagent_containers/food/snacks/grown/apple
name = "apple"
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#DFE88B"
plantname = "apple"
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
name = "apple"
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#B3BD5E"
plantname = "poisonapple"
/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple
name = "golden apple"
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
potency = 15
filling_color = "#F5CB42"
plantname = "goldapple"
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
name = "watermelon"
desc = "It's full of watery goodness."
icon_state = "watermelon"
potency = 10
filling_color = "#FA2863"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
plantname = "watermelon"
/obj/item/weapon/reagent_containers/food/snacks/grown/lime
name = "lime"
desc = "It's so sour, your face will twist."
icon_state = "lime"
potency = 20
filling_color = "#28FA59"
plantname = "lime"
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon
name = "lemon"
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
potency = 20
filling_color = "#FAF328"
plantname = "lemon"
/obj/item/weapon/reagent_containers/food/snacks/grown/orange
name = "orange"
desc = "It's a tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"
plantname = "orange"
/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
name = "white-beet"
desc = "You can't beat white-beet."
icon_state = "whitebeet"
potency = 15
filling_color = "#FFFCCC"
plantname = "whitebeet"
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
name = "banana"
desc = "It's an excellent prop for a comedy."
icon = 'icons/obj/items.dmi'
icon_state = "banana"
item_state = "banana"
filling_color = "#FCF695"
trash = /obj/item/weapon/bananapeel
plantname = "banana"
/obj/item/weapon/reagent_containers/food/snacks/grown/chili
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
plantname = "chili"
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#550F5C"
plantname = "eggplant"
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
filling_color = "#E6E8B7"
icon_state = "soybeans"
plantname = "soybean"
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
filling_color = "#FF0000"
potency = 10
plantname = "tomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato
name = "blood-tomato"
desc = "So juicy."
icon_state = "bloodtomato"
potency = 10
filling_color = "#FF0000"
plantname = "bloodtomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato
name = "blue-tomato"
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
potency = 10
filling_color = "#586CFC"
plantname = "bluetomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
name = "wheat"
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F7E186"
plantname = "wheat"
/obj/item/weapon/reagent_containers/food/snacks/grown/ricestalk
name = "rice stalk"
desc = "Rice to see you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FFF8DB"
plantname = "rice"
/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod
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"
filling_color = "#59691B"
plantname = "kudzu"
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
name = "ice-pepper"
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
potency = 20
filling_color = "#66CEED"
plantname = "icechili"
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
name = "carrot"
desc = "It's good for the eyes!"
icon_state = "carrot"
potency = 10
filling_color = "#FFC400"
plantname = "carrot"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
name = "reishi"
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
icon_state = "reishi"
potency = 10
filling_color = "#FF4800"
plantname = "reishi"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
name = "fly amanita"
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
potency = 10
filling_color = "#FF0000"
plantname = "amanita"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
name = "destroying angel"
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
potency = 35
filling_color = "#FFDEDE"
plantname = "destroyingangel"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
name = "liberty-cap"
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
potency = 15
filling_color = "#F714BE"
plantname = "libertycap"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#F714BE"
plantname = "plumphelmet"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#FFBFEF"
potency = 30
plantname = "walkingmushroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFE991"
plantname = "mushrooms"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
icon_state = "glowshroom"
filling_color = "#DAFF91"
potency = 30
plantname = "glowshroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
name = "blue-space tomato"
desc = "So lubricated, you might slip through space-time."
icon_state = "bluespacetomato"
potency = 20
origin_tech = "bluespace=3"
filling_color = "#91F8FF"
plantname = "bluespacetomato"
// Super special snowflake grown items below.
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
name = "S'rendarr's Hand leaf"
desc = "A leaf sample from a lowland thicket shrub. Smells strongly like wax."
icon_state = "shand"
filling_color = "#70C470"
plantname = "shand"
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear
name = "sprig of Messa's Tear"
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of healing chemicals."
icon_state = "mtear"
filling_color = "#70C470"
plantname = "mtear"
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
poultice.heal_burn = potency
del(src)
user << "<span class='notice'>You mash the petals into a poultice.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/shand/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
poultice.heal_brute = potency
del(src)
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
name = "pumpkin"
desc = "It's large and scary."
icon_state = "pumpkin"
potency = 10
filling_color = "#FAB728"
plantname = "pumpkin"
/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/sunflower // FLOWER POWER!
plantname = "sunflowers"
name = "sunflower"
desc = "A beautiful yellow flower."
icon_state = "sunflower"
damtype = "fire"
force = 0
throw_speed = 1
throw_range = 3
/obj/item/weapon/reagent_containers/food/snacks/grown/nettle
plantname = "nettle"
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
w_class = 2.0
throw_speed = 1
throw_range = 3
origin_tech = "combat=1"
attack_verb = list("stung")
hitsound = ""
/obj/item/weapon/reagent_containers/food/snacks/grown/nettle/death
plantname = "deathnettle"
desc = "A cruel and toxic-looking plant."
name = "deathnettle"
icon_state = "deathnettle"
origin_tech = "combat=3"