1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Clarify documentation on node/item callbacks (#16385)

This commit is contained in:
sfan5 2025-08-13 20:38:41 +02:00 committed by GitHub
parent a5197a6719
commit 2a96b31ffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 39 additions and 36 deletions

View file

@ -353,7 +353,7 @@ function core.item_place(itemstack, placer, pointed_thing, param2)
return itemstack, nil
end
function core.item_secondary_use(itemstack, placer)
function core.item_secondary_use(itemstack, user)
return itemstack
end
@ -390,7 +390,7 @@ function core.item_pickup(itemstack, picker, pointed_thing, ...)
end
end
-- Pickup item.
-- Pick up item
local inv = picker and picker:get_inventory()
if inv then
return inv:add_item("main", itemstack)
@ -639,6 +639,7 @@ core.nodedef_default = {
on_drop = redef_wrapper(core, 'item_drop'), -- core.item_drop
on_pickup = redef_wrapper(core, 'item_pickup'), -- core.item_pickup
on_use = nil,
after_use = nil,
can_dig = nil,
on_punch = redef_wrapper(core, 'node_punch'), -- core.node_punch