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

View File

@@ -150,8 +150,6 @@ datum
holder.remove_reagent("toxin", 2)
if(holder.has_reagent("stoxin"))
holder.remove_reagent("stoxin", 2)
if(holder.has_reagent("cholesterol"))
holder.remove_reagent("cholesterol", 4)
if(holder.has_reagent("plasma"))
holder.remove_reagent("plasma", 1)
if(holder.has_reagent("acid"))
@@ -207,32 +205,6 @@ datum
..()
return
/*cholesterol /////////////////////////////////It's cholesterol. IN SPACE. Remains out till it's fucking fixed ///////////////////
name = "Cholesterol"
id = "cholesterol"
description = "A certain steroid fat that is known to cause trouble to humans in large doses. Obtained through fatty diets."
reagent_state = LIQUID
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
if(!data) data = 1
switch(data)
if(30 to 30)
M << "\red Your blood feels... sluggish..."
if(75 to 99)
for(M in viewers(src, null))
M.show_message(text("\red Oh no! [M.name] seems to be having a minor cardiac arrest!"), 1)
M:toxloss += 35
M:drowsyness = max(M:drowsyness, 25)
if(120 to INFINITY)
usr << "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGGGGGGGGGGGGGGGGGGGGGG"
for(M in viewers(src, null))
M.show_message("\red <B>[M.name] 's face turns blue as he suffers a major cardiac arrest! He's not walking out of this one for sure...</B>", 1)
M:toxloss +=200
data++
..()
return*/
inaprovaline
name = "Inaprovaline"
id = "inaprovaline"
@@ -626,9 +598,9 @@ datum
C:head.clean_blood()
weedbgone
name = "Weed-B-Gone"
id = "weedbgone"
plantbgone
name = "Plant-B-Gone"
id = "plantbgone"
description = "A harmful toxic mixture to kill plantlife. Do not ingest!"
reagent_state = LIQUID
/* Don't know if this is necessary.
@@ -640,9 +612,9 @@ datum
*/
reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/plant/vine/))
O:life -= 25 // Kills vines nicely // Not tested as vines don't work in R41
O:life -= rand(5,30) // Kills vines nicely // Not tested as vines don't work in R41
else if(istype(O,/obj/alien/weeds/))
O:health -= 25 // Kills alien weeds pretty fast
O:health -= rand(5,25) // Kills alien weeds pretty fast
O:healthcheck()
// Damage that is done to growing plants is separately
// at code/game/machinery/hydroponics at obj/item/hydroponics
@@ -656,7 +628,6 @@ datum
//M.make_dizzy(1) doesn't seem to do anything
space_cola
name = "Cola"
id = "cola"

View File

@@ -389,9 +389,9 @@ datum
required_reagents = list("ammonia" = 1, "water" = 1)
result_amount = 1
weedbgone
name = "Weed-B-Gone"
id = "weedbgone"
result = "weedbgone"
plantbgone
name = "Plant-B-Gone"
id = "plantbgone"
result = "plantbgone"
required_reagents = list("toxin" = 1, "water" = 4)
result_amount = 5

View File

@@ -224,42 +224,39 @@
proc
fire_syringe(atom/target, mob/user)
if (locate (/obj/table, src.loc))
return
else
var/turf/trg = get_turf(target)
var/obj/syringe_gun_dummy/D = new/obj/syringe_gun_dummy(get_turf(src))
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
S.reagents.trans_to(D, S.reagents.total_volume)
syringes -= S
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'syringeproj.ogg', 50, 1)
var/turf/trg = get_turf(target)
var/obj/syringe_gun_dummy/D = new/obj/syringe_gun_dummy(get_turf(src))
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
S.reagents.trans_to(D, S.reagents.total_volume)
syringes -= S
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if(D.loc == trg) break
step_towards(D,trg)
for(var/i=0, i<6, i++)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/carbon/M in D.loc)
if(!istype(M,/mob/living/carbon)) continue
if(M == user) continue
D.reagents.trans_to(M, 15)
M.bruteloss += 5
for(var/mob/O in viewers(world.view, D))
O.show_message(text("\red [] was hit by the syringe!", M), 1)
for(var/mob/living/carbon/M in D.loc)
if(!istype(M,/mob/living/carbon)) continue
if(M == user) continue
D.reagents.trans_to(M, 15)
M.bruteloss += 5
for(var/mob/O in viewers(world.view, D))
O.show_message(text("\red [] was hit by the syringe!", M), 1)
del(D)
del(D)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density) del(D)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density) del(D)
sleep(1)
sleep(1)
spawn(10) del(D)
spawn(10) del(D)
return
return
@@ -587,10 +584,24 @@
/// Syringes. END
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// Snacks.
/// Food.
////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food
var/heal_amt = 0
// -- Skie - Mushrooms & poisoned foor
// 0 = no poison, 25 = some poison, >50 = LOTS of poison
var/poison_amt = 0
// -- Skie - Psilocybin
// 0 = no trip, 25 = medium trip, 50 large trip, >75 = WTF
var/drug_amt = 0
// -- Skie - Hot foods
// 0 = no heat, 25 = cayenne, 50 = habanero, >75 = jolokia
var/heat_amt = 0
proc
heal(var/mob/M)
if(istype(M, /mob/living/carbon/human))
@@ -609,6 +620,88 @@
M.fireloss = max(0, M.fireloss - src.heal_amt)
M.updatehealth()
proc
poison(var/mob/M)
var/poison_temp = src.poison_amt
src = null
spawn(200)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/C = M
if(poison_temp > 0)
C.toxloss += rand(0,poison_temp/2) // Some initial damage
C.fireloss += rand(0,poison_temp/4) // Some initial damage
C.UpdateDamageIcon()
C.weakened += poison_temp/(rand(1,4))
if(poison_temp > 20 && poison_temp < 50)
C << "\red You feel absolutely horrible."
C.emote(pick("blink", "blink_r", "twitch_s", "frown", "blush", "shrug", "pale", "sniff", "whimper", "flap", "drool", "moan", "twitch"))
else if(poison_temp > 49)
C << "<B>\red You feel like your liver is being disintegrated by an infernal poison.</B>"
C.emote(pick("groan", "frown", "moan", "whimper", "drool", "pale"))
C.eye_blurry += poison_temp
C.make_dizzy(10*poison_temp)
spawn()
for(poison_temp, poison_temp>0, 1) // Poison does 10 damage per tick
sleep(100) // Every 10 seconds
C.toxloss += min(poison_temp, 10)
poison_temp -= 10 // Until poison amount is depleted
proc
drug(var/mob/M)
var/drug_temp = src.drug_amt
src = null // Detach proc
spawn(200) // In 20 seconds...
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/C = M
C.druggy += (drug_temp*(drug_temp/15)+10) // Have a trip
if(drug_temp > 25)
C.make_dizzy(5*drug_temp) // Dizzify
C.stuttering = drug_temp // Speech impediments
spawn(3000) // 5 minutes
C << "\red You feel a craving for a trip..."
if(drug_temp > 50)
C.make_jittery(5*drug_temp) // Jitter
spawn(-1)
for(var/i=1, i == 1, 1)
C.see_invisible = 15
sleep(300)
C.emote(pick("blink", "blink_r", "twitch_s", "frown", "blush", "shrug", "pale", "sniff", "whimper", "flap", "drool", "moan", "twitch"))
if(prob(20))
C.see_invisible = 0
i = 0
if(drug_temp > 75)
C.confused += drug_temp // Hard to move where you want
C.weakened += rand(0, drug_temp/4) // Fall on your back
// Add cool stuff here later, like everything starting to look different etc.
proc
burn(var/mob/M)
var/temp_heat = src.heat_amt
var/temp_name = src.name
src = null
spawn(50)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/C = M
// BRING ON THE HEAT/FROST
spawn()
while(temp_heat > 5) // Until chili pepper's potency is depleted
sleep(20) // Every 2 seconds
C.fireloss += 3 // Do some burn damage because body temperature itself doesn't do anything :(
if (temp_heat > 0 && temp_name == "Chili")
C.bodytemperature += min(temp_heat*5, 25)
temp_heat -= 5 // Until heat amount is depleted
else if (temp_heat > 0 && temp_name == "Icepepper") // Herp derp, bad way to do it but herp derp
C.bodytemperature -= min(temp_heat*5, 25)
temp_heat -= 5 // Until heat amount is depleted
/obj/item/weapon/reagent_containers/food/snacks
name = "snack"
desc = "yummy"
@@ -639,10 +732,17 @@
spawn(5)
reagents.trans_to(M, reagents.total_volume)
src.amount--
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
M.nutrition += src.heal_amt * 10
M.poo += 0.1
src.heal(M)
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
if(src.heal_amt > 0)
src.heal(M)
if(src.poison_amt > 0)
src.poison(M)
if(src.drug_amt > 0)
src.drug(M)
if(src.heat_amt > 0)
src.burn(M)
if(!src.amount)
user << "\red You finish eating [src]."
del(src)
@@ -659,10 +759,17 @@
spawn(5)
reagents.trans_to(M, reagents.total_volume)
src.amount--
playsound(M.loc, 'eatfood.ogg', rand(10,50), 1)
M.nutrition += src.heal_amt * 10
M.poo += 0.1
src.heal(M)
playsound(M.loc, 'eatfood.ogg', rand(10,50), 1)
if(src.heal_amt > 0)
src.heal(M)
if(src.poison_amt > 0)
src.poison(M)
if(src.drug_amt > 0)
src.drug(M)
if(src.heat_amt > 0)
src.burn(M)
if(!src.amount)
user << "\red [M] finishes eating [src]."
del(src)
@@ -1182,85 +1289,6 @@
amount = 5
heal_amt = 2
/obj/item/weapon/reagent_containers/food/snacks/meatbread
name = "meatbread loaf"
desc = "The culinary base of every self-respecting eloquen/tg/entleman."
icon_state = "meatbread"
amount = 30
heal_amt = 5
/* New()
var/datum/reagents/R = new/datum/reagents(20)
reagents = R
R.my_atom = src
R.add_reagent("cholesterol", 20)*/
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/meatbreadslice
name = "meatbread slice"
desc = "A slice of delicious meatbread."
icon_state = "meatbreadslice"
amount = 5
heal_amt = 6
New()
/* var/datum/reagents/R = new/datum/reagents(10)
reagents = R
R.my_atom = src
R.add_reagent("cholesterol", 10)*/
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/cheesewheel
name = "Cheese wheel"
desc = "A big wheel of delcious Cheddar."
icon_state = "cheesewheel"
amount = 25
heal_amt = 3
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge
name = "Cheese wedge"
desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far."
icon_state = "cheesewedge"
amount = 4
heal_amt = 4
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/omelette
name = "Omelette Du Fromage"
desc = "That's all you can say!"
icon_state = "omelette"
amount = 15
heal_amt = 3
heal(var/mob/M)
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/kitchen/utensil/fork))
W.icon = 'kitchen.dmi'
W.icon_state = "forkloaded"
world << "[user] takes a piece of omelette with his fork!"
/obj/item/weapon/reagent_containers/food/snacks/omeletteforkload
name = "Omelette Du Fromage"
desc = "That's all you can say!"
amount = 1
heal_amt = 4
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/muffin
name = "Muffin"
desc = "A delicious and spongy little cake"
icon_state = "muffin"
amount = 4
heal_amt = 6
heal(var/mob/M)
..()
/obj/item/weapon/reagent_containers/food/snacks/roburger
name = "roburger"
desc = "The lettuce is the only organic component. Beep."
@@ -1340,17 +1368,6 @@
R.my_atom = src
R.add_reagent("beer", 30)
/obj/item/weapon/reagent_containers/food/drinks/milk
name = "Space Milk"
desc = "Milk. By Cows. Cows in space."
icon_state = "milk"
heal_amt = 1
New()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
R.add_reagent("milk", 50)
//Pills
/obj/item/weapon/reagent_containers/pill/antitox
name = "Anti-toxins pill"
@@ -1441,27 +1458,5 @@
..()
reagents.add_reagent("beer",1000)
///////////////////////////////////////////////////////////////////////////////////////////////////// Meatbread slicing RIGHT BELOW*************
/////////////////////////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food/snacks/meatbread/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchenknife /*|| /obj/item/weapon/scalpel*/))
W.visible_message(" <B>[usr] slices the meatbread! </B>", 1)
new /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice (src.loc)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/cheesewheel/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchenknife /* || /obj/item/weapon/scalpel*/))
W.visible_message(" <B>[usr] slices the cheese! </B>", 1)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge (src.loc)
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge (src.loc)
del(src)
return
/////////////////////////////////////////////////////////////////////////////////////////////////////