diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index c43b167f23b..e12c7c2a57d 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -22,10 +22,6 @@ var/drop_direction = 0 /obj/machinery/rnd/production/Initialize(mapload) - . = ..() - - cached_designs = list() - materials = AddComponent( /datum/component/remote_materials, \ mapload, \ @@ -34,6 +30,10 @@ ) \ ) + . = ..() + + cached_designs = list() + RegisterSignal(src, COMSIG_SILO_ITEM_CONSUMED, TYPE_PROC_REF(/obj/machinery/rnd/production, silo_material_insert)) AddComponent( @@ -182,11 +182,10 @@ /obj/machinery/rnd/production/RefreshParts() . = ..() - if(materials) - var/total_storage = 0 - for(var/datum/stock_part/matter_bin/bin in component_parts) - total_storage += bin.tier * 37.5 * SHEET_MATERIAL_AMOUNT - materials.set_local_size(total_storage) + var/total_storage = 0 + for(var/datum/stock_part/matter_bin/bin in component_parts) + total_storage += bin.tier * 37.5 * SHEET_MATERIAL_AMOUNT + materials.set_local_size(total_storage) efficiency_coeff = compute_efficiency()