commit
f98e8faaa3
6
init.lua
6
init.lua
|
@ -7,6 +7,8 @@ local colour_list = {
|
||||||
{"yellow", "Yellow",}, {"white", "Frosted",},
|
{"yellow", "Yellow",}, {"white", "Frosted",},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local enable_ceiling = true
|
||||||
|
|
||||||
for i in ipairs(colour_list) do
|
for i in ipairs(colour_list) do
|
||||||
local colour = colour_list[i][1]
|
local colour = colour_list[i][1]
|
||||||
local desc = colour_list[i][2]
|
local desc = colour_list[i][2]
|
||||||
|
@ -21,7 +23,7 @@ for i in ipairs(colour_list) do
|
||||||
local above = pointed_thing.above
|
local above = pointed_thing.above
|
||||||
local under = pointed_thing.under
|
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})
|
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
|
return itemstack
|
||||||
end
|
end
|
||||||
local fakestack = itemstack
|
local fakestack = itemstack
|
||||||
|
@ -105,7 +107,7 @@ for i in ipairs(colour_list) do
|
||||||
if n and def then
|
if n and def then
|
||||||
local wdir = n.param2
|
local wdir = n.param2
|
||||||
local node_name = "abritorch:wall_"..colour
|
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)
|
minetest.remove_node(pos)
|
||||||
return
|
return
|
||||||
elseif wdir <= 1 then
|
elseif wdir <= 1 then
|
||||||
|
|
Loading…
Reference in New Issue