aboutsummaryrefslogtreecommitdiff
path: root/stairsplus
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2016-02-19 13:31:12 -0800
committerAuke Kok <sofar@foo-projects.org>2016-02-19 13:35:36 -0800
commitf92a938d7590e68c2a34d45866a52aa09d6c8fd6 (patch)
tree99b0809f5437080f5350d746509cf06c98c8e254 /stairsplus
parent1eafd4473d9e504756fa2fcceaade6cab62943a4 (diff)
downloadmoreblocks-f92a938d7590e68c2a34d45866a52aa09d6c8fd6.tar.gz
moreblocks-f92a938d7590e68c2a34d45866a52aa09d6c8fd6.tar.bz2
moreblocks-f92a938d7590e68c2a34d45866a52aa09d6c8fd6.zip
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.
Diffstat (limited to 'stairsplus')
-rw-r--r--stairsplus/registrations.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua
index 3e08565..c87e06b 100644
--- a/stairsplus/registrations.lua
+++ b/stairsplus/registrations.lua
@@ -44,12 +44,18 @@ for _, name in pairs(default_nodes) do
if type(ndef.drop) == "string" then
drop = ndef.drop:sub(9)
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, {
description = ndef.description,
drop = drop,
groups = ndef.groups,
sounds = ndef.sounds,
- tiles = ndef.tiles,
+ tiles = tiles,
sunlight_propagates = true,
light_source = ndef.light_source
})