]> git.lizzy.rs Git - minetest.git/blobdiff - doc/lua_api.txt
Implement textarea in formspec, a multiline input field
[minetest.git] / doc / lua_api.txt
index ebad1dad2c62ceaca1319afd8272659e9e51314c..34738974ad7f8d7fb93816967381bc124592b847 100644 (file)
@@ -725,6 +725,9 @@ field[<name>;<label>;<default>]
 ^ must be used without a size[] element
 ^ a 'Proceed' button will be added automatically
 
+textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]
+^ same as fields above, but with multi-line input
+
 label[<X>,<Y>;<label>]
 ^ x and y work as per field
 ^ label is the text on the label
@@ -942,6 +945,8 @@ minetest.item_place_object(itemstack, placer, pointed_thing)
 ^ Place item as-is
 minetest.item_place(itemstack, placer, pointed_thing)
 ^ Use one of the above based on what the item is.
+^ Calls on_rightclick of pointed_thing.under if defined instead
+^ Note: is not called when wielded item overrides on_place
 minetest.item_drop(itemstack, dropper, pos)
 ^ Drop the item
 minetest.item_eat(hp_change, replace_with_item)
@@ -1231,6 +1236,8 @@ methods:
     can be fully taken from the list
   remove_item(listname, stack): take as many items as specified from the list,
     returns the items that were actually removed (as an ItemStack)
+- get_location() -> location compatible to minetest.get_inventory(location)
+                 -> {type="undefined"} in case location is not known
 
 ItemStack: A stack of items.
 - Can be created via ItemStack(itemstack or itemstring or table or nil)
@@ -1480,6 +1487,8 @@ Node definition (register_node)
     on_punch = func(pos, node, puncher),
     ^ default: minetest.node_punch
     ^ By default: does nothing
+    on_rightclick = func(pos, node, clicker),
+    ^ default: nil
     on_dig = func(pos, node, digger),
     ^ default: minetest.node_dig
     ^ By default: checks privileges, wears out tool and removes node