mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Do not set a default for description in itemdef table (#10559)
* Do not set a default for description in itemdef table * improve documentation
This commit is contained in:
parent
fca4db4184
commit
be3fe161fc
2 changed files with 17 additions and 8 deletions
|
@ -118,11 +118,9 @@ function core.register_item(name, itemdef)
|
|||
end
|
||||
itemdef.name = name
|
||||
|
||||
-- default description to item name
|
||||
itemdef.description = itemdef.description or name
|
||||
-- default short_description to first line of description
|
||||
itemdef.short_description = itemdef.short_description or
|
||||
itemdef.description:gsub("\n.*","")
|
||||
(itemdef.description or ""):gsub("\n.*","")
|
||||
|
||||
-- Apply defaults and add to registered_* table
|
||||
if itemdef.type == "node" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue