aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
AgeCommit message (Collapse)Author
2022-12-24Store `MapEditEvent` blocks in a vector (#13071)Jude Melton-Houghton
2022-12-04Expose dtime_s to LBM handlersfan5
2022-10-18Implement vector and node conversion in Lua (#12609)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-13Speed up find_nodes_in_area (#12845)Jude Melton-Houghton
2022-10-09Optimize lighting calculation (#12797)Jude Melton-Houghton
2022-10-04Consolidate API object code (#12728)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-06-26Fix two memleak reports from Coverity (#12466)JosiahWI
2022-06-15Fix entity related bugssfan5
* Make minetest.add_entity() binary-safe * Fix on_death pushing dummy ObjectRef instead of nil
2022-04-08Spacing fixesShadowNinja
2022-04-07Disentangle map implementations (#12148)Jude Melton-Houghton
Fixes violation of Liskov substitution principle Fixes #12144
2021-11-26Fix find_nodes_in_area misbehaving with out-of-map coordinates (#11770)sfan5
This ensures that no overflows (side-effects) happen within the find_nodes_in_area function by limiting coordinates like done in the map generation code.
2021-10-25Fix item duplication if player dies during interact callback (alternative) ↵sfan5
(#11662)
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.
2021-05-30script: Replace calls to depreated luaL_openlibsfan5
2020-12-29Add minetest.get_objects_in_area (#10668)Elias Fleckenstein
2020-10-13Fix float argument check in minetest.set_timeofday() (#10483)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
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-09-16Clean up server-side translations, remove global variable (#10075)rubenwardy
2020-07-14Implement grouped mode for find_nodes_in_area (#9888)sfan5
plus general improvements to find_node_* functions
2020-05-19Rework functionality of leveled nodes (#9852)Wuzzy
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-14CSM: Bugfixes to camera:get_pos() and camera:get_fov()sfan5
closes #9857
2020-04-27script: Fix add_entity returning unusable ref if object deleted in on_activatesfan5
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2020-04-16Optimize get_objects_inside_radius calls (#9671)Loïc Blot
* Optimize getObjectsInsideRadius calls our previous implementation calls the ActiveObjectMgr to return ids and then lookup those ids in the same map and test each object Instead now we call the global map to return the pointers directly and we ask filtering when building the list using lamba. This drop double looping over ranges of active objects (and then filtered one) and drop x lookups on the map regarding the first call results
2020-04-14scriptapi: Some small optimizations to value pushing (#9669)sfan5
2020-04-11Reduce ServerEnvironment propagation (#9642)Loïc Blot
ServerEnvironment is a huge class with many accessors. In various places it's not needed Remove it to reduce the ServerEnvironment view. Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing Pathfinder is now tied to a generic map, not a ServerMap, it can be ported to client
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2020-04-11scriptapi: Sort out ServerEnvironment / Environment distinction properlysfan5
The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
2020-03-10minetest,get_connected_players: Return empty table at load time (#9493)sfan5
2020-03-05Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid ↵Wuzzy
nodes (#9339) * Fix pathfinder fail when startpos is over air * Note down pathfinder restrictions * Implement real A* search * Pathfinder: Implement buildPath non-recursively * Update find_path documentation * Pathfinder: Check if jump path is unobstructed * Pathfinder: Fix drop check first checking upwards * Pathfinder: Return nil if source or dest are solid * Pathfinder: Use priority queue for open list
2020-03-03Fix core.get_player_by_name() returning unusable ObjectRefsfan5
Followup to the previous commit.
2020-03-03Fix core.get_connected_players() returning unusable ObjectRefssfan5
This bug is only exposed by 91eef646a59575bd9ae792e257bb6ad12fafc0b1 independent of the move of get_connected_players from Lua to C++. Previously, there would be a small time window where the SAO had its peer ID set to PEER_ID_INEXISTENT but the RemotePlayer was still linked to the SAO, resulting in an ObjectRef that crashed on certain function calls (#9387).
2020-02-25Fix potential problem with core.get_connected_players()sfan5
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.
2019-11-11[CSM] Expose more env functionssfan5
2019-11-11Refactor CSM restriction code a bitsfan5
This also fixes find_node_near restrictions being ineffective.
2019-11-09[CSM] Remove non-functional minetest.get_day_count()sfan5
2019-09-24Fix some reference counters (memleak) (#8981)SmallJoker
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2018-12-31Add minetest.load_area (#8023)HybridDog
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-08-16Raycast: export exact pointing location (#6304)Dániel Juhász
* Return intersection point in node coordinates. * Clarify 'intersection_point' documentation
2018-06-30Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot
* Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
2018-06-26Rename CSM flavours to restrictionsSmallJoker
& Satisfy LINT
2018-06-04Modernize lua read (part 1): C++ templating insurance (#7394)Loïc Blot
* Modernize lua read (part 1): C++ templating assurance Implement the float reader
2018-02-21Find nodes in area (under air): Raise volume limit and document itparamat
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
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.