projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
679c8de
)
Builtin: Change error to warning for light_source > 14
author
paramat
<mat.gregory@virginmedia.com>
Wed, 21 Sep 2016 03:25:10 +0000
(
04:25
+0100)
committer
est31
<MTest31@outlook.com>
Wed, 21 Sep 2016 06:04:11 +0000
(08:04 +0200)
builtin/game/register.lua
patch
|
blob
|
history
diff --git
a/builtin/game/register.lua
b/builtin/game/register.lua
index d3f6b3df89f69fb797dcf1dc989dd59cb7606dcd..90f095e9fc51f56be97875b78654051568a3c8ab 100644
(file)
--- 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