summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_inventory.cpp
Commit message (Collapse)AuthorAge
* Add missing type check to InvRef:set_lists() (#10476)Zughy2020-10-11
|
* Server class code cleanups (#9769)Loïc Blot2020-05-07
| | | | | | | | | | | | | | | | | | | * Server::overrideDayNightRatio doesn't require to return bool There is no sense to sending null player, the caller should send a valid object * Server::init: make private & cleanup This function is always called before start() and loads some variables which can be loaded in constructor directly. Make it private and call it directly in start * Split Server inventory responsibility to a dedicated object This splits permit to found various historical issues: * duplicate lookups on player connection * sending inventory to non related player when a player connects * non friendly lookups on detached inventories ownership This reduce the detached inventory complexity and also increased the lookup performance in a quite interesting way for servers with thousands of inventories.
* Script: Enforce type checks if not nil (#9748)SmallJoker2020-04-27
| | | | * Script: Enforce type checks if not nil
* Add core.remove_detached_inventory (#7684)SmallJoker2018-10-10
| | | | Breaks backwards compatibility for good Bump protocol version
* Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot2018-06-30
| | | | | | | | | * 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
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
| | | | | | | | | | | * 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
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
| | | | | | | | | | | | | * 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
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * 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
* Automatic item and node colorization (#5640)Dániel Juhász2017-06-20
| | | | | | | | | | | | | | | | | * Automatic item and node colorization Now nodes with a palette yield colored item stacks, and colored items place colored nodes by default. The client predicts the colorization. * Backwards compatibility * Use nil * Style fixes * Fix code style * Document changes
* Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot2017-04-08
| | | | | (#5541) We are bundling Lua5.1 which has same macro
* Add `get_wielded_item`red-0012017-03-13
|
* Allow restricting detached inventories to one playersfan52016-11-28
| | | | | | | This combats the problem of sending the hundreds of "creative" / "armor" or whatever detached invs that exist on popular servers to each and every player on join or on change of said invs.
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot2016-10-08
| | | | | | | * Server/Client Environments now have an helper to cast Player object in the right type to use it * Server: use RemotePlayer everywhere and remove previous added casts * Client: use LocalPlayer where needed * Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())
* SAPI: Mark all Lua API functions requiring envlockkwolekr2015-10-25
|
* Clear inventory before setting listsShadowNinja2014-06-23
|
* Use "core" namespace internallyShadowNinja2014-05-08
|
* Add InvRef::get/set_lists()ShadowNinja2014-01-11
|
* Fix invalid listname and listsize not handled correctly in set_sizesapier2013-11-16
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Fix some nullptr exceptions when handling invalid node inventoriesMetaDucky2013-06-01
|
* Fix minetest.get_inventory(loc) always returning nil for "node" type locMetaDucky2013-06-01
|
* Fixed wrongly named invref:get_location() table members for nodes.MetaDucky2013-05-26
| | | | Makes the result compatible with the minetest.get_inventory(location) param.
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
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)