TG: -Added soil to plant seeds in. Make it by crushing up sandstone. Soil does not

have indicators like trays do! Watch your plants carefully!
-Added money trees. When life gives you lemons, mutate them into cash.
-RnD can create a new tool for botanists: The floral somatoray. Has two modes.
Use it on your plants to induce mutations or boost yield.
-Raised the passive species-mutation chance slightly.
-Fixed a goof I made before when I was editing poppies. Woops.
-Changed the name of "Generic Weeds".
-Normalized grass harvests.
-Couple of typo fixes.
-Updooted my changelog.
Revision: r3495
Author: 	 d_h2...@yahoo.com
This commit is contained in:
Erthilo
2012-05-05 23:45:45 +01:00
parent 84cb9b65ef
commit a83c870358
6 changed files with 317 additions and 55 deletions

View File

@@ -278,6 +278,23 @@
plant_type = 0 plant_type = 0
growthstages = 6 growthstages = 6
/obj/item/seeds/bluespacetomatoseed
name = "pack of blue-space tomato seeds"
desc = "These seeds grow into blue-space tomato plants."
icon_state = "seed-bluespacetomato"
mypath = "/obj/item/seeds/bluespacetomatoseed"
species = "bluespacetomato"
plantname = "Blue-Space Tomato Plants"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato"
lifespan = 25
endurance = 15
maturation = 8
production = 6
yield = 2
potency = 10
plant_type = 0
growthstages = 6
/obj/item/seeds/cornseed /obj/item/seeds/cornseed
name = "pack of corn seeds" name = "pack of corn seeds"
desc = "I don't mean to sound corny..." desc = "I don't mean to sound corny..."
@@ -400,7 +417,7 @@
potency = 10 potency = 10
oneharvest = 1 oneharvest = 1
plant_type = 0 plant_type = 0
growthstages = 5 growthstages = 3
/obj/item/seeds/amanitamycelium /obj/item/seeds/amanitamycelium
name = "pack of fly amanita mycelium" name = "pack of fly amanita mycelium"
@@ -1143,46 +1160,6 @@
reagents.add_reagent("coco", 4+round((potency / 5), 1)) reagents.add_reagent("coco", 4+round((potency / 5), 1))
bitesize = 1+round(reagents.total_volume / 2, 1) bitesize = 1+round(reagents.total_volume / 2, 1)
//This object is just a transition object. All it does is make a grass tile and delete itself.
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
seed = "/obj/item/seeds/grassseed"
name = "grass"
desc = "Green and lush."
icon_state = "spawner"
potency = 20
New()
new/obj/item/stack/tile/grass(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan
/obj/item/weapon/reagent_containers/food/snacks/grown/money
seed = "/obj/item/seeds/cashseed"
name = "dosh"
desc = "Green and lush."
icon_state = "spawner"
potency = 10
New()
switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
if(0 to 10)
new/obj/item/weapon/spacecash/(src.loc)
if(11 to 20)
new/obj/item/weapon/spacecash/c10(src.loc)
if(21 to 30)
new/obj/item/weapon/spacecash/c20(src.loc)
if(31 to 40)
new/obj/item/weapon/spacecash/c50(src.loc)
if(41 to 50)
new/obj/item/weapon/spacecash/c100(src.loc)
if(51 to 60)
new/obj/item/weapon/spacecash/c200(src.loc)
if(61 to 80)
new/obj/item/weapon/spacecash/c500(src.loc)
else
new/obj/item/weapon/spacecash/c1000(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane /obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
seed = "/obj/item/seeds/sugarcaneseed" seed = "/obj/item/seeds/sugarcaneseed"
name = "sugarcane" name = "sugarcane"
@@ -1985,3 +1962,99 @@
New() New()
src.pixel_x = rand(-5.0, 5) src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5)
// *************************************
// Complex Grown Object Defines -
// Putting these at the bottom so they don't clutter the list up. -Cheridan
// *************************************
//This object is just a transition object. All it does is make a grass tile and delete itself.
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
seed = "/obj/item/seeds/grassseed"
name = "grass"
desc = "Green and lush."
icon_state = "spawner"
potency = 20
New()
new/obj/item/stack/tile/grass(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan
/obj/item/weapon/reagent_containers/food/snacks/grown/money
seed = "/obj/item/seeds/cashseed"
name = "dosh"
desc = "Green and lush."
icon_state = "spawner"
potency = 10
New()
switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
if(0 to 10)
new/obj/item/weapon/spacecash/(src.loc)
if(11 to 20)
new/obj/item/weapon/spacecash/c10(src.loc)
if(21 to 30)
new/obj/item/weapon/spacecash/c20(src.loc)
if(31 to 40)
new/obj/item/weapon/spacecash/c50(src.loc)
if(41 to 50)
new/obj/item/weapon/spacecash/c100(src.loc)
if(51 to 60)
new/obj/item/weapon/spacecash/c200(src.loc)
if(61 to 80)
new/obj/item/weapon/spacecash/c500(src.loc)
else
new/obj/item/weapon/spacecash/c1000(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
seed = "/obj/item/seeds/bluespacetomatoseed"
name = "blue-space tomato"
desc = "So lubricated, you might slip through space-time."
icon_state = "bluespacetomato"
potency = 10
origin_tech = "bluespace=3"
New()
..()
reagents.add_reagent("nutriment", 1+round((potency / 20), 1))
reagents.add_reagent("singulo", 1+round((potency / 5), 1))
bitesize = 1+round(reagents.total_volume / 2, 1)
throw_impact(atom/hit_atom)
..()
var/mob/M = usr
var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport.
var/inner_teleport_radius = potency/15
var/list/turfs = new/list()
for(var/turf/T in orange(M,outer_teleport_radius))
if(T in orange(M,inner_teleport_radius)) continue
if(istype(T,/turf/space)) continue
if(T.density) continue
if(T.x>world.maxx-outer_teleport_radius || T.x<outer_teleport_radius) continue
if(T.y>world.maxy-outer_teleport_radius || T.y<outer_teleport_radius) continue
turfs += T
if(!turfs.len)
var/list/turfs_to_pick_from = list()
for(var/turf/T in orange(M,outer_teleport_radius))
if(!(T in orange(M,inner_teleport_radius)))
turfs_to_pick_from += T
turfs += pick(/turf in turfs_to_pick_from)
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
switch(rand(1,2))//Allows for easy addition of more bluespace weirdness.
if(1) // Teleports the person who threw the tomato.
new/obj/effect/effect/sparks(M.loc)
new/obj/effect/decal/ash(M.loc) //Leaves a pile of ash behind for dramatic effect.
M.loc = picked
new/obj/effect/effect/sparks(M.loc) //Two set of sparks, one before the teleport and one after.
if(2) //Teleports mob the tomato hit instead.
for(var/mob/A in get_turf(hit_atom))
new/obj/effect/effect/sparks(A.loc)
new/obj/effect/decal/ash(A.loc)
A.loc = picked
new/obj/effect/effect/sparks(A.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed, causing a distortion in space-time.</span>","<span class='moderate'>You hear a smack.</span>")
del(src)
return

View File

@@ -20,8 +20,15 @@
var/planted = 0 // Is it occupied? var/planted = 0 // Is it occupied?
var/harvest = 0 //Ready to harvest? var/harvest = 0 //Ready to harvest?
var/obj/item/seeds/myseed = null // The currently planted seed var/obj/item/seeds/myseed = null // The currently planted seed
New()
..()
bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(istype(Proj ,/obj/item/projectile/energy/floramut))
if(src.planted)
src.mutate()
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
if(src.planted && src.myseed.yield < 2)
src.myseed.yield += 1
obj/machinery/hydroponics/process() obj/machinery/hydroponics/process()
@@ -96,10 +103,12 @@ obj/machinery/hydroponics/process()
if(src.age > src.myseed.production && (src.age - src.lastproduce) > src.myseed.production && (!src.harvest && !src.dead)) if(src.age > src.myseed.production && (src.age - src.lastproduce) > src.myseed.production && (!src.harvest && !src.dead))
var/m_count = 0 var/m_count = 0
while(m_count < src.mutmod) while(m_count < src.mutmod)
if(prob(90)) if(prob(85))
src.mutate() src.mutate()
else if(prob(30)) else if(prob(30))
src.hardmutate() src.hardmutate()
else if(prob(5))
src.mutatespecie()
m_count++; m_count++;
if(src.yieldmod > 0 && src.myseed.yield != -1) // Unharvestable shouldn't be harvested if(src.yieldmod > 0 && src.myseed.yield != -1) // Unharvestable shouldn't be harvested
src.harvest = 1 src.harvest = 1
@@ -301,6 +310,14 @@ obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
del(src.myseed) del(src.myseed)
src.myseed = new /obj/item/seeds/angelmycelium src.myseed = new /obj/item/seeds/angelmycelium
else if ( istype(src.myseed, /obj/item/seeds/lemonseed ))
del(src.myseed)
src.myseed = new /obj/item/seeds/cashseed
else if ( istype(src.myseed, /obj/item/seeds/ambrosiavulgarisseed ))
del(src.myseed)
src.myseed = new /obj/item/seeds/ambrosiadeusseed
else if ( istype(src.myseed, /obj/item/seeds/plumpmycelium )) else if ( istype(src.myseed, /obj/item/seeds/plumpmycelium ))
del(src.myseed) del(src.myseed)
src.myseed = new /obj/item/seeds/walkingmushroommycelium src.myseed = new /obj/item/seeds/walkingmushroommycelium
@@ -331,6 +348,10 @@ obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
if(71 to 100) if(71 to 100)
src.myseed = new /obj/item/seeds/killertomatoseed src.myseed = new /obj/item/seeds/killertomatoseed
else if ( istype(src.myseed, /obj/item/seeds/bluetomatoseed ))
del(src.myseed)
src.myseed = new /obj/item/seeds/bluespacetomatoseed
else if ( istype(src.myseed, /obj/item/seeds/grapeseed )) else if ( istype(src.myseed, /obj/item/seeds/grapeseed ))
del(src.myseed) del(src.myseed)
src.myseed = new /obj/item/seeds/greengrapeseed src.myseed = new /obj/item/seeds/greengrapeseed
@@ -382,6 +403,8 @@ obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent in
spawn(5) // Wait a while spawn(5) // Wait a while
src.updateicon() src.updateicon()
src.visible_message("\red The mutated weeds in [src] spawned a \blue [src.myseed.plantname]!") src.visible_message("\red The mutated weeds in [src] spawned a \blue [src.myseed.plantname]!")
else
usr << "The few weeds in the tray seem to react, but only for a moment..."
return return
@@ -397,12 +420,12 @@ obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one
obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm, this is commented out obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm, this is commented out
// if ( src.pestlevel > 5 ) if ( src.pestlevel > 5 )
// user << "The worms seem to behave oddly..." src.visible_message("The pests seem to behave oddly...")
// spawn(10) // spawn(10)
// new /obj/effect/alien/spaceworm(src.loc) // new /obj/effect/alien/spaceworm(src.loc)
// else else
//user << "Nothing happens..." usr << "The pests seem to behave oddly, but quickly settle down..." //Modified to give a better idea of what's happening when you inject mutagen. There's still nothing proper to spawn here though. -Cheridan
return return
@@ -458,7 +481,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (81 to 90) src.mutatespecie() if (81 to 90) src.mutatespecie()
if (66 to 80) src.hardmutate() if (66 to 80) src.hardmutate()
if (41 to 65) src.mutate() if (41 to 65) src.mutate()
if (21 to 41) user << "Nothing happens..." if (21 to 41) user << "The plants don't seem to react..."
if (11 to 20) src.mutateweed() if (11 to 20) src.mutateweed()
if (1 to 10) src.mutatepest() if (1 to 10) src.mutatepest()
else user << "Nothing happens..." else user << "Nothing happens..."
@@ -583,11 +606,26 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (81 to 90) src.mutatespecie() if (81 to 90) src.mutatespecie()
if (66 to 80) src.hardmutate() if (66 to 80) src.hardmutate()
if (41 to 65) src.mutate() if (41 to 65) src.mutate()
if (21 to 41) user << "Nothing happens..." if (21 to 41) user << "The plants don't seem to react..."
if (11 to 20) src.mutateweed() if (11 to 20) src.mutateweed()
if (1 to 10) src.mutatepest() if (1 to 10) src.mutatepest()
else user << "Nothing happens..." else user << "Nothing happens..."
// The best stuff there is. For testing/debugging.
if(S.reagents.has_reagent("adminordrazine", 1))
src.waterlevel += round(S.reagents.get_reagent_amount("adminordrazine")*1)
src.health += round(S.reagents.get_reagent_amount("adminordrazine")*1)
src.nutrilevel += round(S.reagents.get_reagent_amount("adminordrazine")*1)
src.pestlevel -= rand(1,5)
src.weedlevel -= rand(1,5)
if(S.reagents.has_reagent("adminordrazine", 5))
switch(rand(100))
if (66 to 100) src.mutatespecie()
if (33 to 65) src.mutateweed()
if (1 to 32) src.mutatepest()
else user << "Nothing happens..."
S.reagents.clear_reagents() S.reagents.clear_reagents()
if (src.weedlevel < 0 ) // Make sure it won't go overoboard if (src.weedlevel < 0 ) // Make sure it won't go overoboard
src.weedlevel = 0 src.weedlevel = 0
@@ -839,6 +877,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (realName) if (realName)
podman.real_name = realName podman.real_name = realName
podman.original_name = realName //don't want a random ghost name if we die again
else else
podman.real_name = "pod person" //No null names!! podman.real_name = "pod person" //No null names!!
@@ -946,3 +985,39 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
planted = 0 planted = 0
dead = 0 dead = 0
updateicon() updateicon()
///////////////////////////////////////////////////////////////////////////////
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!
name = "soil"
icon = 'hydroponics.dmi'
icon_state = "soil"
density = 0
New()
..()
updateicon() // Same as normal but with the overlays removed - Cheridan.
overlays = null
if(src.planted)
if(dead)
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-dead")
else if(src.harvest)
if(src.myseed.plant_type == 2) // Shrooms don't have a -harvest graphic
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow[src.myseed.growthstages]")
else
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-harvest")
else if(src.age < src.myseed.maturation)
var/t_growthstate = ((src.age / src.myseed.maturation) * src.myseed.growthstages )
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow[round(t_growthstate)]")
src.lastproduce = src.age
else
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow[src.myseed.growthstages]")
if(myseed)
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(0)
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(myseed.potency/10)
else
if(luminosity)
sd_SetLuminosity(0)
return

View File

@@ -10,6 +10,7 @@ SILVER
//Sandstone //Sandstone
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("sandstone wall", ???), \ /* new/datum/stack_recipe("sandstone wall", ???), \
new/datum/stack_recipe("sandstone floor", ???),\*/ new/datum/stack_recipe("sandstone floor", ???),\*/

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/ionrifle /obj/item/weapon/gun/energy/ionrifle
name = "\improper Ion Rifle" name = "ion rifle"
desc = "A man portable anti-armor weapon designed to disable mechanical threats" desc = "A man portable anti-armor weapon designed to disable mechanical threats"
icon_state = "ionrifle" icon_state = "ionrifle"
fire_sound = 'Laser.ogg' fire_sound = 'Laser.ogg'
@@ -12,7 +12,7 @@
/obj/item/weapon/gun/energy/decloner /obj/item/weapon/gun/energy/decloner
name = "\improper Biological Demolecularisor" name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements." desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner" icon_state = "decloner"
fire_sound = 'pulse3.ogg' fire_sound = 'pulse3.ogg'
@@ -21,7 +21,7 @@
projectile_type = "/obj/item/projectile/energy/declone" projectile_type = "/obj/item/projectile/energy/declone"
obj/item/weapon/gun/energy/staff obj/item/weapon/gun/energy/staff
name = "\improper Staff of Change" name = "staff of change"
desc = "an artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself" desc = "an artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
icon = 'gun.dmi' icon = 'gun.dmi'
icon_state = "staffofchange" icon_state = "staffofchange"
@@ -52,4 +52,53 @@ obj/item/weapon/gun/energy/staff
if(!power_supply) return 0 if(!power_supply) return 0
power_supply.give(200) power_supply.give(200)
update_icon() update_icon()
return 1 return 1
/obj/item/weapon/gun/energy/floragun
name = "floral somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
icon_state = "floramut100"
item_state = "gun"
fire_sound = 'stealthoff.ogg'
charge_cost = 100
projectile_type = "/obj/item/projectile/energy/floramut"
origin_tech = "materials=2;biotech=3;powerstorage=3"
modifystate = "floramut"
var/charge_tick = 0
var/mode = 0 //0 = mutate, 1 = yield boost
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
update_icon()
return 1
attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 100
user << "\red The [src.name] is now set to increase yield."
projectile_type = "/obj/item/projectile/energy/florayield"
modifystate = "florayield"
if(1)
mode = 0
charge_cost = 100
user << "\red The [src.name] is now set to induce mutations."
projectile_type = "/obj/item/projectile/energy/floramut"
modifystate = "floramut"
update_icon()
return

View File

@@ -37,4 +37,59 @@
if(istype(target, /mob/living)) if(istype(target, /mob/living))
var/mob/M = target var/mob/M = target
M.bodytemperature = temperature M.bodytemperature = temperature
return 1 return 1
/obj/item/projectile/energy/floramut
name = "alpha somatoray"
icon_state = "energy"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
on_hit(var/atom/target, var/blocked = 0)
var/mob/M = target
if(istype(target, /mob/living/carbon/human) && M:mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays.
if(prob(15))
M.radiation += rand(10,30)
M.Weaken(5)
for (var/mob/V in viewers(src))
V.show_message("\red [M] writhes in pain as \his vacuoles boil.", 3, "\red You hear the crunching of leaves.", 2)
if(prob(35))
// for (var/mob/V in viewers(src)) //Public messages commented out to prevent possible metaish genetics experimentation and stuff. - Cheridan
// V.show_message("\red [M] is mutated by the radiation beam.", 3, "\red You hear the snapping of twigs.", 2)
if(prob(80))
randmutb(M)
domutcheck(M,null)
else
randmutg(M)
domutcheck(M,null)
else
M.adjustFireLoss(rand(5,15))
M.show_message("\red The radiation beam singes you!")
// for (var/mob/V in viewers(src))
// V.show_message("\red [M] is singed by the radiation beam.", 3, "\red You hear the crackle of burning leaves.", 2)
else if(istype(target, /mob/living/carbon/))
// for (var/mob/V in viewers(src))
// V.show_message("The radiation beam dissipates harmlessly through [M]", 3)
M.show_message("\blue The radiation beam dissipates harmlessly through your body.")
else
return 1
/obj/item/projectile/energy/florayield
name = "beta somatoray"
icon_state = "energy2"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
on_hit(var/atom/target, var/blocked = 0)
var/mob/M = target
if(istype(target, /mob/living/carbon/human) && M:mutantrace == "plant") //These rays make plantmen fat.
if(M.nutrition < 500) //sanity check
M.nutrition += 30
else if (istype(target, /mob/living/carbon/))
M.show_message("\blue The radiation beam dissipates harmlessly through your body.")
else
return 1

View File

@@ -1354,6 +1354,15 @@ datum
build_path = "/obj/item/weapon/gun/energy/temperature" build_path = "/obj/item/weapon/gun/energy/temperature"
locked = 1 locked = 1
flora_gun
name = "Floral Somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells. Harmless to other organic life."
id = "flora_gun"
req_tech = list("materials" = 2, "biotech" = 3, "powerstorage" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 2000, "$glass" = 500, "$uranium" = 500)
build_path = "/obj/item/weapon/gun/energy/floragun"
large_grenade large_grenade
name = "Large Grenade" name = "Large Grenade"
desc = "A grenade that affects a larger area and use larger containers." desc = "A grenade that affects a larger area and use larger containers."