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:
parent
b52f3005c3
commit
0891975ad6
13 changed files with 67 additions and 25 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue