From 3998a763d82a2c1595983dcee96fc7b203cd6966 Mon Sep 17 00:00:00 2001 From: Aylong <69762909+AyIong@users.noreply.github.com> Date: Thu, 19 Sep 2024 05:26:15 +0300 Subject: [PATCH] Fix: Prevent Mech Fabricator output into the wall (#26790) * Fix: Prevent Mech Fabricator output into the wall * Move getting turf print on --- code/game/mecha/mech_fabricator.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 704c21fa360..fa746b28fe8 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -83,6 +83,7 @@ "Misc" ) + output_dir = dir return INITIALIZE_HINT_LATELOAD /obj/machinery/mecha_part_fabricator/LateInitialize() @@ -213,6 +214,11 @@ atom_say("Error: Insufficient power!") return + var/turf_to_print_on = get_step(src, output_dir) + if(iswallturf(turf_to_print_on)) + atom_say("Error: Output blocked by a wall!") + return + // Subtract the materials from the holder var/list/final_cost = get_design_cost(D) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)