mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 20:32:22 +01:00
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:
parent
93573f22ee
commit
eea743185d
@ -457,7 +457,7 @@ function DigtronLayout.write_layout_image(self, player)
|
|||||||
local oldpos, _ = self.old_pos_pointset:pop()
|
local oldpos, _ = self.old_pos_pointset:pop()
|
||||||
while oldpos ~= nil do
|
while oldpos ~= nil do
|
||||||
local old_node = minetest.get_node(oldpos)
|
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
|
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.")
|
minetest.log("error", "DigtronLayout.write_layout_image failed to destroy old Digtron node, aborting write.")
|
||||||
|
Loading…
Reference in New Issue
Block a user