mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add a short_description to be used by mods (#8980)
This commit is contained in:
parent
b2f3f66385
commit
f3ae45b2b2
11 changed files with 102 additions and 2 deletions
|
@ -118,6 +118,12 @@ 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.*","")
|
||||
|
||||
-- Apply defaults and add to registered_* table
|
||||
if itemdef.type == "node" then
|
||||
-- Use the nodebox as selection box if it's not set manually
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue