mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Buildable Deep Fryers
Deep fryers can now be built and upgraded with some minor assistance from science. - Board requires programming 2, just like the microwave and such - 2 micro lasers + 5 cables - Upgrading the lasers decreases the cook time 🆑 rscadd: Deepfryers are no longer arcane mysteries, and can be (de)constructed and upgraded. /🆑
This commit is contained in:
@@ -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, "<span class='warning'>Close the panel first!</span>")
|
||||
return
|
||||
if (!checkValid(I, user))
|
||||
return
|
||||
if(!burns)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user