aboutsummaryrefslogtreecommitdiff
path: root/clientmods
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-01-30 19:10:37 +0000
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commit37df9cb7d764891f29b433e80a0d5663fee1a94f (patch)
treeefed423ad2021439267eb5e1e8719fb8514ea6d7 /clientmods
parent073f5cf03d95ce1cdf04ce8a0adcaf1fc571d95f (diff)
downloadminetest-37df9cb7d764891f29b433e80a0d5663fee1a94f.tar.gz
minetest-37df9cb7d764891f29b433e80a0d5663fee1a94f.tar.bz2
minetest-37df9cb7d764891f29b433e80a0d5663fee1a94f.zip
[CSM] Add `get_node` and `get_node_or_nil`
Diffstat (limited to 'clientmods')
-rw-r--r--clientmods/preview/init.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua
index 3085eda24..91b12d810 100644
--- a/clientmods/preview/init.lua
+++ b/clientmods/preview/init.lua
@@ -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) \ No newline at end of file
+end)