Files
CHOMPStation2/code/game/machinery/blender.dm
morikou@gmail.com 34360b919f The Over 9000 Food + Misc Update:
* Private meeting room attached to cafe!
* Starkist was somehow set to 0 in the vending machine. Fixed.
* Sleepy pen has been modified, it now puts people to sleep *near* instantly but only once. Cost increased slightly. Holds a signficantly lower amount of reagents. Might have to tone down the amount based on playtesting.
* Changed/removed some station radios that weren't loading properly (station radio frequencies cannot be set lower then 144.1 by default, FYI).
* Sodium now available from Chem Dispenser.
* New Condiment: Olive Oil (Graphic By Thedoorman). A bottle of it added to the kitchen (use wisely, there's only one).
* Minor food reagent tweaks. Now drinking too much soda will make you fat as well.
* New Device: Blender. It turns food items into reagents (Soybeans => Soy Milk, Berries => Berry Juice, Most grown items => Nutriment + Whatever, etc.) and acts as a container. Just stick the food items in, and select the "blend" option from the right-click menu.
* New Reagents: Universal Enzyme (Used in food production, a single bottle of it is in the kitchen), Soy Milk (Used in cooking, 

can be made from a blender or obtained from a carton in the food locker), Berry Juice (used to make wine and jelly donuts), Chloral Hydrate (a powerful sedative, treat it with anti-toxin. Won't always wake instantly but you up but you'll wake up faster)
* New food/drink items: Tofu
* New Reactions: Create Tofu (10 soy milk + 2 universal enzyme), Create Wine (5 Berry Juice + 2 Universal Enzyme), Create Moonshine (5 nutriment + 2 universal enzyme), Create Cheese Wheel (40 milk + 2 universal enzyme), Create Chloral Hydrate (3 chlorine + 1 water + 1 ethanol), Create Soysauce (1 soymilk + 1 sulfuric acid)
* Condiment containers now transfer 1 unit rather then 2. Beaker added to kitchen (to aid in mixing).
* Condiment bottles now work similarly to drinking glasses: They change based on their contents. A box of blank/empty ones can be found in the kitchen backroom and more can be ordered from the QM.
* Processor no longer produces hotsauce, coldsauce, or soysauce. Use a blender to make them instead. Because of this change, it now takes multiples of a particular item to fill a bottle. PROTIP: High potency chilis/icepeppers produce more condiment then low potency ones.
* ChemMaster added to kitchen backroom to "purify" blender mixtures, door to kitchen backroom from cafe room removed.
* New recipe: Tofu Bread (3 tofu + 3 flour + 3 cheese). Can be sliced just like meatbread.
* Microwave recipe changes: Instead adding entire containers full (or empty!) of reagents to the microwave, you instead just add a specific amount. For milk and sauces (berryjuice/ketchup/soy/hot/cold), it's 5 unit of the milk/sauce instead of 1 container. It's lenient with reagents so if you put in too much you'll be fine.
* Processor Change: No longer makes cheese wheels.
* Berry Jam replaced with berry juice in Jelly Donut recipes. Berry Jam removed entirely.

Note: Sorry if my new icons look like ass. Microwave/processor changes kind of half-assed. Intend to overhaul them next (more ROBUST!). Since a lot of kichen stuff is mess around, i'll update the wiki... soon.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@490 316c924e-a436-60f5-8080-3fe189b3f50e
2010-11-24 23:49:45 +00:00

124 lines
5.4 KiB
Plaintext

/*
This is a kitchen appliance to go along with the processor and the microwave. The Blender is for food items that are mixes or purees.
Currently, the end products of the blender are not compatable with the microwave but I hope to fix that eventually.
Summary of Blender Code: It's basically a large reagent container and, like any other container, reactions can occur in it. However,
unlike a normal container, if you stick certain kinds of "blendable" items (ie. many food products), it'll convert the food item from
an object (which you can pick up and eat) into a reagent (which you can pour and drink). Containers with reagents in it can be poured
directly into the blender. Other food items will be converted into reagents by the blender. When deciding whether should be made with
the blender or the processor: Processor items are solid objects and Blender results are reagents.
*/
/obj/machinery/blender
name = "Blender"
desc = "A kitchen appliance used to blend stuff."
icon = 'kitchen.dmi'
icon_state = "blender_e"
density = 1
anchored = 1
flags = OPENCONTAINER //So that you can pour stuff into it.
var/processing = 0 //This turns on (1) while it is processing so you don't accidentally get multiples from the same item.
var/container = 1 //Is there a jug attached? Could have been done with a for loop but it's less code this way.
New()
var/datum/reagents/R = new/datum/reagents(100) //Its large since you only get one.
reagents = R
R.my_atom = src
src.contents += new /obj/item/weapon/reagent_containers/glass/blender_jug(src)
src.container = "/obj/item/weapon/reagent_containers/glass/blender_jug" //Loads a jug into the blender.
on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
proc
update_icon() //Changes the icon depending on how full it is and whether it has the jug attached.
if(src.container)
switch(src.reagents.total_volume)
if(0)
src.icon_state = "blender_e" //Empty
if(1 to 75)
src.icon_state = "blender_h" //Some but not full
if(76 to 100)
src.icon_state = "blender_f" //Mostly full.
else
src.icon_state = "blender_d" //No jug. Should be redundant but just in case.
return
/obj/machinery/blender/attackby(var/obj/item/O as obj, var/mob/user as mob) //Attack it with an object.
if(src.contents.len >= 10 || src.reagents.total_volume >= 80) //Too full. Max 10 items or 80 units of reagent
user << "Too many items are already in the blending chamber."
else if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug) && src.container == 0) //Load jug.
O.reagents.trans_to(src, O.reagents.total_volume)
del(O)
src.contents += new /obj/item/weapon/reagent_containers/glass/blender_jug(src)
//user.drop_item()
//O.loc = src
src.container = 1
src.flags = OPENCONTAINER
src.update_icon()
else if(src.container == 0) //No jug to load in to.
user << "There is no container to put [O] in to!"
else
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //Will only blend food items. Add others in this else clause.
user.drop_item()
O.loc = src
else
user << "That probably won't blend."
return 0
/obj/machinery/blender/verb/blend() //Blend shit. Note: In the actual blending loop, make sure it can't include the jug.
set src in oview(1) // Otherwise, it'll try to blend it too.
if(src.processing)
usr << "The blender is in the process of blending."
else if(!src.container)
usr << "The blender doesn't have an attached container!"
else
playsound(src.loc, 'blender.ogg', 50, 1)
src.processing = 1
usr << "You turn on the blender."
for(var/obj/O in src.contents)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/berries))
src.reagents.add_reagent("berryjuice", 5)
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans))
src.reagents.add_reagent("soymilk", 5)
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/tomato))
src.reagents.add_reagent("ketchup", 5)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //This is intentionally not an "else if"
O.reagents.trans_to(src, O.reagents.total_volume) //Think of it as the "pulp" leftover.
del(O)
src.processing = 0
usr << "The contents of the blender have been blended."
return
/obj/machinery/blender/verb/detach() //Transfers the contents of the Blender to the Blender Jug and then ejects the jug.
set src in oview(1)
if(src.processing)
usr << "The blender is in the process of blending."
else if(!src.container)
usr << "There is nothing to detach!"
else
for(var/obj/O in src.contents) //Searches through the contents for the jug.
if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug))
O.loc = get_turf(src)
src.reagents.trans_to(O, src.reagents.total_volume)
O = null
src.flags = null
src.icon_state = "blender_d"
usr << "You detatch the blending jug."
src.container = 0
return
/obj/machinery/blender/verb/eject() //Ejects the non-reagent contents of the blender besides the jug.
set src in oview(1)
if(src.processing)
usr << "The blender is in the process of blending."
else if(!src.container)
usr << "There is nothing to eject!"
else
for(var/obj/O in src.contents)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks))
O.loc = get_turf(src)
O = null
return