aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/item.lua
AgeCommit message (Collapse)Author
2022-11-24Add support for attached facedir/4dir nodes (#11432)Wuzzy
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-10-01Add an item pick up callback (2) (#7712)DS
Co-authored-by: SmallJoker <mk939@ymail.com> Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2022-09-16Add paramtype2s for 4 horizontal rotations and 64 colors (#11431)Wuzzy
4dir is like facedir, but only for 4 horizontal directions: NESW. It is identical in behavior to facedir otherwise. The reason why game makers would want to use this over facedir is 1) simplicity and 2) you get 6 free bits. It can be used for things like chests and furnaces and you don't need or want them to "flip them on the side" (like you could with facedir). color4dir is like colorfacedir, but you get 64 colors instead of only 8.
2022-08-13Reassure previous nil behaviour for tiles and special_tiles (#12678)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-07-14Fix regression & replace more occurrences of vector.new with vector.copy ↵Lars Müller
(#12539)
2022-07-08Replace deprecated use of `vector.new` with `copy`Lars Müller
2022-06-28Remove tile_images and special_materials obsolete code (#12455)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-05-09Fix Minetest blaming the wrong mod for errors (#12241)Lars Müller
Covers the case where mods insert their callbacks manually into "minetest.registered_<callbacks>" (often to achieve a particular order of execution).
2022-05-02Reorganize some builtin functions in preparation for async envsfan5
2021-12-15Fix eat sound not playing if eating last of stacksfan5
2021-10-31Fix number of tool uses being off by 1..32767 (#11110)Wuzzy
2021-10-25Fix item duplication if player dies during interact callback (alternative) ↵sfan5
(#11662)
2021-08-27Add group-based tool filtering for node drops (#10141)Treer
Supports both AND and OR requirements, e.g. * "a tool that's in any of these groups" * "a tool that's in all of these groups"
2021-06-04Add metatables to lua vectors (#11039)DS
Add backwards-compatible metatable functions for vectors.
2021-03-30Degrotate support for mesh nodes (#7840)Vitaliy
2021-02-11Replace 'minetest.' with 'core.' in builtinrubenwardy
2021-01-31Fix minetest.dig_node returning true when node isn't diggable (#10890)rubenwardy
2021-01-29Drop never documented 'alpha' property from nodedefsfan5
Includes minimal support code for practical reasons. We'll need it for a slightly different purpose next commit.
2021-01-21Removed some obsolete code (#10562)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-11-12Copy position for can_digsfan5
fixes #10514
2020-05-29Add minetest.is_creative_enabledWuzzy
2020-04-13Add default stack size setting (#8873)SmallJoker
New setting "default_stack_max" to alter the default stack sizes of all items when desired. Co-authored-by: Pascal Abresch <nep@packageloss.eu>
2020-02-16Builtin: Fix error by digging unknown nodesSmallJoker
2020-02-01Convert sound_play uses in builtin to ephemeralsfan5
2020-02-01Let node 'place' and 'dug' sounds be heard by other playerssfan5
2019-12-24Fix item eat sound not played if last item (#9239)Wuzzy
2019-12-18Make core.item_place_node return position of placed node. (#7713)Bluebird
2019-12-16Correct documentation around minetest.item_placesfan5
The code that calls minetest.item_place_object was removed in 2013 in commit fc61c8809b9a1d47d9f117446764107a56cec956.
2019-08-06Add luacheck to check builtin (#7895)rubenwardy
2019-07-14Docs: Clarify where to check for 'protection_bypass' (#8675)SmallJoker
2018-12-10Add eat sound (#7956)Wuzzy
2018-08-30get_node_drops: Make empty drop return empty table (#7592)tenplus1
This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {}
2018-07-17Builtin: Replace deprecated function calls (#7561)SmallJoker
2018-03-29core.rotate_node: Do not trigger after_place_node (#6900)SmallJoker
2017-12-14Add callback to preserve node metadata as item metadataashtrayoz
2017-12-12Builtin: Fix handle_node_drops crash with nil diggerSmallJoker
2017-10-28Fix default item callbacks to work with nil users (#5819)raymoo
* Fix default item callbacks to work with nil users * item.lua: Handle node drops for invalid players The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used. Remove redundant `local _, dropped_item`
2017-09-13Item drop: Tune to land exactly 2 nodes away with level view (#6410)Paramat
2017-08-26Check item_drop amount clientside (#6242)rubenwardy
2017-08-14Make dropped items colorableDániel Juhász
2017-06-24Helper methods for hardware colorization (#5870)Dániel Juhász
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-05-06Use a settings object for the main settingsShadowNinja
This unifies the settings APIs. This also unifies the sync and async registration APIs, since the async registration API did not support adding non-functions to the API table.
2017-03-15Fix two nul deref if digging unknown nodes. (#5398)Auke Kok
Introduced by d785456b3fa35faf47cb972fde9e8668382c5e22 (#5162)
2017-03-10Optimize item.luatenplus1
Replace slow ItemStack get_definitions with registered_nodes one's and cached playername as it's used multiple times. Also removed local item = itemstack:peek_item() as it is never used.
2017-02-18Fixes for colorwallmounted and colorfacedir nodesDániel Juhász
Correct node placement prediction for attached colorwallmounted nodes. Correct placement direction for colorfacedir and colorwallmounted nodes. Correct detatch mechanism for attached colorwallmounted nodes.
2017-01-31Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. ↵Nathanaël Courant
(#5153)
2017-01-23core: Add dir_to_yaw and yaw_to_dir helpersAuke Kok
These are needed to go from things like entity yaw to a vector and vice versa.
2016-11-20Tool break: Reduce gain of break soundsparamat