Tweaked hunger values once more.

Added check if you already ate something but it was not yet metabolized. It's harder to overeat now.
Improved the random look generator. Now it takes in account real-life statistics of skin tone and blood group distribution, and has different colors.
Fixed bug that sprinkles did not metabolized in non-security body.
Made rig suit to be proper space suit.
Cleaned some code
Made mopbucket to have 100 volume.
Added radio report diagnostic verb (but with no effect for now)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@551 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Rygzengrho
2010-12-06 23:30:18 +00:00
parent d5c2356340
commit 87ad3ade16
12 changed files with 168 additions and 80 deletions
+31 -5
View File
@@ -14,6 +14,7 @@ datum
var/reagent_state = SOLID
var/data = null
var/volume = 0
var/nutriment_factor = 0
proc
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some
@@ -42,7 +43,7 @@ datum
return
on_mob_life(var/mob/M)
holder.remove_reagent(src.id, 0.4) //By default it slowly disappears.
holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears.
return
on_move(var/mob/M)
@@ -1154,10 +1155,24 @@ datum
id = "nutriment"
description = "All the vitamins, minerals, and carbohydrates the body needs in pure form."
reagent_state = SOLID
nutriment_factor = 25 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
if(prob(50)) M:bruteloss--
M:nutrition += 10 // For hunger and fatness
M:nutrition += nutriment_factor // For hunger and fatness
/*
// If overeaten - vomit and fall down
// Makes you feel bad but removes reagents and some effects
// from your body
if (M.nutrition > 650)
M.nutrition = rand (250, 400)
M.weakened += rand(2, 10)
M.jitteriness += rand(0, 5)
M.dizziness = max (0, (M.dizziness - rand(0, 15)))
M.druggy = max (0, (M.druggy - rand(0, 15)))
M.toxloss = max (0, (M.toxloss - rand(5, 15)))
M.updatehealth()
*/
..()
return
@@ -1166,18 +1181,21 @@ datum
id = "soysauce"
description = "A salty sauce made from the soy plant."
reagent_state = LIQUID
nutriment_factor = 2 * REAGENTS_METABOLISM
ketchup
name = "Ketchup"
id = "ketchup"
description = "Ketchup, catsup, whatever. It's tomato paste."
reagent_state = LIQUID
nutriment_factor = 5 * REAGENTS_METABOLISM
capsaicin
name = "Capsaicin Oil"
id = "capsaicin"
description = "This is what makes chilis hot."
reagent_state = LIQUID
nutriment_factor = 5 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
M:bodytemperature += 5
@@ -1190,6 +1208,7 @@ datum
id = "frostoil"
description = "A special oil that noticably chills the body. Extraced from Icepeppers."
reagent_state = LIQUID
nutriment_factor = 5 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
M:bodytemperature -= 5
@@ -1202,12 +1221,14 @@ datum
id = "sodiumchloride"
description = "A salt made of sodium chloride. Commonly used to season food."
reagent_state = SOLID
nutriment_factor = 1 * REAGENTS_METABOLISM
blackpepper
name = "Black Pepper"
id = "blackpepper"
description = "A power ground from peppercorns. *AAAACHOOO*"
reagent_state = SOLID
nutriment_factor = 1 * REAGENTS_METABOLISM
amatoxin
name = "Amatoxin"
@@ -1236,22 +1257,26 @@ datum
name = "Sprinkles"
id = "sprinkles"
description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops."
nutriment_factor = 1 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
M:nutrition += nutriment_factor
if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective"))
if(!M) M = holder.my_atom
M:bruteloss--
M:fireloss--
M:nutrition++
M:nutrition += nutriment_factor
..()
return
..()
oliveoil
name = "Olive Oil"
id = "oliveoil"
description = "An oil derived from various types of olives. A famous export of Space Italy."
reagent_state = LIQUID
nutriment_factor = 20 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
M:nutrition += 20
M:nutrition += nutriment_factor
..()
return
reaction_turf(var/turf/T, var/volume)
@@ -1290,9 +1315,10 @@ datum
id = "berryjuice"
description = "A delicious blend of several different kinds of berries."
reagent_state = LIQUID
nutriment_factor = 1 * REAGENTS_METABOLISM
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
M:nutrition++
M:nutrition += nutriment_factor
..()
return
+14 -14
View File
@@ -729,7 +729,6 @@
playsound(M.loc,'drink.ogg', rand(10,50), 1)
return 1
return 0
attackby(obj/item/I as obj, mob/user as mob)
@@ -754,7 +753,6 @@
if(!reagents.total_volume)
user << "\red [src] is empty."
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
user << "\red you can't add anymore to [target]."
return
@@ -782,23 +780,26 @@
return 0
if(istype(M, /mob/living/carbon/human))
if(M == user) //If you're eating it yourself.
if (M.nutrition <= 50)
var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
if (fullness <= 50)
M << "\red You hungrily chew out a piece of [src] and gobble it!"
if (M.nutrition > 50 && M.nutrition <= 150)
if (fullness > 50 && fullness <= 150)
M << "\blue You hungrily begin to eat [src]."
if (M.nutrition > 150 && M.nutrition <= 350)
if (fullness > 150 && fullness <= 350)
M << "\blue You take a bite of [src]."
if (M.nutrition > 350 && M.nutrition <= 550)
if (fullness > 350 && fullness <= 550)
M << "\blue You unwillingly chew a bit of [src]."
if (M.nutrition > (550 * (1 + M.overeatduration / 1000))) // The more he eats - the more he can eat
if (fullness > (550 * (1 + M.overeatduration / 1000))) // The more he eats - the more he can eat
M << "\red You cannot force any more of [src] to go down your throat."
return 0
else //If you're feeding it to someone else.
for(var/mob/O in viewers(world.view, user))
if (M.nutrition <= (550 * (1 + M.overeatduration / 1000)))
var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 10)
if (fullness <= (550 * (1 + M.overeatduration / 1000)))
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] attempts to feed [M] [src].", 1)
else
O.show_message("\red [user] cannot force anymore of [src] down [M] throat.", 1)
else
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] cannot force anymore of [src] down [M]'s throat.", 1)
return 0
if(!do_mob(user, M)) return
@@ -1024,7 +1025,7 @@
amount_per_transfer_from_this = 20
flags = FPRINT | OPENCONTAINER
New()
var/datum/reagents/R = new/datum/reagents(90)
var/datum/reagents/R = new/datum/reagents(70)
reagents = R
R.my_atom = src
@@ -1051,7 +1052,6 @@
amount_per_transfer_from_this = 10
flags = FPRINT | TABLEPASS | OPENCONTAINER
/obj/item/weapon/reagent_containers/glass/dispenser/surfactant
name = "reagent glass (surfactant)"
icon_state = "liquid"
@@ -1362,7 +1362,7 @@
icon_state = "donut1"
New()
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sprinkles", 1)
if(prob(30))
src.icon_state = "donut2"