Adds Sticks of Butter, Mayonnaise, and Mix function to grinder (#896)

This commit is contained in:
CitadelStationBot
2017-05-10 18:16:48 -05:00
committed by kevinz000
parent 4e51020ec1
commit 4a818bee1f
6 changed files with 66 additions and 9 deletions

View File

@@ -23,7 +23,8 @@
"sodiumchloride" = list("saltshakersmall", "salt shaker", "Salt. From space oceans, presumably"), "sodiumchloride" = list("saltshakersmall", "salt shaker", "Salt. From space oceans, presumably"),
"blackpepper" = list("peppermillsmall", "pepper mill", "Often used to flavor food or make people sneeze"), "blackpepper" = list("peppermillsmall", "pepper mill", "Often used to flavor food or make people sneeze"),
"cornoil" = list("oliveoil", "corn oil bottle", "A delicious oil used in cooking. Made from corn"), "cornoil" = list("oliveoil", "corn oil bottle", "A delicious oil used in cooking. Made from corn"),
"sugar" = list("emptycondiment", "sugar bottle", "Tasty spacey sugar!")) "sugar" = list("emptycondiment", "sugar bottle", "Tasty spacey sugar!"),
"mayonnaise" = list("mayonnaise", "mayonnaise jar", "An oily condiment made from egg yolks."))
var/originalname = "condiment" //Can't use initial(name) for this. This stores the name set by condimasters. var/originalname = "condiment" //Can't use initial(name) for this. This stores the name set by condimasters.
/obj/item/weapon/reagent_containers/food/condiment/attack(mob/M, mob/user, def_zone) /obj/item/weapon/reagent_containers/food/condiment/attack(mob/M, mob/user, def_zone)
@@ -207,6 +208,13 @@
list_reagents = list("soysauce" = 50) list_reagents = list("soysauce" = 50)
possible_states = list() possible_states = list()
/obj/item/weapon/reagent_containers/food/condiment/mayonnaise
name = "mayonnaise"
desc = "An oily condiment made from egg yolks."
icon_state = "mayonnaise"
list_reagents = list("mayonnaise" = 50)
possible_states = list()
//Food packs. To easily apply deadly toxi... delicious sauces to your food! //Food packs. To easily apply deadly toxi... delicious sauces to your food!

View File

@@ -468,3 +468,11 @@
list_reagents = list("nutriment" = 3, "vitamin" = 2, "sodiumchloride" = 5) list_reagents = list("nutriment" = 3, "vitamin" = 2, "sodiumchloride" = 5)
bonus_reagents = list("sodiumchloride" = 10) bonus_reagents = list("sodiumchloride" = 10)
tastes = list("bran" = 4, "raisins" = 3, "salt" = 1) tastes = list("bran" = 4, "raisins" = 3, "salt" = 1)
/obj/item/weapon/reagent_containers/food/snacks/butter
name = "stick of butter"
desc = "A stick of delicious, golden, fatty goodness."
icon_state = "butter"
list_reagents = list("nutriment" = 5)
filling_color = "#FFD700"
tastes = list("butter" = 1)

View File

@@ -10,7 +10,7 @@
active_power_usage = 100 active_power_usage = 100
pass_flags = PASSTABLE pass_flags = PASSTABLE
resistance_flags = ACID_PROOF resistance_flags = ACID_PROOF
var/operating = 0 var/operating = FALSE
var/obj/item/weapon/reagent_containers/beaker = null var/obj/item/weapon/reagent_containers/beaker = null
var/limit = 10 var/limit = 10
var/list/blend_items = list ( var/list/blend_items = list (
@@ -220,9 +220,12 @@
[processing_chamber]<br> [processing_chamber]<br>
[beaker_contents]<hr> [beaker_contents]<hr>
"} "}
if (is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN))) if (is_beaker_ready)
if(!is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
dat += "<A href='?src=\ref[src];action=grind'>Grind the reagents</a><BR>" dat += "<A href='?src=\ref[src];action=grind'>Grind the reagents</a><BR>"
dat += "<A href='?src=\ref[src];action=juice'>Juice the reagents</a><BR><BR>" dat += "<A href='?src=\ref[src];action=juice'>Juice the reagents</a><BR><BR>"
else if (beaker.reagents.total_volume)
dat += "<A href='?src=\ref[src];action=mix'>Mix the reagents</a><BR><BR>"
if(holdingitems && holdingitems.len > 0) if(holdingitems && holdingitems.len > 0)
dat += "<A href='?src=\ref[src];action=eject'>Eject the reagents</a><BR>" dat += "<A href='?src=\ref[src];action=eject'>Eject the reagents</a><BR>"
if (beaker) if (beaker)
@@ -248,6 +251,8 @@
grind() grind()
if("juice") if("juice")
juice() juice()
if("mix")
mix()
if("eject") if("eject")
eject() eject()
if ("detach") if ("detach")
@@ -327,11 +332,11 @@
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1) playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
var/offset = prob(50) ? -2 : 2 var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = 1 operating = TRUE
updateUsrDialog() updateUsrDialog()
spawn(50) spawn(50)
pixel_x = initial(pixel_x) //return to its spot after shaking pixel_x = initial(pixel_x) //return to its spot after shaking
operating = 0 operating = FALSE
updateUsrDialog() updateUsrDialog()
//Snacks //Snacks
@@ -365,11 +370,11 @@
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
var/offset = prob(50) ? -2 : 2 var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = 1 operating = TRUE
updateUsrDialog() updateUsrDialog()
spawn(60) spawn(60)
pixel_x = initial(pixel_x) //return to its spot after shaking pixel_x = initial(pixel_x) //return to its spot after shaking
operating = 0 operating = FALSE
updateUsrDialog() updateUsrDialog()
//Snacks and Plants //Snacks and Plants
@@ -467,3 +472,33 @@
break break
beaker.reagents.add_reagent(r_id, min(O.reagent_contents[r_id], space)) beaker.reagents.add_reagent(r_id, min(O.reagent_contents[r_id], space))
remove_object(O) remove_object(O)
/obj/machinery/reagentgrinder/proc/mix()
//For butter and other things that would change upon shaking or mixing
power_change()
if(stat & (NOPOWER|BROKEN))
return
if (!beaker)
return
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = TRUE
updateUsrDialog()
addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50)
/obj/machinery/reagentgrinder/proc/mix_complete()
pixel_x = initial(pixel_x) //return to its spot after shaking
operating = FALSE
updateUsrDialog()
if (beaker.reagents.total_volume)
//Recipe to make Butter
while(beaker.reagents.get_reagent_amount("milk") >= 15)
beaker.reagents.remove_reagent("milk", 15)
new /obj/item/weapon/reagent_containers/food/snacks/butter(src.loc)
//Recipe to make Mayonnaise
if (beaker.reagents.has_reagent("eggyolk"))
var/amount = beaker.reagents.get_reagent_amount("eggyolk")
beaker.reagents.remove_reagent("eggyolk", amount)
beaker.reagents.add_reagent("mayonnaise", amount)

View File

@@ -527,6 +527,12 @@
M.heal_bodypart_damage(3,1) M.heal_bodypart_damage(3,1)
..() ..()
/datum/reagent/consumable/mayonnaise
name = "Mayonnaise"
id = "mayonnaise"
description = "An white and oily mixture of mixed egg yolks."
color = "#DFDFDF"
taste_description = "mayonnaise"
////Lavaland Flora Reagents//// ////Lavaland Flora Reagents////

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB