Skip to content

Commit

Permalink
Builtin: Change error to warning for light_source > 14
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat authored and est31 committed Sep 21, 2016
1 parent 679c8de commit 5091cb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin/game/register.lua
Expand Up @@ -128,7 +128,9 @@ function core.register_item(name, itemdef)
}
end
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
setmetatable(itemdef, {__index = core.nodedef_default})
core.registered_nodes[itemdef.name] = itemdef
Expand Down

0 comments on commit 5091cb5

Please sign in to comment.