From: paramat Date: Wed, 21 Sep 2016 03:25:10 +0000 (+0100) Subject: Builtin: Change error to warning for light_source > 14 X-Git-Tag: 0.4.15~230 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5091cb5ecdac39a49bce2317d7054d69ed43f2c1;p=oweals%2Fminetest.git Builtin: Change error to warning for light_source > 14 --- diff --git a/builtin/game/register.lua b/builtin/game/register.lua index d3f6b3df8..90f095e9f 100644 --- a/builtin/game/register.lua +++ b/builtin/game/register.lua @@ -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