mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] Add get_node
and get_node_or_nil
This commit is contained in:
parent
073f5cf03d
commit
37df9cb7d7
6 changed files with 67 additions and 2 deletions
|
@ -39,6 +39,14 @@ core.register_chatcommand("dump", {
|
|||
end,
|
||||
})
|
||||
|
||||
core.register_chatcommand("test_node", {
|
||||
func = function(param)
|
||||
core.display_chat_message(dump(core.get_node({x=0, y=0, z=0})))
|
||||
core.display_chat_message(dump(core.get_node_or_nil({x=0, y=0, z=0})))
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
core.after(2, function()
|
||||
print("[PREVIEW] loaded " .. modname .. " mod")
|
||||
end)
|
||||
|
@ -47,4 +55,4 @@ core.register_on_dignode(function(pos, node)
|
|||
print("pos:" .. dump(pos))
|
||||
print("node:" .. dump(node))
|
||||
return false
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue