aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
AgeCommit message (Collapse)Author
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.
2017-11-24Clearobjects: Send progress messages to terminal using actionstreamparamat
Change default mode to 'quick' as 'full' can lock up a server for a long time.
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-09-21Set placer to nil instead of a non-functional one in item_OnPlace (#6449)DTA7
* Set placer to nil instead of a non-functional one This requires nil checks in core.rotate_node and core.rotate_and_place.
2017-09-15ServerEnv: Clean up object lifecycle handling (#6414)sfan5
* ServerEnv: Clean up object lifecycle handling
2017-09-12Make INodeDefManager::getIds return a vector, not a setKahrl
2017-08-27core.get_objects_inside_radius: Omit removed objects (#6318)you
Fixes #6294
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-08-19Code modernization: subfolders (#6283)Loïc Blot
* Code modernization: subfolders Modernize various code on subfolders client, network, script, threading, unittests, util * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Make connection.cpp readable in a pointed place + typo
2017-08-18Optimize headers (part 2) (#6272)Loïc Blot
* Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-07-18[CSM] Add flavour limits controlled by server (#5930)Loïc Blot
* [CSM] Add flavour limits controlled by server Server send flavour limits to client permitting to disable or limit some Lua calls * Add limits for reading nodedefs and itemdefs * flavour: Add lookup node limits * Merge get_node_or_nil into get_node. Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason * Add node range customization when noderange flavour is enabled (default 8 nodes) * Limit nodes range & disable chat message sending by default * Bump protocol version
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-06-19find_nodes_in_area: Extend maximal count to U32_MAX (#5277)SmallJoker
Extend documentation, limit area volume Remove u16 count limitation * Prevent integer overflow, replace minp/maxp with pos1/pos2
2017-05-06Clean up numeric.h and split FacePositionCache from itShadowNinja
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
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-25Rename Scripting API files for consistencyShadowNinja
2017-04-25Fix various points reported by cppcheck (#5656)Loïc Blot
* Fix various performance issues reported by cppcheck + code style (CI) * Make CI happy with code style on master * guiFileSelectMenu: remove useless includes * some performance fixes pointed by cppcheck * remove some useless casts * TextDest: remove unused setFormSpec function * Fix various iterator post-increment reported by cppcheck
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-13Add `get_wielded_item`red-001
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-02-04Add ItemStack key-value meta storagerubenwardy
2017-01-09Add staticdata parameter to add_entity (#5009)Rui
* Add staticdata parameter to add_entity * Add add_entity_with_staticdata to core.features
2016-10-16Emergeblocks: Fix occasional crashRogier
Modification of the emergeblocks internal state was not protected by a lock, causing a race condition. This can be reproduced by repeatedly running emergeblocks for an already-generated section of the map (with multiple emerge threads).
2016-10-08Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot
* LocalPlayer take ownership of maxHudId as it's the only caller * RemotePlayer take ownership of day night ratio as it's the only user * Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call) * getPlayerSAO is now only RemotePlayer call * get/setHotbarItemCount is now RemotePlayer owned * Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type * PlayerSAO now uses RemotePlayer instead of Player because it's only server side * ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO
2016-06-04Change internal type for seeds to s32kwolekr
This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS.
2016-05-01Pathfinder: Fix styleest31
* Fix naming style for methods and classes: Use camelCase for methods and PascalCase for classes as code style demands it. And use sneak_case for methods that are not member of a class. * Replace "* " with " *" for Pointers * Same for references * Put function body opening braces on new line * Other misc minor non functional style improvements
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-25SAPI: Mark all Lua API functions requiring envlockkwolekr
2015-09-23Add /emergeblocks command and core.emerge_area() Lua APIkwolekr
2015-08-27Push error handler afresh each time lua_pcall is usedKahrl
Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
2015-08-16SEnv: Remove static_exists from ActiveObjects in deleted blockskwolekr
2015-08-12SAPI: Track last executed mod and include in error messageskwolekr
2015-08-05Improve Script CPP API diagnosticskwolekr
2015-06-13Add return list of individual counts to find_node_in_areaTeTpaAka
2015-05-05Add core.find_nodes_with_meta() script APIkwolekr