diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 3271f316df5..467b7786e08 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -207,6 +207,7 @@ if(!islist(user_data)) // Just allow to salvage the situation . = COMPONENT_ORE_SILO_ALLOW + user_data = ID_DATA(null) CRASH("Invalid data passed to check_permitted") if(user_data[SILICON_OVERRIDE] || user_data[CHAMELEON_OVERRIDE] || astype(user_data["accesses"], /list)?.Find(ACCESS_QM)) return COMPONENT_ORE_SILO_ALLOW diff --git a/code/modules/wiremod/core/component_printer.dm b/code/modules/wiremod/core/component_printer.dm index 7797d6c8b62..343f0db5e6f 100644 --- a/code/modules/wiremod/core/component_printer.dm +++ b/code/modules/wiremod/core/component_printer.dm @@ -139,6 +139,7 @@ . = ..() if (.) return + var/alist/user_data = ID_DATA(usr) switch (action) if ("print") @@ -150,7 +151,7 @@ if (!(design.build_type & COMPONENT_PRINTER)) return TRUE - if (!materials.can_use_resource(user_data = ID_DATA(usr))) + if (!materials.can_use_resource(user_data = user_data)) return TRUE if (!materials.mat_container.has_materials(design.materials, efficiency_coeff)) @@ -159,7 +160,7 @@ balloon_alert_to_viewers("printed [design.name]") - materials.use_materials(design.materials, efficiency_coeff, 1, "printed", "[design.name]") + materials.use_materials(design.materials, efficiency_coeff, 1, "printed", "[design.name]", user_data) var/atom/printed_design = new design.build_path(drop_location()) printed_design.pixel_x = printed_design.base_pixel_x + rand(-5, 5) printed_design.pixel_y = printed_design.base_pixel_y + rand(-5, 5) @@ -167,7 +168,7 @@ var/datum/material/material = locate(params["ref"]) var/amount = text2num(params["amount"]) // SAFETY: eject_sheets checks for valid mats - materials.eject_sheets(material, amount) + materials.eject_sheets(material_ref = material, eject_amount = amount, user_data = user_data) return TRUE