diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 4c820d26857..fae97ee9d5b 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -386,6 +386,16 @@ to destroy them and players will be able to make replacements. /obj/item/stack/cable_coil = 5, /obj/item/weapon/stock_parts/console_screen = 1) +/obj/item/weapon/circuitboard/deepfryer + name = "circuit board (Deep Fryer)" + build_path = /obj/machinery/cooker/deepfryer + board_type = "machine" + origin_tech = "programming=2" + frame_desc = "Requires 2 Micro Lasers and 5 pieces of cable." + req_components = list( + /obj/item/weapon/stock_parts/micro_laser = 2, + /obj/item/stack/cable_coil = 5) + /obj/item/weapon/circuitboard/gibber name = "circuit board (Gibber)" build_path = /obj/machinery/gibber diff --git a/code/modules/food/cooker.dm b/code/modules/food/cooker.dm index 40e04817209..6d4bdd3cd99 100644 --- a/code/modules/food/cooker.dm +++ b/code/modules/food/cooker.dm @@ -9,12 +9,14 @@ var/on = 0 var/onicon = null var/officon = null + var/openicon = null var/thiscooktype = null var/burns = 0 // whether a machine burns something - if it does, you probably want to add the cooktype to /snacks/badrecipe var/firechance = 0 var/cooktime = 0 var/foodcolor = null var/has_specials = 0 //Set to 1 if the machine has specials to check, otherwise leave it at 0 + var/upgradeable = 0 //Set to 1 if the machine supports upgrades / deconstruction, or else it will ignore stuff like screwdrivers and parts exchangers // checks if the snack has been cooked in a certain way /obj/machinery/cooker/proc/checkCooked(obj/item/weapon/reagent_containers/food/snacks/D) @@ -91,8 +93,23 @@ return type /obj/machinery/cooker/attackby(obj/item/I, mob/user, params) + if(upgradeable) + //Not all cooker types currently support build/upgrade stuff, so not all of it will work well with this + //Until we decide whether or not we want to bring back the cereal maker or old grill/oven in some form, this initial check will have to suffice + if(isscrewdriver(I)) + default_deconstruction_screwdriver(user, openicon, officon, I) + return + if(iscrowbar(I)) + default_deconstruction_crowbar(I) + return + if(istype(I, /obj/item/weapon/storage/part_replacer)) + exchange_parts(user, I) + return if(stat & (NOPOWER|BROKEN)) return + if(panel_open) + to_chat(user, "Close the panel first!") + return if (!checkValid(I, user)) return if(!burns) diff --git a/code/modules/food/deep_fryer.dm b/code/modules/food/deep_fryer.dm index 96e5fb94c57..07459f6f8f5 100644 --- a/code/modules/food/deep_fryer.dm +++ b/code/modules/food/deep_fryer.dm @@ -10,8 +10,34 @@ foodcolor = "#FFAD33" officon = "fryer_off" onicon = "fryer_on" + openicon = "fryer_open" has_specials = 1 + upgradeable = 1 +/obj/machinery/cooker/deepfryer/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/deepfryer(null) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(null) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(null) + component_parts += new /obj/item/stack/cable_coil(null, 5) + RefreshParts() + +/obj/machinery/cooker/deepfryer/upgraded/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/deepfryer(null) + component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null) + component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null) + component_parts += new /obj/item/stack/cable_coil(null, 5) + RefreshParts() + +/obj/machinery/cooker/deepfryer/RefreshParts() + var/E = 0 + for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts) + E += L.rating + E -= 2 //Standard parts is 0 (1+1-2), Tier 4 parts is 6 (4+4-2) + cooktime = (200 - (E * 20)) //Effectively each laser improves cooktime by 20 per rating beyond the first (200 base, 80 max upgrade) /obj/machinery/cooker/deepfryer/gettype() var/obj/item/weapon/reagent_containers/food/snacks/deepfryholder/type = new(get_turf(src)) diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 385969c3f3f..1938b08dc20 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -432,6 +432,16 @@ build_path = /obj/item/weapon/circuitboard/candy_maker category = list("Misc. Machinery") +/datum/design/deepfryer + name = "Machine Board (Deep Fryer)" + desc = "The circuit board for a Deep Fryer." + id = "deepfryer" + req_tech = list("programming" = 2) + build_type = IMPRINTER + materials = list(MAT_GLASS = 1000, "sacid" = 20) + build_path = /obj/item/weapon/circuitboard/deepfryer + category = list("Misc. Machinery") + /datum/design/orion_trail name = "Machine Board (Orion Trail Arcade Machine)" desc = "Allows for the construction of circuit boards used to build a new Orion Trail machine." diff --git a/icons/obj/cooking_machines.dmi b/icons/obj/cooking_machines.dmi index 10fee80e60d..9b3031ed5f8 100644 Binary files a/icons/obj/cooking_machines.dmi and b/icons/obj/cooking_machines.dmi differ