aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.h
AgeCommit message (Collapse)Author
2021-06-20Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)sfence
This check can be used by ABM to reduce CPU usage.
2021-05-30Add core.compare_block_status function (#11247)SmallJoker
Makes it possible to check the status of the mapblock in a future-extensible way.
2020-12-29Add minetest.get_objects_in_area (#10668)Elias Fleckenstein
2020-10-06Add minetest.get_artificial_light and minetest.get_natural_light (#5680)HybridDog
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>
2020-07-14Implement grouped mode for find_nodes_in_area (#9888)sfan5
plus general improvements to find_node_* functions
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2020-02-23Move core.get_connected_players() implementation to C++sfan5
Keeping the ObjectRefs around in a table isn't ideal and this allows removing the somewhat nonsensical is_player_connected() added in 86ef7147.
2018-12-31Add minetest.load_area (#8023)HybridDog
2018-01-30Add minetest.bulk_set_node call + optimize Environment::set_node call (#6958)Loïc Blot
* Add minetest.bulk_set_node call + experimental mod unittest * Optimize set_node function to prevent triple lookup on contentfeatures Do only one lookup for old, and try to merge old and new lookup if node is same than previous node * Add benchmark function + optimize vector population to have real results
2017-12-26Line_of_sight: Improve using VoxelLineIteratorDániel Juhász
This commit rewrites line_of_sight with VoxelLineIterator. Stepsize is no longer needed, the results will be always accurate.
2017-09-12Make INodeDefManager::getIds return a vector, not a setKahrl
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-07-07Expose getPointedThing to LuaDániel Juhász
This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
2017-05-25Enhance ABM performance a little bit by removing two std::set copy (#5815)Loïc Blot
* Enhance ABM performance a little bit by removing two std::set copy * ActiveBlockModifier::getTriggerContents now returns a const ref * ActiveBlockModifier::getRequiredNeighbors now returns a const ref * ActiveBlockModifier::getRequiredNeighbors is now purely virtual * Little code style fix
2017-05-04Add option to also check the center to `find_node_near` (#5255)red-001
* Add option to also check the center to `find_node_near`
2017-04-20Light update for map blocksDániel Juhász
This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light.
2017-03-17[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)Loïc Blot
* [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
2017-03-13[CSM] Client side moddingLoic Blot
* rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
2017-01-08Move ServerEnvironment to dedicated cpp/header filesLoic Blot
* also cleanup some unneeded inclusions
2016-03-09Add consistent monotonic day counter - get_day_count()Auke Kok
I've written several experimental bits of code that revolve around the need for a consistent calendar, but implementing one is extremely hard in mods due to time changes and mods overriding core.get_timeofday(), which will conflict. The second part of the problem is that doing this from a mod requires constant maintenance of a settings file. An implementation in core is trivial, however, and solves all of these problems at virtually no cost: No extra branches in server steps, and a single branch when minetest.set_time_of_day(), which is entirely reasonable. We store the day_count value in env_meta.txt. The use case is obvious: This change allows mods to create an actual virtual calendar, or properly account for seasonal changes, etc.. We add a "/days" chatcommand that displays the current day count. No permissions are needed. It can only retrieve the day count, not modify it.
2016-03-07Add minetest.register_lbm() to run code on block load onlyest31
2016-02-11Add '/clearobjects quick'Kahrl
2015-11-02Add callback parameter for core.emerge_area()kwolekr
2015-10-26SAPI: Move core.get_us_time() to Util modulekwolekr
2015-10-18ABMs: Make catch-up behaviour optionalparamat
Default is true for backwards compatibility Update lua_api.txt
2015-09-23Add /emergeblocks command and core.emerge_area() Lua APIkwolekr
2015-05-05Add core.find_nodes_with_meta() script APIkwolekr
2015-02-27Change find_surface_nodes_in_area to find_nodes_in_area_under_airCraig Robbins
2015-02-27Add find_surface_nodes_in_area LUA call which permit to only get the nodes ↵Loic Blot
which touch air. This permit to massively improve performance for mods like plantlife
2015-01-15Add ability to delete MapBlocks from mapkwolekr
Also add a Lua API and chatcommand for this
2014-08-19Mod profiling supportsapier
Config settings: profiling = true/false (gather statistics) detailed_profiling = true/false (break mod times to callbacks) Chat commands: save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
2014-05-08Use "core" namespace internallyShadowNinja
2014-04-18Remove liquid_finite and weatherproller
2014-01-11Add forceloadingNovatux
2013-11-30Add minetest.swap_nodeNovatux
2013-09-08Add minetest.get_gametime() API function, that returns the number of seconds ↵Novatux
since the world was created.
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-07-28Better snow fall, finite liquid transform, leveled nodes apiproller
2013-07-27Weather supportproller
2013-06-27Add Lua on_mapgen_init callback, and minetest.set_mapgen_params APIkwolekr
2013-06-27Add minetest.get_mapgen_object to APIkwolekr
2013-06-27Add LuaVoxelManipkwolekr
2013-05-25Move scriptapi to separate folder (by sapier)sapier
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)