Modern Lua Plugins: ide-helper improvements. LG-1978, LG-1980
This commit is contained in:
@@ -173,13 +173,12 @@ local ItemDefinition = {
|
||||
punch_use_air = nil,
|
||||
},
|
||||
|
||||
--- When the 'place' key was pressed with the item in hand
|
||||
--- and a node was pointed at.
|
||||
--- Shall place item and return the leftover itemstack
|
||||
--- or nil to not modify the inventory.
|
||||
--- When the 'place' key was pressed with the item in hand and a node was pointed at.
|
||||
--- Shall place item and return the leftover itemstack or nil to not modify the inventory.
|
||||
--- Second return value: position of placed item/node.
|
||||
--- The placer may be any ObjectRef or nil.
|
||||
--- default: minetest.item_place
|
||||
--- @type fun(itemstack:ItemStack, placer:Player|ObjectRef|nil, pointed_thing:pointed_thing)?
|
||||
--- @type (fun(itemstack:ItemStack, placer:Player|ObjectRef|nil, pointed_thing:pointed_thing):ItemStack|nil, Position|vector|nil)?
|
||||
on_place = minetest.item_place,
|
||||
|
||||
--- Same as on_place but called when not pointing at a node.
|
||||
|
||||
@@ -574,8 +574,8 @@ local NodeDefinition = {
|
||||
--- Note: pointed_thing can be nil, if a mod calls this function.
|
||||
--- This function does not get triggered by clients <=0.4.16 if the
|
||||
--- "formspec" node metadata field is set.
|
||||
--- @type fun(pos:Position, node:NodeTable, clicker:Player|ObjectRef|nil, itemstack:ItemStack, pointed_thing:pointed_thing|nil)?
|
||||
on_rightclick = nil,
|
||||
--- @type (fun(pos:Position, node:NodeTable, clicker:Player|ObjectRef, itemstack:ItemStack, pointed_thing:pointed_thing|nil):ItemStack|nil)?
|
||||
on_rightclick = core.node_punch,
|
||||
|
||||
--- default: minetest.node_dig
|
||||
--- By default checks privileges, wears out item (if tool) and removes node.
|
||||
|
||||
Reference in New Issue
Block a user