Improve cut woodframed glass textures
This commit is contained in:
parent
3de6b06e88
commit
5ae4204772
@ -798,7 +798,56 @@ xdecor.register("woodframed_glass", {
|
||||
tiles = {"xdecor_woodframed_glass.png", "xdecor_woodframed_glass_detail.png"},
|
||||
use_texture_alpha = ALPHA_CLIP,
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 1},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
_xdecor_custom_noncube_tiles = {
|
||||
stair = {
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_stairside_flip.png",
|
||||
"xdecor_woodframed_glass_stairside.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
},
|
||||
stair_inner = {
|
||||
"xdecor_woodframed_glass_stairside.png^[transformR270",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_stairside_flip.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_stairside.png",
|
||||
},
|
||||
stair_outer = {
|
||||
"xdecor_woodframed_glass_stairside.png^[transformR90",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_outer_stairside.png",
|
||||
"xdecor_woodframed_glass_stairside_flip.png",
|
||||
"xdecor_woodframed_glass_stairside.png^[transformR90",
|
||||
"xdecor_woodframed_glass_outer_stairside.png",
|
||||
},
|
||||
halfstair = {
|
||||
"xdecor_woodframed_glass_cube.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_stairside_flip.png",
|
||||
"xdecor_woodframed_glass_stairside.png",
|
||||
"xdecor_woodframed_glass_split.png^[transformR90",
|
||||
"xdecor_woodframed_glass_cube.png",
|
||||
},
|
||||
slab = {
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass.png",
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
},
|
||||
cube = { "xdecor_woodframed_glass_cube.png" },
|
||||
thinstair = { "xdecor_woodframed_glass_split.png" },
|
||||
micropanel = { "xdecor_woodframed_glass_split.png" },
|
||||
panel = {
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
"xdecor_woodframed_glass_cube.png",
|
||||
"xdecor_woodframed_glass_cube.png",
|
||||
"xdecor_woodframed_glass_split.png",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local devices = {
|
||||
|
@ -303,20 +303,58 @@ for i = 1, #nodes do
|
||||
end
|
||||
end
|
||||
|
||||
if not minetest.registered_nodes["stairs:slab_" .. item_name] then
|
||||
stairs.register_stair_and_slab(item_name, node,
|
||||
groups, tiles, S("@1 Stair", def.description),
|
||||
S("@1 Slab", def.description), def.sounds)
|
||||
local custom_tiles = def._xdecor_custom_noncube_tiles
|
||||
if custom_tiles then
|
||||
if not custom_tiles.nanoslab then
|
||||
custom_tiles.nanoslab = custom_tiles.cube
|
||||
end
|
||||
if not custom_tiles.micropanel then
|
||||
custom_tiles.micropanel = custom_tiles.micropanel
|
||||
end
|
||||
if not custom_tiles.doublepanel then
|
||||
custom_tiles.doublepanel = custom_tiles.panel
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node(":" .. node .. "_" .. d[1], {
|
||||
if not minetest.registered_nodes["stairs:slab_" .. item_name] then
|
||||
if custom_tiles and (custom_tiles.slab or custom_tiles.stair) then
|
||||
if custom_tiles.stair then
|
||||
stairs.register_stair(item_name, node,
|
||||
groups, custom_tiles.stair, S("@1 Stair", def.description),
|
||||
def.sounds)
|
||||
stairs.register_stair_inner(item_name, node,
|
||||
groups, custom_tiles.stair_inner, "", def.sounds)
|
||||
stairs.register_stair_outer(item_name, node,
|
||||
groups, custom_tiles.stair_outer, "", def.sounds)
|
||||
end
|
||||
if custom_tiles.slab then
|
||||
stairs.register_slab(item_name, node,
|
||||
groups, custom_tiles.slab, S("@1 Slab", def.description),
|
||||
def.sounds)
|
||||
end
|
||||
else
|
||||
stairs.register_stair_and_slab(item_name, node,
|
||||
groups, tiles, S("@1 Stair", def.description),
|
||||
S("@1 Slab", def.description), def.sounds)
|
||||
end
|
||||
end
|
||||
|
||||
local cutname = d[1]
|
||||
local tiles_special_cut
|
||||
if custom_tiles and custom_tiles[cutname] then
|
||||
tiles_special_cut = custom_tiles[cutname]
|
||||
else
|
||||
tiles_special_cut = tiles
|
||||
end
|
||||
|
||||
minetest.register_node(":" .. node .. "_" .. cutname, {
|
||||
-- @1: Base node description (e.g. "Stone"); @2: modifier (e.g. "Nanoslab")
|
||||
description = S("@1 @2", def.description, d[4]),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
sounds = def.sounds,
|
||||
tiles = tiles,
|
||||
tiles = tiles_special_cut,
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = groups,
|
||||
node_box = xdecor.pixelbox(16, d[3]),
|
||||
|
BIN
textures/xdecor_woodframed_glass_cube.png
Normal file
BIN
textures/xdecor_woodframed_glass_cube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 300 B |
BIN
textures/xdecor_woodframed_glass_outer_stairside.png
Normal file
BIN
textures/xdecor_woodframed_glass_outer_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 299 B |
BIN
textures/xdecor_woodframed_glass_split.png
Normal file
BIN
textures/xdecor_woodframed_glass_split.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 290 B |
BIN
textures/xdecor_woodframed_glass_stairside.png
Normal file
BIN
textures/xdecor_woodframed_glass_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 300 B |
BIN
textures/xdecor_woodframed_glass_stairside_flip.png
Normal file
BIN
textures/xdecor_woodframed_glass_stairside_flip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 B |
Loading…
Reference in New Issue
Block a user