mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-27 03:00:22 +01:00
Prevent glass slabs from becoming transparent on sides/bottom.
For all glasslike drawtype nodes, the tiles contain up to 2 textures. The second texture is for "connected" glass, but that likely is a transparent texture. If we use the `tiles` def without modification, we will make all those slabs/slopes transparent on all sides except the top. To fix, we remove the tiles[2] from the tiledef in case the node is a glasslike drawtype.
This commit is contained in:
parent
1eafd4473d
commit
f92a938d75
@ -44,12 +44,18 @@ for _, name in pairs(default_nodes) do
|
|||||||
if type(ndef.drop) == "string" then
|
if type(ndef.drop) == "string" then
|
||||||
drop = ndef.drop:sub(9)
|
drop = ndef.drop:sub(9)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local tiles = ndef.tiles
|
||||||
|
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
|
||||||
|
tiles = { ndef.tiles[1] }
|
||||||
|
end
|
||||||
|
|
||||||
stairsplus:register_all("moreblocks", name, nodename, {
|
stairsplus:register_all("moreblocks", name, nodename, {
|
||||||
description = ndef.description,
|
description = ndef.description,
|
||||||
drop = drop,
|
drop = drop,
|
||||||
groups = ndef.groups,
|
groups = ndef.groups,
|
||||||
sounds = ndef.sounds,
|
sounds = ndef.sounds,
|
||||||
tiles = ndef.tiles,
|
tiles = tiles,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = ndef.light_source
|
light_source = ndef.light_source
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user