mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Builtin: Change error to warning for light_source > 14
This commit is contained in:
parent
679c8de63f
commit
5091cb5ecd
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,9 @@ function core.register_item(name, itemdef)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if itemdef.light_source and itemdef.light_source > core.LIGHT_MAX then
|
if itemdef.light_source and itemdef.light_source > core.LIGHT_MAX then
|
||||||
error("Unable to register node: 'light_source' exceeds maximum: " .. name)
|
itemdef.light_source = core.LIGHT_MAX
|
||||||
|
core.log("warning", "Node 'light_source' value exceeds maximum," ..
|
||||||
|
" limiting to maximum: " ..name)
|
||||||
end
|
end
|
||||||
setmetatable(itemdef, {__index = core.nodedef_default})
|
setmetatable(itemdef, {__index = core.nodedef_default})
|
||||||
core.registered_nodes[itemdef.name] = itemdef
|
core.registered_nodes[itemdef.name] = itemdef
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue