mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Fix short_description fallback order (#10943)
This commit is contained in:
parent
7832b6843e
commit
a8f6befd39
4 changed files with 20 additions and 14 deletions
|
@ -6039,18 +6039,18 @@ an itemstring, a table or `nil`.
|
|||
stack).
|
||||
* `set_metadata(metadata)`: (DEPRECATED) Returns true.
|
||||
* `get_description()`: returns the description shown in inventory list tooltips.
|
||||
* The engine uses the same as this function for item descriptions.
|
||||
* The engine uses this when showing item descriptions in tooltips.
|
||||
* Fields for finding the description, in order:
|
||||
* `description` in item metadata (See [Item Metadata].)
|
||||
* `description` in item definition
|
||||
* item name
|
||||
* `get_short_description()`: returns the short description.
|
||||
* `get_short_description()`: returns the short description or nil.
|
||||
* Unlike the description, this does not include new lines.
|
||||
* The engine uses the same as this function for short item descriptions.
|
||||
* Fields for finding the short description, in order:
|
||||
* `short_description` in item metadata (See [Item Metadata].)
|
||||
* `short_description` in item definition
|
||||
* first line of the description (See `get_description()`.)
|
||||
* first line of the description (From item meta or def, see `get_description()`.)
|
||||
* Returns nil if none of the above are set
|
||||
* `clear()`: removes all items from the stack, making it empty.
|
||||
* `replace(item)`: replace the contents of this stack.
|
||||
* `item` can also be an itemstring or table.
|
||||
|
@ -7171,8 +7171,9 @@ Used by `minetest.register_node`, `minetest.register_craftitem`, and
|
|||
|
||||
short_description = "Steel Axe",
|
||||
-- Must not contain new lines.
|
||||
-- Defaults to the first line of description.
|
||||
-- See also: `get_short_description` in [`ItemStack`]
|
||||
-- Defaults to nil.
|
||||
-- Use an [`ItemStack`] to get the short description, eg:
|
||||
-- ItemStack(itemname):get_short_description()
|
||||
|
||||
groups = {},
|
||||
-- key = name, value = rating; rating = 1..3.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue