aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.h
diff options
context:
space:
mode:
authorHybridDog <3192173+HybridDog@users.noreply.github.com>2020-10-06 20:49:46 +0200
committerGitHub <noreply@github.com>2020-10-06 20:49:46 +0200
commit2f4037752b023f87ca1f8859a8dce4f833353967 (patch)
tree5c52b01857c8c46d709d43d1bbc194a3805acded /src/serverenvironment.h
parente80fc22dd996e5b0efd8c4f67700c0920e323e46 (diff)
downloadminetest-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/serverenvironment.h')
-rw-r--r--src/serverenvironment.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serverenvironment.h b/src/serverenvironment.h
index af742e290..cfd5b8f3e 100644
--- a/src/serverenvironment.h
+++ b/src/serverenvironment.h
@@ -322,6 +322,9 @@ public:
bool removeNode(v3s16 p);
bool swapNode(v3s16 p, const MapNode &n);
+ // Find the daylight value at pos with a Depth First Search
+ u8 findSunlight(v3s16 pos) const;
+
// Find all active objects inside a radius around a point
void getObjectsInsideRadius(std::vector<ServerActiveObject *> &objects, const v3f &pos, float radius,
std::function<bool(ServerActiveObject *obj)> include_obj_cb)