diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
index 0f901f2412..fed4fa21ec 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
@@ -4,8 +4,9 @@
#define ICECREAM_PEACH 4
#define ICECREAM_GRAPE 5
#define ICECREAM_BLUE 6
-#define CONE_WAFFLE 7
-#define CONE_CHOC 8
+#define ICECREAM_CUSTOM 7
+#define CONE_WAFFLE 8
+#define CONE_CHOC 9
@@ -22,17 +23,18 @@
var/list/product_types = list()
var/dispense_flavour = ICECREAM_VANILLA
var/flavour_name = "vanilla"
+ var/obj/item/reagent_containers/beaker = null
var/static/list/icecream_vat_reagents = list(
- "milk" = 5,
- "flour" = 5,
- "sugar" = 5,
- "ice" = 5,
- "cocoa" = 5,
- "vanilla" = 5,
- "berryjuice" = 5,
- "singulo" = 5,
- "peachjuice" = 5,
- "grapejuice" = 5)
+ "milk" = 6,
+ "flour" = 6,
+ "sugar" = 6,
+ "ice" = 6,
+ "cocoa" = 6,
+ "vanilla" = 6,
+ "berryjuice" = 6,
+ "singulo" = 6,
+ "peachjuice" = 6,
+ "grapejuice" = 6)
/obj/machinery/icecream_vat/proc/get_ingredient_list(type)
switch(type)
@@ -40,6 +42,8 @@
return list("milk", "ice", "cocoa")
if(ICECREAM_STRAWBERRY)
return list("milk", "ice", "berryjuice")
+ if(ICECREAM_CUSTOM)
+ return list("milk", "ice")
if(ICECREAM_PEACH)
return list("milk", "ice", "peachjuice")
if(ICECREAM_GRAPE)
@@ -66,6 +70,8 @@
return "grape"
if(ICECREAM_BLUE)
return "blue"
+ if(ICECREAM_CUSTOM)
+ return "custom"
if(CONE_WAFFLE)
return "waffle"
if(CONE_CHOC)
@@ -76,7 +82,7 @@
/obj/machinery/icecream_vat/Initialize()
. = ..()
- while(product_types.len < 8)
+ while(product_types.len < 9)
product_types.Add(5)
create_reagents(100, OPENCONTAINER | NO_REACT)
for(var/reagent in icecream_vat_reagents)
@@ -87,16 +93,23 @@
var/dat
dat += "ICE CREAM
"
dat += "
Dispensing: [flavour_name] icecream "
- dat += "
Vanilla ice cream: Select Make x5 [product_types[ICECREAM_VANILLA]] scoops left. (Ingredients: milk, ice)
"
+ dat += "
Vanilla ice cream: Select Make x5 [product_types[ICECREAM_VANILLA]] scoops left. (Ingredients: milk, ice, vanilla)
"
dat += "
Strawberry ice cream: Select Make x5 [product_types[ICECREAM_STRAWBERRY]] dollops left. (Ingredients: milk, ice, berry juice)
"
dat += "
Chocolate ice cream: Select Make x5 [product_types[ICECREAM_CHOCOLATE]] dollops left. (Ingredients: milk, ice, coco powder)
"
dat += "
Peach ice cream: Select Make x5 [product_types[ICECREAM_PEACH]] dollops left. (Ingredients: milk, ice, peach juice)
"
dat += "
Grape ice cream: Select Make x5 [product_types[ICECREAM_GRAPE]] dollops left. (Ingredients: milk, ice, grape juice)
"
- dat += "
Blue ice cream: Select Make x5 [product_types[ICECREAM_BLUE]] dollops left. (Ingredients: milk, ice, singulo)
"
+ dat += "Blue ice cream: Select Make x5 [product_types[ICECREAM_BLUE]] dollops left. (Ingredients: milk, ice, singulo)
"
+ dat += "Custom ice cream: Select Make x5 [product_types[ICECREAM_CUSTOM]] dollops left. (Ingredients: milk, ice, optional flavoring)
"
dat += "
CONES
"
dat += "
Waffle cones: Dispense Make x5 [product_types[CONE_WAFFLE]] cones left. (Ingredients: flour, sugar)
"
dat += "
Chocolate cones: Dispense Make x5 [product_types[CONE_CHOC]] cones left. (Ingredients: flour, sugar, coco powder)
"
dat += "
"
+ if(beaker)
+ dat += "BEAKER CONTENT
"
+ for(var/datum/reagent/R in beaker.reagents.reagent_list)
+ dat += "[R.name]: [R.volume]u
"
+ dat += "
Refill from beaker "
+ dat += "
"
dat += "VAT CONTENT
"
for(var/datum/reagent/R in reagents.reagent_list)
dat += "[R.name]: [R.volume]"
@@ -114,36 +127,60 @@
if(product_types[dispense_flavour] > 0)
visible_message("[icon2html(src, viewers(src))] [user] scoops delicious [flavour_name] ice cream into [I].")
product_types[dispense_flavour] -= 1
+ if(beaker && beaker.reagents.total_volume)
+ I.add_ice_cream(flavour_name, beaker.reagents)
+ else
+ I.add_ice_cream(flavour_name)
I.add_ice_cream(flavour_name)
- // if(beaker)
- // beaker.reagents.trans_to(I, 10)
if(I.reagents.total_volume < 10)
I.reagents.add_reagent("sugar", 10 - I.reagents.total_volume)
+ updateDialog()
else
to_chat(user, "There is not enough ice cream left!")
else
to_chat(user, "[O] already has ice cream in it.")
return 1
+ if(istype(O, /obj/item/reagent_containers) && !(O.item_flags & ABSTRACT) && O.is_open_container())
+ . = TRUE //no afterattack
+ var/obj/item/reagent_containers/B = O
+ if(!user.transferItemToLoc(B, src))
+ return
+ replace_beaker(user, B)
+ to_chat(user, "You add [B] to [src].")
+ updateUsrDialog()
+ update_icon()
+ return
else if(O.is_drainable())
return
else
return ..()
+/obj/machinery/icecream_vat/proc/RefillFromBeaker()
+ if(!beaker || !beaker.reagents)
+ return
+ for(var/datum/reagent/R in beaker.reagents.reagent_list)
+ if(R.type in icecream_vat_reagents)
+ beaker.reagents.trans_id_to(src, R.type, R.volume)
+ say("Internalizing reagent.")
+ playsound(src, 'sound/items/drink.ogg', 25, 1)
+ return
+
/obj/machinery/icecream_vat/proc/make(mob/user, make_type, amount)
+ var/recipe_amount = amount * 3 //prevents reagent duping by requring roughly the amount of reagenst you gain back by grinding.
for(var/R in get_ingredient_list(make_type))
- if(reagents.has_reagent(R, amount))
+ if(reagents.has_reagent(R, recipe_amount))
continue
amount = 0
break
if(amount)
for(var/R in get_ingredient_list(make_type))
- reagents.remove_reagent(R, amount)
+ reagents.remove_reagent(R, recipe_amount)
product_types[make_type] += amount
var/flavour = get_flavour_name(make_type)
- if(make_type > 4)
- src.visible_message("[user] cooks up some [flavour] cones.")
+ if(make_type > 7)
+ visible_message("[user] cooks up some [flavour] cones.")
else
- src.visible_message("[user] whips up some [flavour] icecream.")
+ visible_message("[user] whips up some [flavour] icecream.")
else
to_chat(user, "You don't have the ingredients to make this!")
@@ -172,7 +209,10 @@
make(usr, C, amount)
if(href_list["disposeI"])
- reagents.del_reagent(href_list["disposeI"])
+ reagents.del_reagent(text2path(href_list["disposeI"]))
+
+ if(href_list["refill"])
+ RefillFromBeaker()
updateDialog()
@@ -189,15 +229,16 @@
desc = "Delicious waffle cone, but no ice cream."
icon = 'icons/obj/kitchen.dmi'
icon_state = "icecream_cone_waffle" //default for admin-spawned cones, href_list["cone"] should overwrite this all the time
+ list_reagents = list(/datum/reagent/consumable/nutriment = 4)
+ tastes = list("cream" = 2, "waffle" = 1)
var/ice_creamed = 0
var/cone_type
- bitesize = 3
- foodtype = DAIRY
+ bitesize = 4
+ foodtype = DAIRY | SUGAR
/obj/item/reagent_containers/food/snacks/icecream/Initialize()
. = ..()
- create_reagents(20)
- reagents.add_reagent("nutriment", 4)
+ reagents.maximum_volume = 20
/obj/item/reagent_containers/food/snacks/icecream/proc/set_cone_type(var/cone_name)
cone_type = cone_name
@@ -211,30 +252,53 @@
desc = "Delicious [cone_name] cone, but no ice cream."
-/obj/item/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour_name)
+/obj/item/reagent_containers/food/snacks/icecream/proc/add_ice_cream(flavour_name, datum/reagents/R = null)
name = "[flavour_name] icecream"
- src.add_overlay("icecream_[flavour_name]")
switch (flavour_name) // adding the actual reagents advertised in the ingredient list
if ("vanilla")
desc = "A delicious [cone_type] cone filled with vanilla ice cream. All the other ice creams take content from it."
+ reagents.add_reagent("vanilla", 3)
+ filling_color = "#ECE1C1"
if ("chocolate")
desc = "A delicious [cone_type] cone filled with chocolate ice cream. Surprisingly, made with real cocoa."
- reagents.add_reagent("cocoa", 2)
+ reagents.add_reagent("cocoa", 3)
+ filling_color = "#93673B"
if ("strawberry")
desc = "A delicious [cone_type] cone filled with strawberry ice cream. Definitely not made with real strawberries."
- reagents.add_reagent("berryjuice", 2)
+ reagents.add_reagent("berryjuice", 3)
+ filling_color = "#EFB4B4"
if ("peach")
desc = "A delicious [cone_type] cone filled with peach ice cream. Definitely made with real peaches!"
- reagents.add_reagent("peachjuice", 2)
+ reagents.add_reagent("peachjuice", 3)
+ filling_color = "#E78108"
if ("grape")
desc = "A delicious [cone_type] cone filled with grape ice cream. Surprisingly, made with real pink grape, likely not real sugarcanes used."
- reagents.add_reagent("grapejuice", 2)
+ reagents.add_reagent("grapejuice", 3)
+ filling_color = "#FF1493"
if ("blue")
desc = "A delicious [cone_type] cone filled with blue ice cream. Made with real... blue?"
- reagents.add_reagent("singulo", 2)
+ reagents.add_reagent("singulo", 3)
+ filling_color = "#ACBCED"
if ("mob")
desc = "A suspicious [cone_type] cone filled with bright red ice cream. That's probably not strawberry..."
- reagents.add_reagent("liquidgibs", 2)
+ reagents.add_reagent("liquidgibs", 3)
+ filling_color = "#EFB4B4"
+ if ("custom")
+ if(R && R.total_volume >= 4) //consumable reagents have stronger taste so higher volume will allow non-food flavourings to break through better.
+ var/mutable_appearance/flavoring = mutable_appearance(icon,"icecream_custom")
+ var/datum/reagent/master = R.get_master_reagent()
+ flavoring.color = master.color
+ filling_color = master.color
+ name = "[master.name] icecream"
+ desc = "A delicious [cone_type] cone filled with artisanal icecream. Made with real [master.name]. Ain't that something."
+ R.trans_to(src, 4)
+ add_overlay(flavoring)
+ else
+ name = "bland icecream"
+ desc = "A delicious [cone_type] cone filled with anemic, flavorless icecream.You wonder why this was ever scooped.."
+ add_overlay("icecream_custom")
+ if(flavour_name != "custom")
+ src.add_overlay("icecream_[flavour_name]")
ice_creamed = 1
/obj/item/reagent_containers/food/snacks/icecream/proc/add_mob_flavor(var/mob/M)
@@ -246,6 +310,22 @@
new /obj/item/stack/sheet/metal(loc, 4)
qdel(src)
+/obj/machinery/icecream_vat/AltClick(mob/living/user)
+ if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
+ return
+ replace_beaker(user)
+
+/obj/machinery/icecream_vat/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
+ if(beaker)
+ beaker.forceMove(drop_location())
+ if(user && Adjacent(user) && !issiliconoradminghost(user))
+ user.put_in_hands(beaker)
+ if(new_beaker)
+ beaker = new_beaker
+ else
+ beaker = null
+ updateDialog()
+ return TRUE
#undef ICECREAM_VANILLA
#undef ICECREAM_CHOCOLATE
@@ -253,5 +333,6 @@
#undef ICECREAM_PEACH
#undef ICECREAM_GRAPE
#undef ICECREAM_BLUE
+#undef ICECREAM_CUSTOM
#undef CONE_WAFFLE
#undef CONE_CHOC
diff --git a/icons/obj/kitchen.dmi b/icons/obj/kitchen.dmi
index 422554715a..e41d1fb4a1 100644
Binary files a/icons/obj/kitchen.dmi and b/icons/obj/kitchen.dmi differ