1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
luanti/builtin/game
Jürgen Rühle 2f464843cb
Make it more convenient to customize node drops (#15872)
* Provide tool and digger to get_node_drops

This gives games/mods the ability to modify node drops depending on item
and/or player metadata without overriding node_dig or other workarounds.

* Copy wielded item to prevent modification in get_node_drops

* Also pass node pos to get_node_drops

Allowing properties of the node and its surroundings to affect node drops.

* Copy pos to prevent modification in get_node_drops

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>

* Don't pass empty item stack to get_node_drops if wielded is nil

---------

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2025-04-20 20:48:48 +02:00
..
tests Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
async.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
auth.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
chat.lua Add/remove/change some log messages for clarity 2025-04-10 14:39:21 +02:00
constants.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
death_screen.lua Dehardcode the death formspec (#15155) 2024-09-24 22:37:44 +02:00
deprecated.lua Rename perlin noise to value noise (#15858) 2025-04-10 14:39:40 +02:00
detached_inventory.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
falling.lua Use visual = "node" for builtin falling node entity 2025-02-22 16:19:04 +01:00
features.lua Implement metadata-aware version of InvRef:remove_item() (#15771) 2025-02-22 16:18:48 +01:00
forceloading.lua Let mods choose a forceload limit (#13002) 2022-12-03 10:41:34 -05:00
hud.lua Restore proportional minimap scaling (#15022) 2024-08-31 18:11:56 +02:00
init.lua Dehardcode the death formspec (#15155) 2024-09-24 22:37:44 +02:00
item.lua Make it more convenient to customize node drops (#15872) 2025-04-20 20:48:48 +02:00
item_entity.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
knockback.lua Allow nil puncher in object:punch (#14319) 2024-04-28 17:55:04 +02:00
misc.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
misc_s.lua Clean up and compress some pre-join packets (#15881) 2025-03-11 20:00:07 +01:00
privileges.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
register.lua Improve some warning messages (#15990) 2025-04-08 22:24:00 +02:00
static_spawn.lua Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438) 2024-12-04 18:19:46 +01:00
voxelarea.lua Add VoxelArea() constructor (#12886) 2022-10-22 08:05:45 -04:00