mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Fixes code for the cookie dough
Less code, more convenient. Also now you can cut a chocolate bar into chocolate crumbles.
This commit is contained in:
@@ -132,32 +132,32 @@
|
||||
///cookies by Ume
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cookiedough
|
||||
var/flat = FALSE
|
||||
name = "cookie dough"
|
||||
icon = 'icons/obj/food/food_ingredients.dmi'
|
||||
desc = "The base for tasty cookies."
|
||||
icon_state = "cookiedough"
|
||||
list_reagents = list("nutriment" = 5, "sugar" = 5)
|
||||
|
||||
// Dough + rolling pin = flat cookie dough
|
||||
/obj/item/reagent_containers/food/snacks/cookiedough/update_icon()
|
||||
if(flat)
|
||||
icon_state = "cookiedough_flat"
|
||||
name = "flat cookie dough"
|
||||
else
|
||||
icon_state = "cookiedough"
|
||||
|
||||
|
||||
|
||||
// Dough + rolling pin = flat cookie dough // Flat dough + circular cutter = unbaked cookies
|
||||
/obj/item/reagent_containers/food/snacks/cookiedough/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/kitchen/rollingpin))
|
||||
if(istype(I, /obj/item/kitchen/rollingpin) && !flat)
|
||||
if(isturf(loc))
|
||||
new /obj/item/reagent_containers/food/snacks/cookiedough_flat(loc)
|
||||
to_chat(user, "<span class='notice'>You flatten [src].</span>")
|
||||
qdel(src)
|
||||
flat = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need to put [src] on a surface to roll it out!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cookiedough_flat
|
||||
name = "flat cookie dough"
|
||||
desc = "The base for tasty cookies."
|
||||
icon_state = "cookiedough_flat"
|
||||
list_reagents = list("nutriment" = 5, "sugar" = 5)
|
||||
|
||||
//Flat cookie dough + circular cutter = Raw cookies
|
||||
/obj/item/reagent_containers/food/snacks/cookiedough_flat/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/kitchen/cutter))
|
||||
else if (istype(I, /obj/item/kitchen/cutter) && flat)
|
||||
if(isturf(loc))
|
||||
new /obj/item/reagent_containers/food/snacks/rawcookies(loc)
|
||||
to_chat(user, "<span class='notice'>You cut [src] into cookies.</span>")
|
||||
@@ -167,12 +167,33 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/rawcookies
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/rawcookies/
|
||||
name = "raw cookies"
|
||||
desc = "Ready for oven!"
|
||||
icon = 'icons/obj/food/food_ingredients.dmi'
|
||||
icon_state = "unbaked_cookies"
|
||||
list_reagents = list("nutriment" = 5, "sugar" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/rawcookies/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers/food/snacks/choc_pile))
|
||||
if(isturf(loc))
|
||||
new /obj/item/reagent_containers/food/snacks/rawcookies/chocochips(loc)
|
||||
to_chat(user, "<span class='notice'>You sprinkle [I] all over the cookies.</span>")
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need to put [src] on a surface to add this</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/rawcookies/chocochips
|
||||
name = "raw cookies"
|
||||
desc = "Ready for oven! They have little pieces of chocolate all over them"
|
||||
icon = 'icons/obj/food/food_ingredients.dmi'
|
||||
icon_state = "unbaked_cookies_choco"
|
||||
list_reagents = list("nutriment" = 5, "sugar" = 5, "chocolate" = 5)
|
||||
|
||||
//////////////////////
|
||||
// Chocolate //
|
||||
//////////////////////
|
||||
@@ -184,6 +205,19 @@
|
||||
filling_color = "#7D5F46"
|
||||
list_reagents = list("nutriment" = 2, "sugar" = 2, "cocoa" = 2)
|
||||
|
||||
///Chocolate crumbles/pile
|
||||
/obj/item/reagent_containers/food/snacks/chocolatebar/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/kitchen/knife))
|
||||
if(isturf(loc))
|
||||
new /obj/item/reagent_containers/food/snacks/choc_pile(loc)
|
||||
to_chat(user, "<span class='notice'>You cut [src] into little crumbles.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need to put [src] on a surface to cut it out!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/choc_pile //for reagent chocolate being spilled on turfs
|
||||
name = "pile of chocolate"
|
||||
desc = "A pile of pure chocolate pieces."
|
||||
|
||||
Reference in New Issue
Block a user