From 3aefa5d3ceaaa9299f42cc10921dec65fa53c5e0 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 15 Sep 2016 22:40:19 +0100 Subject: 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. --- doc/lua_api.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') 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, --[[ -- cgit v1.2.3