mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-06-30 15:10:50 +02:00
Improve cut glass edge texture. (#115)
Also preserves connected_glass feature.
This commit is contained in:
15
nodes.lua
15
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
|
||||
|
Reference in New Issue
Block a user