aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_inventory.cpp
AgeCommit message (Collapse)Author
2022-10-04Consolidate API object code (#12728)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-03-29Fix the documentation of InvRef:get_lists() and clean up code (#12150)DS
2021-10-12Remove a few unused functions reported by callcatcher (#11658)SmallJoker
2021-05-30script: Replace calls to depreated luaL_openlibsfan5
2020-10-11Add missing type check to InvRef:set_lists() (#10476)Zughy
2020-05-07Server class code cleanups (#9769)Loïc Blot
* 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.
2020-04-27Script: Enforce type checks if not nil (#9748)SmallJoker
* Script: Enforce type checks if not nil
2018-10-10 Add core.remove_detached_inventory (#7684)SmallJoker
Breaks backwards compatibility for good Bump protocol version
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
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-06-20Automatic item and node colorization (#5640)Dániel Juhász
* 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
2017-04-08Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot
(#5541) We are bundling Lua5.1 which has same macro
2017-03-13Add `get_wielded_item`red-001
2016-11-28Allow restricting detached inventories to one playersfan5
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.
2016-10-08Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot
* 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())
2015-10-25SAPI: Mark all Lua API functions requiring envlockkwolekr
2014-06-23Clear inventory before setting listsShadowNinja
2014-05-08Use "core" namespace internallyShadowNinja
2014-01-11Add InvRef::get/set_lists()ShadowNinja
2013-11-16Fix invalid listname and listsize not handled correctly in set_sizesapier
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-06-01Fix some nullptr exceptions when handling invalid node inventoriesMetaDucky
2013-06-01Fix minetest.get_inventory(loc) always returning nil for "node" type locMetaDucky
2013-05-26Fixed wrongly named invref:get_location() table members for nodes.MetaDucky
Makes the result compatible with the minetest.get_inventory(location) param.
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)