From dfaa796fc2b9b7eda98da1d870e89e8914ce62fb Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 8 Dec 2017 13:12:21 -0500 Subject: [PATCH] Fixes certain material containers --- code/datums/components/material_container.dm | 2 +- code/game/mecha/mech_fabricator.dm | 2 +- code/modules/research/circuitprinter.dm | 5 +++++ code/modules/research/protolathe.dm | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 5e989005be..b33cee4059 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -58,7 +58,7 @@ return . = COMPONENT_NO_AFTERATTACK var/datum/callback/pc = precondition - if(pc && !pc.Invoke()) + if(pc && !pc.Invoke(user)) return var/material_amount = get_item_material_amount(I) if(!material_amount) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 11d111befc..a9029efc81 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -36,7 +36,7 @@ /obj/machinery/mecha_part_fabricator/Initialize() var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, - list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), + list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0, FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE return ..() diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 2e8c47231d..af03ebd8b6 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -27,10 +27,15 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). "Computer Parts" ) +<<<<<<< HEAD var/datum/component/material_container/materials /obj/machinery/r_n_d/circuit_imprinter/Initialize() materials = AddComponent(/datum/component/material_container, list(MAT_GLASS, MAT_GOLD, MAT_DIAMOND, MAT_METAL, MAT_BLUESPACE), +======= +/obj/machinery/rnd/circuit_imprinter/Initialize() + materials = AddComponent(/datum/component/material_container, list(MAT_GLASS, MAT_GOLD, MAT_DIAMOND, MAT_METAL, MAT_BLUESPACE), 0, +>>>>>>> 09ec914... Fixes certain material containers (#33370) FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE create_reagents(0) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index a675f1e550..11e949dca7 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -33,8 +33,13 @@ Note: Must be placed west/left of and R&D console to function. /obj/machinery/r_n_d/protolathe/Initialize() create_reagents(0) +<<<<<<< HEAD var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), +======= + materials = AddComponent(/datum/component/material_container, + list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0, +>>>>>>> 09ec914... Fixes certain material containers (#33370) FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE return ..()