From a0ca02f5f40aa6c3461f53f629d3cc8763e28c71 Mon Sep 17 00:00:00 2001 From: fozolo Date: Mon, 25 Feb 2019 05:20:35 -0500 Subject: [PATCH] Improve cut glass edge texture. (#115) Also preserves connected_glass feature. --- CHANGELOG.md | 1 + nodes.lua | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ead1d5..0d949aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Node rotation now works correctly when placing Stairs+ nodes. +- Stairs+ glasslike nodes' textures are now easier to see. ## [1.2.0] - 2018-11-24 diff --git a/nodes.lua b/nodes.lua index f898068..10076ad 100644 --- a/nodes.lua +++ b/nodes.lua @@ -459,6 +459,21 @@ for name, def in pairs(nodes) do def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"} minetest.register_node("moreblocks:" ..name, def) minetest.register_alias(name, "moreblocks:" ..name) + + def_copy = table.copy(def) + + -- Use the primary tile for all sides of cut glasslike nodes. + -- This makes them easier to see + if + #def_copy.tiles > 1 and + def_copy.drawtype and + def_copy.drawtype == "glasslike_framed" or + def_copy.drawtype == "glasslike_framed_optional" + then + def.tiles = {def_copy.tiles[1]} + end + + if not def.no_stairs then local groups = {} for k, v in pairs(def.groups) do groups[k] = v end