From ec7410b4e76f526fd4530420aad5230438011d29 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 19 Sep 2024 10:54:05 +0200 Subject: [PATCH] Register cut nodes instantly --- init.lua | 1 + src/workbench.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 2d3f1ec..694ebbc 100644 --- a/init.lua +++ b/init.lua @@ -21,6 +21,7 @@ local subpart = { "mailbox", "mechanisms", "rope", + -- Workbench MUST be loaded last for the default 'cut node' registrations to work "workbench", } diff --git a/src/workbench.lua b/src/workbench.lua index 82e30a1..97da8df 100644 --- a/src/workbench.lua +++ b/src/workbench.lua @@ -494,7 +494,7 @@ minetest.register_craft({ }) -- Register default cuttable blocks -minetest.register_on_mods_loaded(function() +do local cuttable_nodes = {} -- Nodes allowed to be cut: @@ -512,7 +512,7 @@ minetest.register_on_mods_loaded(function() local node = cuttable_nodes[i] workbench:register_cut(node) end -end) +end -- Special cuts for cushion block and cabinet workbench:register_special_cut("xdecor:cushion_block", { slab = "xdecor:cushion" })