Move Microwave recipes to their own subtype of the recipe datum.

This commit is contained in:
Atermonera
2020-01-20 21:34:57 -08:00
committed by VirgoBot
parent c877f3d265
commit f7da338790
5 changed files with 475 additions and 189 deletions

View File

@@ -12,8 +12,14 @@
var/operating = 0 // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
<<<<<<< HEAD
var/global/list/datum/recipe/available_recipes // List of the recipes you can use
=======
var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items
var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials
>>>>>>> 9027155... Merge pull request #6632 from Mechoid/TheGreatMicrowaveMigration
var/global/list/acceptable_items // List of the items you can put in
var/global/list/datum/recipe/microwave/available_recipes // List of the recipes you can use
var/global/list/acceptable_reagents // List of the reagents you can put in
var/global/max_n_of_items = 0
var/datum/looping_sound/microwave/soundloop
@@ -36,11 +42,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
for (var/type in (typesof(/datum/recipe/microwave)-/datum/recipe/microwave))
available_recipes+= new type
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/recipe in available_recipes)
for (var/datum/recipe/microwave/recipe in available_recipes)
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
@@ -254,7 +260,7 @@
abort()
return
var/datum/recipe/recipe = select_recipe(available_recipes,src)
var/datum/recipe/microwave/recipe = select_recipe(available_recipes,src)
var/obj/cooked
if (!recipe)
dirty += 1