aboutsummaryrefslogtreecommitdiff
path: root/clientmods
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-03-17 07:48:29 +0100
committerGitHub <noreply@github.com>2017-03-17 07:48:29 +0100
commit0891975ad6c8d6d3e15b20f33b22cf5baca7eb62 (patch)
tree5e34935333741f6376b0a84fa00b3178c584d457 /clientmods
parentb52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f (diff)
downloadminetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.tar.gz
minetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.tar.bz2
minetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.zip
[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)
* [CSM] Add core.get_timeofday & core.get_day_count env calls * [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near
Diffstat (limited to 'clientmods')
-rw-r--r--clientmods/preview/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua
index bdda7fe4e..3f85d576d 100644
--- a/clientmods/preview/init.lua
+++ b/clientmods/preview/init.lua
@@ -64,6 +64,15 @@ core.after(2, function()
preview_minimap()
modstorage:set_string("current_mod", modname)
print(modstorage:get_string("current_mod"))
+
+ print("[PREVIEW] Day count: " .. core.get_day_count() ..
+ " time of day " .. core.get_timeofday())
+
+ print("[PREVIEW] Node level: " .. core.get_node_level({x=0, y=20, z=0}) ..
+ " max level " .. core.get_node_max_level({x=0, y=20, z=0}))
+
+ print("[PREVIEW] Find node near: " .. dump(core.find_node_near({x=0, y=20, z=0}, 10,
+ {"group:tree", "default:dirt", "default:stone"})))
end)
core.register_on_dignode(function(pos, node)