Z5 revert / compatibility,

This commit is contained in:
FalseIncarnate
2015-07-11 03:28:07 -04:00
parent 8a8011acbf
commit ec2aab62ef
7 changed files with 46 additions and 89 deletions
+18 -1
View File
@@ -15,6 +15,7 @@
var/efficiency = 0
var/list/cook_verbs = list("Cooking")
//Recipe & Item vars
var/recipe_type //Make sure to set this on the machine definition, or else you're gonna runtime on New()
var/list/datum/recipe/available_recipes // List of the recipes you can use
var/list/acceptable_items // List of the items you can put in
var/list/acceptable_reagents // List of the reagents you can put in
@@ -31,9 +32,25 @@
********************/
/obj/machinery/kitchen_machine/New()
//..() //do not need this
reagents = new/datum/reagents(100)
reagents.my_atom = src
if (!available_recipes)
available_recipes = new
acceptable_items = new
acceptable_reagents = new
for (var/type in (typesof(recipe_type)-recipe_type))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
acceptable_reagents |= reagent
if (recipe.items || recipe.fruit)
max_n_of_items = max(max_n_of_items,recipe.count_n_items())
else
qdel(recipe)
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
/*******************
* Item Adding
+13 -19
View File
@@ -5,6 +5,7 @@
icon = 'icons/obj/kitchen.dmi'
icon_state = "mw"
cook_verbs = list("Microwaving", "Reheating", "Heating")
recipe_type = /datum/recipe/microwave
off_icon = "mw"
on_icon = "mw1"
broken_icon = "mwb"
@@ -19,25 +20,6 @@
/obj/machinery/kitchen_machine/microwave/New()
..()
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/microwave)-/datum/recipe/microwave))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
qdel(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/microwave/recipe in available_recipes)
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
acceptable_reagents |= reagent
if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.count_n_items())
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/microwave(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
@@ -59,3 +41,15 @@
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
E += M.rating
efficiency = E
// The following code is present as temporary assurance for compatibility and to avoid merge conflicts for the TG mining port
// Please delete this portion once all maps are updated to use the new object path: /obj/machinery/kitchen_machine/microwave
/obj/machinery/microwave
name = "Microwave spawner"
icon = 'icons/obj/kitchen.dmi'
icon_state = "mw"
/obj/machinery/microwave/New()
new /obj/machinery/kitchen_machine/microwave(get_turf(src))
qdel(src)
+1 -19
View File
@@ -5,6 +5,7 @@
icon = 'icons/obj/cooking_machines.dmi'
icon_state = "candymaker_off"
cook_verbs = list("Wonderizing", "Scrumpdiddlyumptiousification", "Miracle-coating", "Flavorifaction")
recipe_type = /datum/recipe/candy
off_icon = "candymaker_off"
on_icon = "candymaker_on"
broken_icon = "candymaker_broke"
@@ -19,25 +20,6 @@
/obj/machinery/kitchen_machine/candy_maker/New()
..()
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/candy)-/datum/recipe/candy))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
qdel(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/candy/recipe in available_recipes)
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
acceptable_reagents |= reagent
if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.count_n_items())
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/candy_maker(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
+1 -19
View File
@@ -5,6 +5,7 @@
icon = 'icons/obj/cooking_machines.dmi'
icon_state = "grill_off"
cook_verbs = list("Grilling", "Searing", "Frying")
recipe_type = /datum/recipe/grill
off_icon = "grill_off"
on_icon = "grill_on"
broken_icon = "grill_broke"
@@ -19,25 +20,6 @@
/obj/machinery/kitchen_machine/grill/New()
..()
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/grill)-/datum/recipe/grill))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
qdel(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/grill/recipe in available_recipes)
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
acceptable_reagents |= reagent
if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.count_n_items())
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/grill(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
+1 -19
View File
@@ -5,6 +5,7 @@
icon = 'icons/obj/cooking_machines.dmi'
icon_state = "oven_off"
cook_verbs = list("Baking", "Roasting", "Broiling")
recipe_type = /datum/recipe/oven
off_icon = "oven_off"
on_icon = "oven_on"
broken_icon = "oven_broke"
@@ -19,25 +20,6 @@
/obj/machinery/kitchen_machine/oven/New()
..()
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/oven)-/datum/recipe/oven))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
qdel(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/oven/recipe in available_recipes)
for (var/item in recipe.items)
acceptable_items |= item
for (var/reagent in recipe.reagents)
acceptable_reagents |= reagent
if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.count_n_items())
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/oven(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)