summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-09-15 22:40:19 +0100
committerparamat <mat.gregory@virginmedia.com>2016-09-17 09:33:25 +0100
commit3aefa5d3ceaaa9299f42cc10921dec65fa53c5e0 (patch)
treebccc3be37d612d0f7c2e30aa9f3df117b7f1e4ab /doc/lua_api.txt
parent297546af3d3b5b3a07a61ade041ad7c26e9a531d (diff)
downloadminetest-3aefa5d3ceaaa9299f42cc10921dec65fa53c5e0.tar.gz
minetest-3aefa5d3ceaaa9299f42cc10921dec65fa53c5e0.tar.bz2
minetest-3aefa5d3ceaaa9299f42cc10921dec65fa53c5e0.zip
Register.lua: Throw error if node 'light_source' > core.LIGHT_MAX
Add 'core.LIGHT_MAX = 14' to builtin/game/constants.lua with the intention to replace misplaced 'default.LIGHT_MAX = 14' in Minetest Game. Add comment in light.h requiring the constant be changed in both places. Add lighting bug warning to note in lua_api.txt. There are hundreds of mod uses of 15 which causes a lighting bug.
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index b6e6520b2..6f69360c8 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3664,7 +3664,10 @@ Definition tables
^ Don't forget to use "leveled" type nodebox. ]]
liquid_range = 8, -- number of flowing nodes around source (max. 8)
drowning = 0, -- Player will take this amount of damage if no bubbles are left
- light_source = 0, -- Amount of light emitted by node (max. 14)
+ light_source = 0, --[[
+ ^ Amount of light emitted by node.
+ ^ To set the maximum (currently 14), use the value 'minetest.LIGHT_MAX'.
+ ^ A value outside the range 0 to minetest.LIGHT_MAX causes undefined behavior.]]
damage_per_second = 0, -- If player is inside node, this damage is caused
node_box = {type="regular"}, -- See "Node boxes"
connects_to = nodenames, --[[