1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[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
This commit is contained in:
Loïc Blot 2017-03-17 07:48:29 +01:00 committed by GitHub
parent b52f3005c3
commit 0891975ad6
13 changed files with 67 additions and 25 deletions

View file

@ -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)