mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user