diff options
author | HybridDog <3192173+HybridDog@users.noreply.github.com> | 2020-10-06 20:49:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 20:49:46 +0200 |
commit | 2f4037752b023f87ca1f8859a8dce4f833353967 (patch) | |
tree | 5c52b01857c8c46d709d43d1bbc194a3805acded /src/script/lua_api/l_env.h | |
parent | e80fc22dd996e5b0efd8c4f67700c0920e323e46 (diff) | |
download | minetest-2f4037752b023f87ca1f8859a8dce4f833353967.tar.gz minetest-2f4037752b023f87ca1f8859a8dce4f833353967.tar.bz2 minetest-2f4037752b023f87ca1f8859a8dce4f833353967.zip |
Add minetest.get_artificial_light and minetest.get_natural_light (#5680)
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'src/script/lua_api/l_env.h')
-rw-r--r-- | src/script/lua_api/l_env.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index 07d4d2438..7f212b5fc 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -56,6 +56,11 @@ private: // timeofday: nil = current time, 0 = night, 0.5 = day static int l_get_node_light(lua_State *L); + // get_natural_light(pos, timeofday) + // pos = {x=num, y=num, z=num} + // timeofday: nil = current time, 0 = night, 0.5 = day + static int l_get_natural_light(lua_State *L); + // place_node(pos, node) // pos = {x=num, y=num, z=num} static int l_place_node(lua_State *L); |