Merge to main from the hydroponics branch r57_skie_1.

Hydroponics update + bugfixes.
Consists of revisions: 
R58, R60, R67, R68, R73.


Combined changelog (from oldest rev to newest):

Put all hydroponics defines into one .dm file
Added functionality for nettles and made all currently growable plantlife work
Changed hydroponics layout
Added Hydroponics Supply crates and added weed/pest sprays into the current ones
at hydro
Fixed nettle hold graphics
Fixed vending machines showing hidden items.
Added Research Director hydroponics access and botanists tox access (already had
chem access, but no tox).
Hydroponics in great shape. Spank Numbers for final modifications before merging
to trunk. (weedkillers, pestkillers)
Added a seed vending machine.
Amanitas now poison, and the poison is nasty. Added a poison() proc to all
foods.
Added graphics for vertical and horizontal one-tile-wide tables. Put one inside
hydroponics.
New 'blur' texture when your vision goes blurry.
Fixed a typo in hydroponics code.
Added a disposal unit in hydroponics.
Added a how-to instructions paper in hydroponics.
Hydroponics in working order. Extra features still in developement.
Fixed weedspray and pestspray entries.
Removed chaplains random probability to have see_invisible 15 at start, because
it's reset to 0 right next world tick anyways.
Added burn() and drug() procs to foodstuffs.
Added drug effects to some mushrooms. Have a nice trip.
Made chilis heat you up and ice peppers freeze you down.
Fixed carrot's harvest icon (it didn't exist)


To-do: Mutagens and vitamins for hydroponics plants.
New mutations, recipes for cook, extracting stuff from plants.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@74 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Skiedrake
2010-09-07 19:33:23 +00:00
parent b782759b3d
commit 78fc52ef11
43 changed files with 4721 additions and 3965 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
if ((O.client && !( O.blinded )))
O << text("\red [src] has been scanned by [user] with the [W]")
else
if (!( istype(W, /obj/item/weapon/grab) ) || !(istype(W, /obj/item/weapon/cleaner)) || !(istype(W, /obj/item/weapon/weedbgone)) )
if (!( istype(W, /obj/item/weapon/grab) ) || !(istype(W, /obj/item/weapon/cleaner)) || !(istype(W, /obj/item/weapon/plantbgone)) )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\red <B>[] has been hit by [] with []</B>", src, user, W)
+3 -3
View File
@@ -103,7 +103,7 @@
if("Medical Doctor")
return list(access_medical, access_morgue)
if("Botanist") // -- TLE
return list(access_medical, access_chemistry, access_hydroponics)
return list(access_medical, access_chemistry, access_hydroponics, access_tox) // Added tox access because there's chem access -- Skie
if("Librarian") // -- TLE
return list(access_library)
if("Captain")
@@ -143,10 +143,10 @@
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_ai_upload, access_construction)
if("Research Director")
if("Research Director") // added hydroponics access -- Skie
return list(access_medical, access_morgue, access_medlab, access_robotics,
access_tech_storage, access_maint_tunnels, access_heads, access_tox,
access_tox_storage, access_chemistry, access_teleporter)
access_tox_storage, access_chemistry, access_teleporter, access_hydroponics)
else
return list()
+2 -2
View File
@@ -269,8 +269,8 @@
src.equip_if_possible(new /obj/item/device/pda/chaplain(src), slot_belt)
src.equip_if_possible(new /obj/item/clothing/under/rank/chaplain(src), slot_w_uniform)
src.equip_if_possible(new /obj/item/clothing/shoes/black(src), slot_shoes)
if(prob(15))
src.see_invisible = 15
//if(prob(15))
// src.see_invisible = 15 -- Doesn't work as see_invisible is reset every world cycle. -- Skie
if ("Geneticist")
src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE
+397 -48
View File
@@ -6,8 +6,11 @@
anchored = 1
var/waterlevel = 100 // The amount of water in the tray (max 100)
var/nutrilevel = 10 // The amount of nutrient in the tray (max 10)
var/pestlevel = 0 // The amount of pests in the tray (max 10)
var/weedlevel = 0 // The amount of weeds in the tray (max 10)
var/yieldmod = 1 //Modifier to yield
var/mutmod = 1 //Modifier to mutation chance
var/toxic = 0 // Toxicity in the tray?
var/age = 0 // Current age
var/dead = 0 // Is it dead?
var/health = 0 // Its health.
@@ -15,45 +18,122 @@
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/harvest = 0 //Ready to harvest?
var/obj/item/seeds/myseed = null // The currently planted seed
obj/machinery/hydroponics/process()
if(world.time > (src.lastcycle + src.cycledelay))
src.lastcycle = world.time
if(src.planted & !src.dead)
if(src.planted && !src.dead)
// Advance age
src.age++
// Drink random amount of water
src.waterlevel -= rand(1,6)
// Nutrients deplete slowly
if(src.nutrilevel > 0)
src.nutrilevel -= 1
if(prob(50))
src.nutrilevel -= 1
// Lack of nutrients hurts non-weeds
if(src.nutrilevel == 0 && src.myseed.plant_type != 1)
src.health -= rand(1,3)
// Adjust the water level so it can't go negative
if(src.waterlevel < 0)
src.waterlevel = 0
if(src.waterlevel <= 0)
src.health -= 3
else if(src.waterlevel <= 5)
// If the plant is dry, it loses health pretty fast, unless mushroom
if(src.waterlevel <= 0 && src.myseed.plant_type != 2)
src.health -= rand(1,3)
else if(src.waterlevel <= 10 && src.myseed.plant_type != 2)
src.health -= rand(0,1)
// Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly
if(src.toxic >= 40 && src.toxic < 80)
src.health -= 1
if(src.waterlevel > 10 & src.nutrilevel > 0)
src.health += 1
src.toxic -= rand(1,10)
if(src.toxic >= 80)
src.health -= 3
src.toxic -= rand(1,10)
// Sufficient water level and nutrient level = plant healthy
if(src.waterlevel > 10 && src.nutrilevel > 0)
src.health += rand(1,2)
// Too many pests cause the plant to be sick
if(src.pestlevel >= 5)
src.health -= 1
// If it's a weed, it doesn't stunt the growth
if(src.weedlevel >= 5 && src.myseed.plant_type != 1 )
src.health -= 1
// Don't go overboard with the health
if(src.health > src.myseed.endurance)
src.health = src.myseed.endurance
// If the plant is too old, lose health fast
if(src.age > src.myseed.lifespan)
src.health -= 5
src.health -= rand(1,5)
// Plant dies if health = 0
if(src.health <= 0)
src.dead = 1
src.harvest = 0
src.weedlevel += 1 // Weeds flourish
//src.toxic = 0 // Water is still toxic
src.pestlevel = 0 // Pests die
// Harvest code
if(src.age > src.myseed.production && (src.age - src.lastproduce) > src.myseed.production && (!src.harvest && !src.dead))
var/m_count = 0
while(m_count < src.mutmod)
src.mutate()
if(prob(90))
src.mutate()
else
src.mutatespecie() // Just testing this here until mutagens are in place
m_count++;
if(src.yieldmod > 0)
if(src.yieldmod > 0 && src.myseed.yield != -1) // Unharvestable shouldn't be harvested
src.harvest = 1
else
src.lastproduce = src.age
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
src.pestlevel += 1
if(prob(5) && src.waterlevel > 10 && src.nutrilevel > 0) // On each tick, there's a 5 percent chance the weed population will increase, but there needs to be water/nuts for that!
src.weedlevel += 1
else
if(prob(10) && src.waterlevel > 10 && src.nutrilevel > 0) // If there's no plant, the percentage chance is 10%
src.weedlevel += 1
// These (v) wouldn't be necessary if additional checks were made earlier (^)
if (src.weedlevel > 10) // Make sure it won't go overoboard
src.weedlevel = 10
if (src.toxic < 0) // Make sure it won't go overoboard
src.toxic = 0
if (src.pestlevel > 10 ) // Make sure it won't go overoboard
src.pestlevel = 10
// Weeeeeeeeeeeeeeedddssss
if (prob(50) && src.weedlevel == 10) // At this point the plant is kind of fucked. Weeds can overtake the plant spot.
if(src.planted)
if(src.myseed.plant_type == 0) // If a normal plant
src.weedinvasion()
else
src.mutateweed() // Just testing this out okay
else
src.weedinvasion() // Weed invasion into empty tray
src.updateicon()
return
obj/machinery/hydroponics/proc/updateicon()
//Refreshes the icon
overlays = null
@@ -61,13 +141,16 @@ obj/machinery/hydroponics/proc/updateicon()
if(dead)
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-dead")
else if(src.harvest)
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-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) * 6)
var/t_growthstate = ((src.age / src.myseed.maturation) * src.myseed.growthstages ) // Make sure it won't crap out due to HERPDERP 6 stages only
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow[round(t_growthstate)]")
src.lastproduce = src.age //Cheating by putting this here, it means that it isn't instantly ready to harvest
else
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow6")
overlays += image('hydroponics.dmi', icon_state="[src.myseed.species]-grow[src.myseed.growthstages]") // Same
if(src.waterlevel <= 10)
overlays += image('hydroponics.dmi', icon_state="over_lowwater")
@@ -75,42 +158,208 @@ obj/machinery/hydroponics/proc/updateicon()
overlays += image('hydroponics.dmi', icon_state="over_lownutri")
if(src.health <= (src.myseed.endurance / 2))
overlays += image('hydroponics.dmi', icon_state="over_lowhealth")
if(src.weedlevel >= 5)
overlays += image('hydroponics.dmi', icon_state="over_alert")
if(src.pestlevel >= 5)
overlays += image('hydroponics.dmi', icon_state="over_alert")
if(src.toxic >= 40)
overlays += image('hydroponics.dmi', icon_state="over_alert")
if(src.harvest)
overlays += image('hydroponics.dmi', icon_state="over_harvest")
return
obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens.
src.dead = 0
if(src.myseed) // In case there's nothing in the tray beforehand
del(src.myseed)
switch(rand(1,15)) // randomly pick predominative weed
if(14 to 15)
src.myseed = new /obj/item/seeds/nettleseed
if(12 to 13)
src.myseed = new /obj/item/seeds/harebell
if(10 to 11)
src.myseed = new /obj/item/seeds/amanitamycelium
if(6 to 9)
src.myseed = new /obj/item/seeds/chantermycelium
//if(6 to 7) implementation for tower caps still kinda missing
// src.myseed = new /obj/item/seeds/towermycelium
if(4 to 5)
src.myseed = new /obj/item/seeds/plumpmycelium
else
src.myseed = new /obj/item/seeds/weeds
src.planted = 1
src.age = 0
src.health = src.myseed.endurance
src.lastcycle = world.time
src.harvest = 0
src.weedlevel = 0 // Reset
src.pestlevel = 0 // Reset
spawn(5) // Wait a while
src.updateicon()
src.visible_message("\red[src] has been overtaken by \blue [src.myseed.plantname]!")
var/P = new /obj/decal/point(src)
spawn (20)
del(P)
return
obj/machinery/hydroponics/proc/mutate() // Mutates the current seed
src.myseed.lifespan += rand(-2,2)
if(src.myseed.lifespan < 10)
src.myseed.lifespan = 10
if(src.myseed.lifespan > 30)
else if(src.myseed.lifespan > 30)
src.myseed.lifespan = 30
src.myseed.endurance += rand(-5,5)
if(src.myseed.endurance < 10)
src.myseed.endurance = 10
if(src.myseed.endurance > 100)
else if(src.myseed.endurance > 100)
src.myseed.endurance = 100
src.myseed.production += rand(-1,1)
if(src.myseed.production < 2)
src.myseed.production = 2
if(src.myseed.production > 10)
else if(src.myseed.production > 10)
src.myseed.production = 10
src.myseed.yield += rand(-2,2)
if(src.myseed.yield < 0)
src.myseed.yield = 0
if(src.myseed.yield > 10)
src.myseed.yield = 10
if(src.myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable
src.myseed.yield += rand(-2,2)
if(src.myseed.yield < 0)
src.myseed.yield = 0
else if(src.myseed.yield > 10)
src.myseed.yield = 10
if(src.myseed.potency != -1) //Not all plants have a potency
src.myseed.potency += rand(-10,10)
if(src.myseed.potency < 0)
src.myseed.potency = 0
if(src.myseed.potency > 100)
else if(src.myseed.potency > 100)
src.myseed.potency = 100
return
obj/machinery/hydroponics/proc/hardmutate() // Strongly mutates the current seed.
src.myseed.lifespan += rand(-4,4)
if(src.myseed.lifespan < 10)
src.myseed.lifespan = 10
else if(src.myseed.lifespan > 30)
src.myseed.lifespan = 30
src.myseed.endurance += rand(-10,10)
if(src.myseed.endurance < 10)
src.myseed.endurance = 10
else if(src.myseed.endurance > 100)
src.myseed.endurance = 100
src.myseed.production += rand(-2,2)
if(src.myseed.production < 2)
src.myseed.production = 2
else if(src.myseed.production > 10)
src.myseed.production = 10
if(src.myseed.yield != -1) // Unharvestable shouldn't suddenly turn harvestable
src.myseed.yield += rand(-4,4)
if(src.myseed.yield < 0)
src.myseed.yield = 0
else if(src.myseed.yield > 10)
src.myseed.yield = 10
if(src.myseed.potency != -1) //Not all plants have a potency
src.myseed.potency += rand(-20,20)
if(src.myseed.potency < 0)
src.myseed.potency = 0
else if(src.myseed.potency > 100)
src.myseed.potency = 100
return
obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
if ( istype(src.myseed, /obj/item/seeds/nettleseed ))
del(src.myseed)
src.myseed = new /obj/item/seeds/deathnettleseed
else if ( istype(src.myseed, /obj/item/seeds/amanitamycelium ))
del(src.myseed)
src.myseed = new /obj/item/seeds/angelmycelium
else if ( istype(src.myseed, /obj/item/seeds/chiliseed ))
del(src.myseed)
src.myseed = new /obj/item/seeds/icepepperseed
else
return
src.dead = 0
src.hardmutate()
src.planted = 1
src.age = 0
src.health = src.myseed.endurance
src.lastcycle = world.time
src.harvest = 0
src.weedlevel = 0 // Reset
spawn(5) // Wait a while
src.updateicon()
src.visible_message("\red[src] has suddenly mutated into \blue [src.myseed.plantname]!")
return
obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant
if ( src.weedlevel > 5 && src.myseed.plant_type == 1 )
//user << "Weeds have overtaken the spot! The weeds mutate!"
del(src.myseed)
switch(rand(100))
if(1 to 33) src.myseed = new /obj/item/seeds/libertymycelium
if(34 to 66) src.myseed = new /obj/item/seeds/angelmycelium
else src.myseed = new /obj/item/seeds/deathnettleseed
src.dead = 0
src.hardmutate()
src.planted = 1
src.age = 0
src.health = src.myseed.endurance
src.lastcycle = world.time
src.harvest = 0
src.weedlevel = 0 // Reset
spawn(5) // Wait a while
src.updateicon()
src.visible_message("\red The mutated weeds in [src] spawned a \blue [src.myseed.plantname]!")
return
obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier
src.health = 0
src.dead = 1
src.harvest = 0
src.updateicon()
//user << "The plant whiters and dies." Fix this
return
obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm, this is commented out
// if ( src.pestlevel > 5 )
// user << "The worms seem to behave oddly..."
// spawn(10)
// new /obj/alien/spaceworm(src.loc)
// else
//user << "Nothing happens..."
return
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -124,12 +373,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.waterlevel += b_amount
playsound(src.loc, 'slosh.ogg', 25, 1)
user << "You fill the tray with [b_amount] units of water."
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
// src.toxic -= round(b_amount/2)
// if (src.toxic < 0 ) // Make sure it won't go overoboard
// src.toxic = 0
else if(src.waterlevel >= 100)
user << "\red The hydroponics tray is already full."
else
user << "\red The bucket is not filled with water."
src.updateicon()
else if ( istype(O, /obj/item/nutrient/) )
else if ( istype(O, /obj/item/nutrient) )
var/obj/item/nutrient/myNut = O
user.u_equip(O)
src.nutrilevel = 10
@@ -138,7 +392,54 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
user << "You replace the nutrient solution in the tray"
del(O)
src.updateicon()
else if (istype(O, /obj/item/seeds/))
else if ( istype(O, /obj/item/weapon/weedspray) )
var/obj/item/weedkiller/myWKiller = O
user.u_equip(O)
src.toxic += myWKiller.toxicity
src.weedlevel -= myWKiller.WeedKillStr
if (src.weedlevel < 0 ) // Make sure it won't go overoboard
src.weedlevel = 0
if (src.toxic > 100 ) // Make sure it won't go overoboard
src.toxic = 100
user << "You apply the weedkiller solution into the tray"
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
del(O)
src.updateicon()
else if ( istype(O, /obj/item/weapon/pestspray) )
var/obj/item/pestkiller/myPKiller = O
user.u_equip(O)
src.toxic += myPKiller.toxicity
src.pestlevel -= myPKiller.PestKillStr
if (src.pestlevel < 0 ) // Make sure it won't go overoboard
src.pestlevel = 0
if (src.toxic > 100 ) // Make sure it won't go overoboard
src.toxic = 100
user << "You apply the pestkiller solution into the tray"
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
del(O)
src.updateicon()
// else if ( istype(O, /obj/item/weapon/reagent_containers/glass/bucket)) If injected with vitamins... it should make the health regenerate
// if(src.planted)
// src.health += 5
// src.endurance += 1
// if( src.health > src.myspeed.endurance )
// src.health = src.myseed.endurance
// else if ( istype(O, /obj/item/weapon/reagent_containers/glass/bucket)) If injected with mutagen... not sure how to make the syringe injection work
// if (src.planted)
// switch(rand(100))
// if (100 to 91) src.plantdies()
// if (90 to 81) src.mutatespecie()
// if (80 to 66) src.hardmutate()
// if (65 to 41) src.mutate()
// if (40 to 31) user << "Nothing happens..."
// if (30 to 21) src.mutateweed()
// if (20 to 11) src.mutatepest()
// if (10 to 1) src.plantdies()
// else user << "Nothing happens..."
else if ( istype(O, /obj/item/seeds/) )
if(!src.planted)
user.u_equip(O)
user << "You plant the [O.name]"
@@ -155,29 +456,44 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.updateicon()
else
user << "\red The tray already has a seed in it!"
else if (istype(O, /obj/item/device/analyzer/plant_analyzer))
if(src.planted && src.myseed)
user << "<B>[src.myseed.name]</B>"
user << "*** <B>[src.myseed.name]</B> ***"
user << "-<B>Plant Age:</B> [src.age]"
user << "--<B>Plant Endurance:</B> [src.myseed.endurance]"
user << "--<B>Plant Lifespan:</B> [src.myseed.lifespan]"
user << "--<B>Plant Yield:</B> [src.myseed.yield]"
if(src.myseed.yield != -1)
user << "--<B>Plant Yield:</B> [src.myseed.yield]"
user << "--<B>Plant Production:</B> [src.myseed.production]"
if(src.myseed.potency != -1)
user << "--<B>Plant Potency:</B> [src.myseed.potency]"
user << "--<B>Weed level:</B> [src.weedlevel]/10"
user << "--<B>Pest level:</B> [src.pestlevel]/10"
user << "--<B>Toxicity level:</B> [src.toxic]/100"
user << ""
else
user << "<B>No plant found.</B>"
else if (istype(O, /obj/item/weapon/weedbgone))
user << "--<B>Weed level:</B> [src.weedlevel]/10"
user << "--<B>Pest level:</B> [src.pestlevel]/10"
user << "--<B>Toxicity level:</B> [src.toxic]/100"
user << ""
else if (istype(O, /obj/item/weapon/plantbgone))
if(src.planted && src.myseed)
src.health -= rand(5,50)
src.health -= rand(5,20)
src.pestlevel -= 1 // Kill kill kill
src.weedlevel -= 2 // Kill kill kill
src.toxic += 5 // Oops
src.visible_message("\red <B>\The [src] has been sprayed with \the [O][(user ? " by [user]." : ".")]")
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
else
user << "\red Nothing is planted in the hydrotray!"
return
/obj/machinery/hydroponics/attack_hand(mob/user as mob)
if(src.harvest)
if(!user in range(1,src))
@@ -186,16 +502,40 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/t_amount = 0
while ( t_amount < (src.myseed.yield * src.yieldmod ))
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new item(user.loc)
t_prod.seed = src.myseed.mypath
t_prod.species = src.myseed.species
t_prod.lifespan = src.myseed.lifespan
t_prod.endurance = src.myseed.endurance
t_prod.maturation = src.myseed.maturation
t_prod.production = src.myseed.production
t_prod.yield = src.myseed.yield
t_prod.potency = src.myseed.potency
t_amount++
if(src.myseed.species == "nettle" || src.myseed.species == "deathnettle") // User gets a WEPON
var/obj/item/weapon/grown/t_prod = new item(user.loc)
t_prod.seed = src.myseed.mypath
t_prod.species = src.myseed.species
t_prod.lifespan = src.myseed.lifespan
t_prod.endurance = src.myseed.endurance
t_prod.maturation = src.myseed.maturation
t_prod.production = src.myseed.production
t_prod.yield = src.myseed.yield
t_prod.potency = src.myseed.potency
t_prod.force = src.myseed.potency // POTENCY == DAMAGE FUCK YEEAHHH
t_prod.plant_type = src.myseed.plant_type
t_amount++
//else if(src.myseed.species == "towercap")
//var/obj/item/wood/t_prod = new item(user.loc) - User gets wood (heh) - not implemented yet
else
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new item(user.loc) // User gets a consumable
t_prod.seed = src.myseed.mypath
t_prod.species = src.myseed.species
t_prod.lifespan = src.myseed.lifespan
t_prod.endurance = src.myseed.endurance
t_prod.maturation = src.myseed.maturation
t_prod.production = src.myseed.production
t_prod.yield = src.myseed.yield
t_prod.potency = src.myseed.potency
t_prod.plant_type = src.myseed.plant_type
if(src.myseed.species == "amanita" || src.myseed.species == "angel")
t_prod.poison_amt = src.myseed.potency * 2 // Potency translates to poison amount
t_prod.drug_amt = src.myseed.potency / 5 // Small trip
else if(src.myseed.species == "liberty")
t_prod.drug_amt = src.myseed.potency // TRIP TIME
else if(src.myseed.species == "chili" || src.myseed.species == "chiliice")
t_prod.heat_amt = src.myseed.potency // BRING ON THE HEAT
t_amount++
src.harvest = 0
src.lastproduce = src.age
if((src.yieldmod * src.myseed.yield) <= 0)
@@ -214,13 +554,20 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
src.updateicon()
else
if(src.planted && !src.dead)
usr << text("The hydroponics tray has a [src.myseed.plantname] planted")
usr << text("The hydroponics tray has \blue [src.myseed.plantname] \black planted")
if(src.health <= (src.myseed.endurance / 2))
usr << text("The plant looks unhealthy")
else
usr << text("The hydroponics tray is empty")
usr << text("Water: [src.waterlevel]/100")
usr << text("Nutrient: [src.nutrilevel]/10")
if(src.weedlevel >= 5) // Visual aid for those blind
usr << text("The tray is filled with weeds!")
if(src.pestlevel >= 5) // Visual aid for those blind
usr << text("The tray is filled with tiny worms!")
usr << text ("") // Empty line for readability.
/obj/item/device/analyzer/plant_analyzer
name = "Plant Analyzer"
@@ -229,10 +576,13 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
attack_self(mob/user as mob)
return 0
// BROKEN!!!!!!
/datum/vinetracker
var/list/vines = list()
proc/process()
proc/vineprocess()
set background = 1
while(vines.len > 0)
for(var/obj/plant/vine/V in vines)
@@ -247,6 +597,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/plant))
plantfound = 1
break
if(plantfound)
continue
var/chance = rand(1,100)
@@ -291,9 +642,8 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
obj/plant
anchored = 1
var
stage = 1
health = 10
var/stage = 1
var/health = 10
obj/plant/vine
name = "space vine"
@@ -301,8 +651,7 @@ obj/plant/vine
icon_state = "spacevine1"
anchored = 1
health = 20
var
datum/vinetracker/tracker
var/datum/vinetracker/tracker
New()
..()
@@ -314,7 +663,7 @@ obj/plant/vine
var/datum/vinetracker/V = new /datum/vinetracker
tracker = V
V.vines.Add(src)
spawn () V.process()
spawn () V.vineprocess()
attackby(var/obj/item/weapon/W, var/mob/user)
if(health <= 0)
-40
View File
@@ -2,7 +2,6 @@
var/egg_amount = 0
var/flour_amount = 0
var/water_amount = 0
var/cheese_amount = 0
var/monkeymeat_amount = 0
var/xenomeat_amount = 0
var/humanmeat_amount = 0
@@ -66,30 +65,6 @@
xenomeat_amount = 1
creates = "/obj/item/weapon/reagent_containers/food/snacks/xenoburger"
/datum/recipe/meatbread
flour_amount = 3
monkeymeat_amount = 3
cheese_amount = 3
creates = "/obj/item/weapon/reagent_containers/food/snacks/meatbread"
/datum/recipe/meatbreadhuman
flour_amount = 3
humanmeat_amount = 3
cheese_amount = 3
creates = "/obj/item/weapon/reagent_containers/food/snacks/meatbread"
/datum/recipe/omelette
egg_amount = 2
cheese_amount = 2
creates = "/obj/item/weapon/reagent_containers/food/snacks/omelette"
/datum/recipe/muffin
egg_amount = 1
flour_amount = 1
extra_item = /obj/item/weapon/reagent_containers/food/drinks/milk
creates = "/obj/item/weapon/reagent_containers/food/snacks/muffin"
/obj/machinery/microwave/New() // *** After making the recipe in defines\obj\food.dmi, add it in here! ***
..()
src.available_recipes += new /datum/recipe/donut(src)
@@ -103,10 +78,6 @@
src.available_recipes += new /datum/recipe/donkpocket_warm(src)
src.available_recipes += new /datum/recipe/pie(src)
src.available_recipes += new /datum/recipe/xenoburger(src)
src.available_recipes += new /datum/recipe/meatbread(src)
src.available_recipes += new /datum/recipe/meatbreadhuman(src)
src.available_recipes += new /datum/recipe/omelette (src)
src.available_recipes += new /datum/recipe/muffin (src)
/*******************
@@ -155,12 +126,6 @@ obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
V.show_message(text("\blue [user] adds some flour to the microwave."))
src.flour_amount++
del(O)
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge)) // If cheese is used, add it
if(src.cheese_amount < 5)
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [user] adds some cheese to the microwave."))
src.cheese_amount++
del(O)
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeymeat))
if(src.monkeymeat_amount < 5)
for(var/mob/V in viewers(src, null))
@@ -232,7 +197,6 @@ Please clean it before use!</TT><BR>
dat = {"
<B>Eggs:</B>[src.egg_amount] eggs<BR>
<B>Flour:</B>[src.flour_amount] cups of flour<BR>
<B>Cheese:</B>[src.cheese_amount] cheese wedges<BR>
<B>Monkey Meat:</B>[src.monkeymeat_amount] slabs of meat<BR>
<B>Meat Turnovers:</B>[src.donkpocket_amount] turnovers<BR>
<B>Other Meat:</B>[src.humanmeat_amount] slabs of meat<BR>
@@ -276,7 +240,6 @@ Please clean it before use!</TT><BR>
src.egg_amount = 0 // If so remove all the eggs
src.flour_amount = 0 // And the flour
src.water_amount = 0 //And the water
src.cheese_amount = 0 //And the cheese
src.monkeymeat_amount = 0
src.humanmeat_amount = 0
src.donkpocket_amount = 0
@@ -290,7 +253,6 @@ Please clean it before use!</TT><BR>
src.updateUsrDialog()
src.egg_amount = 0 //Clear all the values as this crap is what makes the mess inside!!
src.flour_amount = 0
src.cheese_amount = 0
src.water_amount = 0
src.humanmeat_amount = 0
src.monkeymeat_amount = 0
@@ -314,7 +276,6 @@ Please clean it before use!</TT><BR>
src.updateUsrDialog()
src.egg_amount = 0 //Clear all the values as this crap is gone when it breaks!!
src.flour_amount = 0
src.cheese_amount = 0
src.water_amount = 0
src.humanmeat_amount = 0
src.monkeymeat_amount = 0
@@ -343,7 +304,6 @@ Please clean it before use!</TT><BR>
if(operation == 2) // If dispose was pressed, empty the microwave
src.egg_amount = 0
src.flour_amount = 0
src.cheese_amount = 0
src.water_amount = 0
src.humanmeat_amount = 0
src.monkeymeat_amount = 0
+1 -17
View File
@@ -3,7 +3,7 @@ obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob)
user << "Something is already in the processing chamber."
return 0
else
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat) || istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/chili) || istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/tomato) || istype(O, /obj/item/weapon/reagent_containers/food/drinks/milk))
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat) || istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/chili) || istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/tomato))
user.drop_item()
O.loc = src
else
@@ -38,22 +38,6 @@ obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob)
del(O)
new /obj/item/weapon/reagent_containers/food/snacks/ketchup(src.loc)
return
if(istype(O, /obj/item/weapon/reagent_containers/food/drinks/milk))
sleep(40)
playsound(src.loc, 'blender.ogg', 50, 1)
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [user] turns on \a [src]."))
del(O)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewheel(src.loc)
return
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans))
sleep(40)
playsound(src.loc, 'blender.ogg', 50, 1)
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [user] turns on \a [src]."))
del(O)
new /obj/item/weapon/reagent_containers/food/snacks/monkeymeat(src.loc)
return
user << "There doesn't appear to be anything in the processing chamber."
+9 -2
View File
@@ -69,8 +69,15 @@
R.product_name = capitalize(temp.name)
R.product_path = path_list[p]
R.display_color = pick("red","blue","green")
R.amount = text2num(amt_list[p])
src.product_records += R
// R.amount = text2num(amt_list[p])
// src.product_records += R
if(hidden)
R.amount = text2num(amt_list[p])
src.hidden_records += R
else
R.amount = text2num(amt_list[p])
src.product_records += R
del(temp)
+1 -20
View File
@@ -13,12 +13,6 @@
/obj/secure_closet/meat/New()
..()
sleep(2)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/tray (src)
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
@@ -38,7 +32,6 @@
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
new /obj/item/kitchen/egg_box(src)
new /obj/item/kitchen/egg_box(src)
new /obj/item/weapon/kitchenknife (src)
if(rand(20))
new /obj/item/weapon/reagent_containers/food/snacks/faggot(src)
@@ -58,16 +51,4 @@
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/milk (src)
new /obj/item/weapon/reagent_containers/food/drinks/cola(src)
+2 -5
View File
@@ -55,8 +55,5 @@
user << "<b>Transfer succeeded</b>: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
if (!istype (M, /mob/living/silicon/decoy))
return ..()
else
M.death()
user << "<b>ERROR ERROR ERROR</b>"
M.death()
user << "<b>ERROR ERROR ERROR</b>"
+73 -33
View File
@@ -1,60 +1,100 @@
/*
CONTAINS:
Weed-B-Gone
Plant-B-Gone
Nettle
Deathnettle
*/
/obj/item/weapon/weedbgone/New()
// Plant-B-Gone
/obj/item/weapon/plantbgone/New()
var/datum/reagents/R = new/datum/reagents(100) // 100 units of solution
reagents = R
R.my_atom = src
R.add_reagent("weedbgone", 100)
R.add_reagent("plantbgone", 100)
/obj/item/weapon/weedbgone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
/obj/item/weapon/plantbgone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/weapon/weedbgone/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
if (src.reagents.total_volume < 1)
user << "\blue Add more Weed-B-Gone mixture!"
user << "\blue Add more Plant-B-Gone mixture!"
return
else if (istype(A, /obj/item/weapon/storage/backpack ))
return
else if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
/* Gotta figure out how to make this work, chemical sprite doesn't appear.
var/obj/decal/spraystill/D = new /obj/decal/spraystill( src ) // new decal at tray location
D.name = "chemicals"
D.icon = 'chemical.dmi'
D.icon_state = "weedpuff"
spawn(0) // spawn on top of tray
sleep(3)
del(D)
*/
return
else
var/obj/decal/D = new/obj/decal/(get_turf(src)) // Targeting elsewhere
D.name = "chemicals"
D.icon = 'chemical.dmi'
D.icon_state = "weedpuff"
D.create_reagents(5)
src.reagents.trans_to(D, 5) // 5 units of solution used at a time => 20 uses
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
if (locate (/obj/table, src.loc))
return
else
D.name = "chemicals"
D.icon = 'chemical.dmi'
D.icon_state = "weedpuff"
D.create_reagents(5)
src.reagents.trans_to(D, 5) // 5 units of solution used at a time => 20 uses
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
spawn(0)
for(var/i=0, i<2, i++) // Max range = 2 tiles
step_towards(D,A) // Moves towards target as normally (not thru walls)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
sleep(4)
del(D)
spawn(0)
for(var/i=0, i<2, i++) // Max range = 2 tiles
step_towards(D,A) // Moves towards target as normally (not thru walls)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
sleep(4)
del(D)
return
return
/obj/item/weapon/weedbgone/examine()
/obj/item/weapon/plantbgone/examine()
set src in usr
usr << text("\icon[] [] units of Weed-B-Gone left!", src, src.reagents.total_volume)
usr << text("\icon[] [] units of Plant-B-Gone left!", src, src.reagents.total_volume)
..()
return
// Nettle
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
user.fireloss += force
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
if (force > 0)
force -= rand(0,(force/10)+1) // When you whack someone with it, leaves fall off
else
usr << "All the leaves have fallen off the nettle from violent whacking."
del(src)
// Deathnettle
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user.fireloss += force
if(prob(50))
user.paralysis += 5
user << "\red You are stunned by the Deathnettle when you try picking it up!"
/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
if(istype(M, /mob/living/carbon/human))
M << "\red You are stunned by the powerful acid of the Deathnettle!"
M.eye_blurry += 4
M.paralysis += 5
M.weakened += 2
M.drop_item()
..()
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
if (force > 0)
force -= rand(0,(force/10)+1) // When you whack someone with it, leaves fall off
else
usr << "All the leaves have fallen off the deathnettle from violent whacking."
del(src)
@@ -14,9 +14,7 @@ MOP
return
/obj/item/weapon/cleaner/afterattack(atom/A as mob|obj, mob/user as mob)
if (istype(A, /obj/item/weapon/storage/backpack ))
return
else if (src.reagents.total_volume < 1)
if (src.reagents.total_volume < 1)
user << "\blue Add more cleaner!"
return
+2 -2
View File
@@ -193,8 +193,8 @@ Frequency:
var/part_c = "</span></span>"
if(findtext(part_b, "135.3") || findtext(part_b, "135.5") || findtext(part_b, "135.7") || findtext(part_b, "135.9"))
part_a = "<span class='deptradio'><span class='name'>"
part_b = "<font color=#800080>" + part_b
part_c = part_c + "</font>"
if (length(heard_masked))
+7 -6
View File
@@ -110,7 +110,7 @@
locked = 1
/obj/crate/hydroponics
name = "Gardening crate"
name = "Hydroponics crate"
desc = "All you need to destroy those pesky weeds and pests."
icon = 'storage.dmi'
icon_state = "hydrocrate"
@@ -119,11 +119,12 @@
density = 1
New()
..()
new /obj/item/weapon/weedbgone(src)
new /obj/item/weapon/weedbgone(src)
new /obj/item/weapon/weedbgone(src)
new /obj/item/weapon/weedbgone(src)
// Four bottles should be enough for everybody.
new /obj/item/weapon/plantbgone(src)
new /obj/item/weapon/plantbgone(src)
new /obj/item/weapon/weedspray(src)
new /obj/item/weapon/weedspray(src)
new /obj/item/weapon/pestspray(src)
new /obj/item/weapon/pestspray(src)
/obj/crate/New()
..()
+17
View File
@@ -287,6 +287,23 @@ var/supply_shuttle_points = 50
containername = "Robotics Assembly"
access = access_robotics
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
contains = list("/obj/item/weapon/plantbgone",
"/obj/item/weapon/plantbgone",
"/obj/item/weapon/plantbgone",
"/obj/item/weapon/weedspray",
"/obj/item/weapon/weedspray",
"/obj/item/weapon/weedspray",
"/obj/item/weapon/pestspray",
"/obj/item/weapon/pestspray",
"/obj/item/weapon/pestspray",
"/obj/item/clothing/gloves/latex",
"/obj/item/clothing/gloves/latex") // For handling nettles etc
cost = 10
containertype = /obj/crate/hydroponics
containername = "Hydroponics crate"
access = access_hydroponics
//SUPPLY PACKS