[MIRROR] Ice cream revamp: Ice cream is a component and cones can hold multiple servings of ice cream now. (#4341)

* Ice cream revamp: Ice cream is a component and cones can hold multiple servings of ice cream now. (#57415)

* Ice cream rework WIP

* I'm done!

* i'll deal with my verbose engrish at a later date. I'm dead tired.

* linter aaaaaa

* Take a bite!

* FINALLY, A COMPONENT!

* ghost macro.

* Review, typos, beheading of a lame comsig.

* Typo. Now I'm self-obliged to test it again.

* It works.

* Ice cream revamp: Ice cream is a component and cones can hold multiple servings of ice cream now.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-23 14:09:23 +00:00
committed by GitHub
co-authored by Ghom
parent 0d202750aa
commit 5554f2cdd8
11 changed files with 437 additions and 182 deletions
+12
View File
@@ -29,6 +29,10 @@
tastes = list("blue cherries" = 2, "ice cream" = 2)
foodtypes = FRUIT | DAIRY | SUGAR
/obj/item/food/spacefreezy/MakeEdible()
. = ..()
AddComponent(/datum/component/ice_cream_holder)
/obj/item/food/sundae
name = "sundae"
desc = "A classic dessert."
@@ -39,6 +43,10 @@
tastes = list("ice cream" = 1, "banana" = 1)
foodtypes = FRUIT | DAIRY | SUGAR
/obj/item/food/sundae/MakeEdible()
. = ..()
AddComponent(/datum/component/ice_cream_holder, y_offset = -2, sweetener = /datum/reagent/consumable/caramel)
/obj/item/food/honkdae
name = "honkdae"
desc = "The clown's favorite dessert."
@@ -49,6 +57,10 @@
tastes = list("ice cream" = 1, "banana" = 1, "a bad joke" = 1)
foodtypes = FRUIT | DAIRY | SUGAR
/obj/item/food/honkdae/MakeEdible()
. = ..()
AddComponent(/datum/component/ice_cream_holder, y_offset = -2) //The sugar will react with the banana forming laughter. Honk!
/////////////
//SNOWCONES//
/////////////
+35
View File
@@ -857,5 +857,40 @@
w_class = WEIGHT_CLASS_TINY
venue_value = FOOD_PRICE_CHEAP // Pastry base, 3u of sugar and a single. fucking. unit. of. milk. really?
/obj/item/food/icecream
name = "waffle cone"
desc = "Delicious waffle cone, but no ice cream."
icon = 'icons/obj/kitchen.dmi'
icon_state = "icecream_cone_waffle"
food_reagents = list(/datum/reagent/consumable/nutriment = 5)
tastes = list("cream" = 2, "waffle" = 1)
bite_consumption = 4
foodtypes = DAIRY | SUGAR
max_volume = 10 //The max volumes scales up with the number of scoops of ice cream served.
/// These two variables are used by the ice cream vat. Latter is the one that shows on the UI.
var/list/ingredients = list(/datum/reagent/consumable/flour, /datum/reagent/consumable/sugar)
var/ingredients_text
/*
* Assoc list var used to prefill the cone with ice cream.
* Key is the flavour's name (use text defines; see __DEFINES/food.dm or ice_cream_holder.dm),
* assoc is the list of args that is going to be used in [flavour/add_flavour()]. Can as well be null for simple flavours.
*/
var/list/prefill_flavours
/obj/item/food/icecream/Initialize(mapload, list/prefill_flavours)
if(prefill_flavours)
src.prefill_flavours = prefill_flavours
return ..()
/obj/item/food/icecream/MakeEdible()
. = ..()
AddComponent(/datum/component/ice_cream_holder, filled_name = "ice cream", change_desc = TRUE, prefill_flavours = prefill_flavours)
/obj/item/food/icecream/chocolate
name = "chocolate cone"
desc = "Delicious chocolate cone, but no ice cream."
icon_state = "icecream_cone_chocolate"
food_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/coco = 1)
ingredients = list(/datum/reagent/consumable/flour, /datum/reagent/consumable/sugar, /datum/reagent/consumable/coco)
#undef DONUT_SPRINKLE_CHANCE
+2 -4
View File
@@ -393,10 +393,8 @@
if(DISPENSE_LOLLIPOP_MODE)
food_item = new /obj/item/food/chewable/lollipop(T)
if(DISPENSE_ICECREAM_MODE)
food_item = new /obj/item/food/icecream(T)
var/obj/item/food/icecream/I = food_item
I.add_ice_cream("vanilla")
I.desc = "Eat the ice cream."
food_item = new /obj/item/food/icecream(T, list(ICE_CREAM_VANILLA))
food_item.desc = "Eat the ice cream."
var/into_hands = FALSE
if(ismob(A))
+2 -4
View File
@@ -295,10 +295,8 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium/creamatorium/cremate(mob/user)
var/list/icecreams = new()
for(var/i_scream in get_all_contents_type(/mob/living))
var/obj/item/food/icecream/IC = new()
IC.set_cone_type("waffle")
IC.add_mob_flavor(i_scream)
for(var/mob/living/i_scream as anything in get_all_contents_type(/mob/living))
var/obj/item/food/icecream/IC = new(null, list(ICE_CREAM_MOB = list(null, i_scream.name)))
icecreams += IC
. = ..()
for(var/obj/IC in icecreams)