diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index 4dfd4e989a..794755b02c 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -162,13 +162,16 @@ return 1 var/cost = 1 + + if(isnull(current_category)) + current_category = recipe_list[1] if(ispath(build_type, /obj/item/device/electronic_assembly)) var/obj/item/device/electronic_assembly/E = build_type cost = round( (initial(E.max_complexity) + initial(E.max_components) ) / 4) - else if(ispath(build_type, /obj/item/integrated_circuit)) - var/obj/item/integrated_circuit/IC = build_type - cost = initial(IC.w_class) else + var/obj/item/I = build_type + cost = initial(I.w_class) + if(!(locate(build_type) in recipe_list[current_category])) return if(metal - cost < 0) @@ -198,4 +201,4 @@ name = "integrated circuit printer upgrade disk - circuit cloner" desc = "Install this into your integrated circuit printer to enhance it. This one allows the printer to duplicate assemblies." icon_state = "upgrade_disk_clone" - origin_tech = list(TECH_ENGINEERING = 5, TECH_DATA = 6) \ No newline at end of file + origin_tech = list(TECH_ENGINEERING = 5, TECH_DATA = 6)