Merge pull request #1 from DonBatman/master

Enabled ceiling torches
master
Ezhh 2016-07-21 23:00:18 +01:00 committed by GitHub
commit f98e8faaa3
1 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@ local colour_list = {
{"yellow", "Yellow",}, {"white", "Frosted",},
}
local enable_ceiling = true
for i in ipairs(colour_list) do
local colour = colour_list[i][1]
local desc = colour_list[i][2]
@ -21,7 +23,7 @@ for i in ipairs(colour_list) do
local above = pointed_thing.above
local under = pointed_thing.under
local wdir = minetest.dir_to_wallmounted({x = under.x - above.x, y = under.y - above.y, z = under.z - above.z})
if wdir < 1 and not torches.enable_ceiling then
if wdir < 1 and not enable_ceiling then
return itemstack
end
local fakestack = itemstack
@ -105,7 +107,7 @@ for i in ipairs(colour_list) do
if n and def then
local wdir = n.param2
local node_name = "abritorch:wall_"..colour
if wdir < 1 and not torches.enable_ceiling then
if wdir < 1 and not enable_ceiling then
minetest.remove_node(pos)
return
elseif wdir <= 1 then