From 8f255ec545c05c1da24754af206e987b06bde697 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 21 Jul 2024 20:57:03 +0200 Subject: [PATCH] Fix bug 'TA2 boiler work without requiring boiler' --- steam_engine/boiler.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/steam_engine/boiler.lua b/steam_engine/boiler.lua index ce3ea79..dbb0bf1 100644 --- a/steam_engine/boiler.lua +++ b/steam_engine/boiler.lua @@ -41,10 +41,9 @@ end local function after_place_node(pos) local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}) - if node.name == "techage:boiler1" then - local nvm = techage.get_nvm(pos) - M(pos):set_string("formspec", boiler.formspec(pos, nvm)) - Pipe:after_place_node(pos) + if node.name ~= "techage:boiler1" then + minetest.remove_node(pos) + return true end end @@ -83,6 +82,9 @@ Pipe:add_secondary_node_names({"techage:boiler2"}) techage.register_node({"techage:boiler2"}, { on_transfer = function(pos, in_dir, topic, payload) if topic == "trigger" then + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "techage:boiler1" then + return 0 + end local nvm = techage.get_nvm(pos) nvm.fire_trigger = true if not minetest.get_node_timer(pos):is_started() then