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. --- builtin/game/constants.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'builtin/game/constants.lua') diff --git a/builtin/game/constants.lua b/builtin/game/constants.lua index 56fca9289..50c515b24 100644 --- a/builtin/game/constants.lua +++ b/builtin/game/constants.lua @@ -19,4 +19,9 @@ core.EMERGE_FROM_DISK = 3 core.EMERGE_GENERATED = 4 -- constants.h +-- Size of mapblocks in nodes core.MAP_BLOCKSIZE = 16 + +-- light.h +-- Maximum value for node 'light_source' parameter +core.LIGHT_MAX = 14 -- cgit v1.2.3