diff options
author | paramat <mat.gregory@virginmedia.com> | 2016-09-21 04:25:10 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-09-21 08:04:11 +0200 |
commit | 5091cb5ecdac39a49bce2317d7054d69ed43f2c1 (patch) | |
tree | 39873ac9cb15727c76b6ccf0147bd069e36fff26 /builtin/game | |
parent | 679c8de63ffb7119f2b99b00883bc959f5917da4 (diff) | |
download | minetest-5091cb5ecdac39a49bce2317d7054d69ed43f2c1.tar.gz minetest-5091cb5ecdac39a49bce2317d7054d69ed43f2c1.tar.bz2 minetest-5091cb5ecdac39a49bce2317d7054d69ed43f2c1.zip |
Builtin: Change error to warning for light_source > 14
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/register.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |