Merge pull request #68 from Thomas--S/repair-nodenumber

Allow to repair node number
This commit is contained in:
Joachim Stolberg 2021-10-12 19:40:24 +02:00 committed by GitHub
commit b643482c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,6 +253,14 @@ function techage.remove_node(pos, oldnode, oldmetadata)
end
end
-- Repairs the node number after it was erased by `backend.delete_invalid_entries`
function techage.repair_number(pos)
local number = techage.get_node_number(pos)
if number then
backend.set_nodepos(number, pos)
end
end
-------------------------------------------------------------------
-- Node register function