From 5091cb5ecdac39a49bce2317d7054d69ed43f2c1 Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 21 Sep 2016 04:25:10 +0100 Subject: Builtin: Change error to warning for light_source > 14 --- builtin/game/register.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin') 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 -- cgit v1.2.3