aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/nodedb.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index ff07df4..62405ce 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -212,6 +212,10 @@ function ndb.get_node(pos)
end
return n
end
+function ndb.get_ndef(pos)
+ local n=ndb.get_node_or_nil(pos)
+ return n and minetest.registered_nodes[n.name]
+end
function ndb.get_node_raw(pos)
local cid=ndbget(pos.x, pos.y, pos.z)
if cid then