mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Merge pull request #3906 from eswordthecat/fix-candy
Fixed #2790, EVERYTHING IS CANDY.
This commit is contained in:
@@ -75,20 +75,23 @@ var/global/ingredientLimit = 10
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/cooking/New()
|
/obj/machinery/cooking/New()
|
||||||
if(src.foodChoices)
|
if (ticker)
|
||||||
src.foodChoices = src.getFoodChoices()
|
initialize()
|
||||||
var/list/L[src.foodChoices.len]
|
|
||||||
var/obj/item/foodPath
|
|
||||||
for(. in src.foodChoices)
|
|
||||||
foodPath = .
|
|
||||||
L[initial(foodPath.name)] = foodPath
|
|
||||||
src.foodChoices = L
|
|
||||||
if(src.cooks_in_reagents) //if we can cook in something
|
|
||||||
del(src.reagents) //get rid of that
|
|
||||||
reagents = new (cks_max_volume) //maximum volume is set by the machine var
|
|
||||||
reagents.my_atom = src
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/machinery/cooking/initialize()
|
||||||
|
if (foodChoices)
|
||||||
|
var/obj/item/food
|
||||||
|
|
||||||
|
for (var/path in getFoodChoices())
|
||||||
|
food = path
|
||||||
|
|
||||||
|
foodChoices.Add(list(initial(food.name) = path))
|
||||||
|
|
||||||
|
if (cooks_in_reagents) // if we can cook in something
|
||||||
|
create_reagents(cks_max_volume) // maximum volume is set by the machine var
|
||||||
|
|
||||||
/obj/machinery/cooking/proc/getFoodChoices()
|
/obj/machinery/cooking/proc/getFoodChoices()
|
||||||
return (typesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook)-(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook))
|
return (typesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook)-(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook))
|
||||||
|
|
||||||
@@ -223,12 +226,13 @@ var/global/ingredientLimit = 10
|
|||||||
|
|
||||||
/obj/machinery/cooking/candy/validateIngredient(var/obj/item/I)
|
/obj/machinery/cooking/candy/validateIngredient(var/obj/item/I)
|
||||||
. = ..()
|
. = ..()
|
||||||
if((. == "valid") && (!foodNesting))
|
|
||||||
for(. in src.foodChoices)
|
if ((. == "valid") && (!foodNesting))
|
||||||
if(findtext(I.name,.))
|
for (var/food in foodChoices)
|
||||||
|
if (findtext(I.name, food))
|
||||||
. = "It's already candy."
|
. = "It's already candy."
|
||||||
|
|
||||||
break
|
break
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/cooking/candy/makeFood(var/foodType)
|
/obj/machinery/cooking/candy/makeFood(var/foodType)
|
||||||
var/old_food = src.ingredient.name
|
var/old_food = src.ingredient.name
|
||||||
|
|||||||
6
html/changelogs/iconleap-candy.yml
Normal file
6
html/changelogs/iconleap-candy.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
author: iconleap
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- bugfix: Fixed everything is candy at candy machine.
|
||||||
Reference in New Issue
Block a user