aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
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
2018-01-23CSM: Remove screenshot APIred-001
Reverted from commit 19960e26c672c6337f8c6ffbe27f2c6bca49750c (* [CSM] add screenshot api lua)
2018-01-20[CSM] Add functions to create particles and particlespawners. (#6072)red-001
2018-01-20[CSM] Add basic HUD manipulation. (#6067)red-001
* [CSM] Add basic HUD manipulation. Workaround for on_connect not working right now.
2018-01-16Biomes: Add 'get heat', 'get humidity', 'get biome data' APIsparamat
'get biome data' returns biome id, heat and humidity. Clean up nearby lines in lua_api.txt.
2018-01-08Fix buffer parameter not working in LuaPerlinNoiseMap::l_getMapSlice()Pedro Gimeno
2018-01-07Fix naming conventions of noise userdatarubenwardy
2018-01-05Biomes: Add vertical biome blend (#6853)Paramat
Add 'vertical blend' parameter to biome registration that defines how many nodes above the biome's 'y max' limit the blend will extend.
2018-01-03Tool.cpp/.h, lua_api/l_util.cpp: Tidy up code and remove dead codeHybrid Dog
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-12-17Allow 'default' parameter in 'settings:get_bool' functionJordan Irwin
Default value is used when the setting key is not found in the config file. If default value is not set, 'nil' is returned. #6188
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-19Stratum ore: Add option for a constant thickness stratumparamat
Add a 'stratum thickness' integer parameter, as an alternative to providing a 2nd noise parameter for thickness variation.
2017-11-17Load files from subfolders in texturepacksnumber Zero
Updated and rebased version of a PR by red-001
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-11-08Add minetest.safe_write_file() to script APIsfan5
2017-10-30Add sha1 to lua utils. (#6563)Rob Blanckaert
2017-10-29CSM: Add a way to get current locale from CSMlisacvuk
2017-10-29Allow overriding tool capabilities through itemstack metadataraymoo
This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
2017-10-23Improvements/fixes for noise parameter input in advanced settingsMuhammad Rifqi Priyo Susanto
Formspec input for each individual noise parameter and flag. Allow noise flags to be set in advanced settings, previously only settable in minetest.conf. Standardise 'group format' for noise parameters set in minetest.conf, as only these support noise flags. However the older 'single line' format is still accepted to support existing minetest.conf files. Therefore auto-generate minetest.conf.example with noise parameters in 'group format'. Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or 'noise_params_3D', the dimension number is displayed in the advanced settings edit page.
2017-10-10Simple decorations: Make 'place_offset_y' usable with simple decorationsparamat
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the seabed instead of on it. Useful for placing decorations sunk into, or buried in, the ground.
2017-10-09Simple decorations: Add 'param2_max' parameter for random param2paramat
If 'param2_max' is not used, parameter 'param2' works as before for compatibility. If 'param2_max' is used, 'param2' and 'param2_max' become the lower and upper bounds of a per-decoration random param2.
2017-10-01Stratum ore: Allow use with no noise for simple horizontal strataparamat
If either of the 2 noise parameters are omitted the ore will occur from y_min to y_max in a simple horizontal stratum. As this does not compute noise performance improves, and is ideal for placing many layers. Clean up some nearby ore documentation.
2017-09-30Make Player::peer_id server-side only and add getters and setters (#6478)Loïc Blot
* Make Player::peer_id server-side only and add getters and setters Player::peer_id has no sense client side, move it to server, make it private and add setter and getter Also add some PEER_ID_INEXISTENT instead of harcoded 0
2017-09-26Update JsonCPP to 1.8.3 (#6466)Loïc Blot
* Update JsonCPP to 1.8.3 * Fix deprecated functions Json::FastWriter, Json::StyledWriter and Json::Reader are marked deprecated since 1.1 and are deprecated in 0.8 but not shown at compilation time. Use new methods to serialize/deserialize
2017-09-26Implement mod communication channels (#6351)Loïc Blot
Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method
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-12Network: Remove large parts of deprecated legacy code (#6404)SmallJoker
Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
2017-09-12Make INodeDefManager::getIds return a vector, not a setKahrl
2017-09-10Schematic decorations: Add 'place_offset_y' placement parameterparamat
For precise control of schematic vertical position relative to the 'place_on' node. Avoids workarounds that add empty nodes to a schematic and therefore reduce performance. Also remove long-unused decoration cutoff code.
2017-09-03Ores: Add stratum ore (#6352)Paramat
Creates a single undulating ore stratum that is continuous across mapchunk borders and horizontally spans the world. Due to being continuous is ideal for creating bands of alternative stone type running through cliffs and mountains, or underground layers. Add missing documentation of 'ore_param2' parameter.
2017-09-01Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier
* Fix animation frame_speed and blend loosing precision due to incorrect data type Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
2017-08-28Clientevent refactor (#6320)Loïc Blot
* Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
2017-08-27core.get_objects_inside_radius: Omit removed objects (#6318)you
Fixes #6294
2017-08-23Respect object property hp_max field for players (#6287)SmallJoker
* Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
2017-08-20Minimap: Add new HUD flag for minimap radar modeparamat
Flag default is true to not change default behaviour. The existing minimap HUD flag remains the master control for minimap.
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
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-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-08-17l_server, clientenvironment, clientiface: code modernizationLoic Blot
* use range-based for loops * use refs on some exceptions & one setter
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-07-24Clouds API: change speed from 'y' to 'z', ColorSpecs in Lua docs (#6164)Ben Deutsch
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-16Chat protocol rewrite (#5117)Loïc Blot
* New TOCLIENT_CHAT_MESSAGE packet * Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat * Handle TOCLIENT_CHAT_MESSAGE new structure client side * Client chat queue should use a specific object * SendChatMessage: use the right packet depending on protocol version (not complete yet) * Add chatmessage(type) objects and handle them client side (partially) * Use ChatMessage instead of std::wstring server side * Update with timestamp support
2017-07-15Revert "CSM: Revert "[CSM] Add send_chat_message and run_server_chatcommand""Loic Blot
This reverts commit bdac12761cd92960c3df83c932aa610f2322215f.
2017-07-15CSM: Revert "[CSM] Add send_chat_message and run_server_chatcommand"rubenwardy
Original PR: #5747. This reverts commit 39f4a2f607d44738d60db84eba4b30e3d7450204.