From eea743185d92792b8a5af2ece5c7ab73198cebb9 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Fri, 31 Jul 2020 18:33:09 +0200 Subject: [PATCH] Change `after_dig_node()` callbacks to supply metadata as table (#68) Metadata was previously lost according to my testing. Now, the behaviour will be as specified in Minetest's lua_api.txt. --- class_layout.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class_layout.lua b/class_layout.lua index f0478b1..1fc0749 100644 --- a/class_layout.lua +++ b/class_layout.lua @@ -457,7 +457,7 @@ function DigtronLayout.write_layout_image(self, player) local oldpos, _ = self.old_pos_pointset:pop() while oldpos ~= nil do local old_node = minetest.get_node(oldpos) - local old_meta = minetest.get_meta(oldpos) + local old_meta = minetest.get_meta(oldpos):to_table() if not set_node_with_retry(oldpos, air_node) then minetest.log("error", "DigtronLayout.write_layout_image failed to destroy old Digtron node, aborting write.")