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.
This commit is contained in:
Thomas--S 2020-07-31 18:33:09 +02:00 committed by GitHub
parent 93573f22ee
commit eea743185d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.")