Improve corner stair texturing
This commit is contained in:
parent
85975a2d26
commit
d3f5942d7d
3 changed files with 34 additions and 26 deletions
|
@ -314,14 +314,14 @@ end
|
|||
|
||||
function mcl_stairs.register_stair_and_slab(subname, recipeitem,
|
||||
groups, images, desc_stair, desc_slab, sounds, hardness,
|
||||
double_description)
|
||||
mcl_stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds, hardness)
|
||||
double_description, corner_stair_texture_override)
|
||||
mcl_stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds, hardness, corner_stair_texture_override)
|
||||
mcl_stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds, hardness, double_description)
|
||||
end
|
||||
|
||||
-- Very simple registration function
|
||||
-- Makes stair and slab out of a source node
|
||||
function mcl_stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab, desc_double_slab)
|
||||
function mcl_stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab, desc_double_slab, corner_stair_texture_override)
|
||||
local def = minetest.registered_nodes[sourcenode]
|
||||
local groups = {}
|
||||
-- Only allow a strict set of groups to be added to stairs and slabs for more predictable results
|
||||
|
@ -331,6 +331,6 @@ function mcl_stairs.register_stair_and_slab_simple(subname, sourcenode, desc_sta
|
|||
groups[allowed_groups[a]] = def.groups[allowed_groups[a]]
|
||||
end
|
||||
end
|
||||
mcl_stairs.register_stair_and_slab(subname, sourcenode, groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness, desc_double_slab)
|
||||
mcl_stairs.register_stair_and_slab(subname, sourcenode, groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness, desc_double_slab, corner_stair_texture_override)
|
||||
end
|
||||
|
||||
|
|
|
@ -208,17 +208,25 @@ function mcl_stairs.cornerstair.add(name, stairtiles)
|
|||
local outer_tiles
|
||||
local inner_tiles
|
||||
if stairtiles == "woodlike" then
|
||||
outer_tiles = table.copy(node_def.tiles)
|
||||
inner_tiles = table.copy(node_def.tiles)
|
||||
for i=2,6 do
|
||||
if outer_tiles[i] == nil then
|
||||
outer_tiles[i] = outer_tiles[i-1]
|
||||
end
|
||||
if inner_tiles[i] == nil then
|
||||
inner_tiles[i] = inner_tiles[i-1]
|
||||
end
|
||||
end
|
||||
local t = node_def.tiles[1]
|
||||
outer_tiles = {
|
||||
t.."^("..t.."^[transformR90^mcl_stairs_turntexture.png^[makealpha:255,0,255)",
|
||||
t.."^("..t.."^mcl_stairs_turntexture.png^[transformR270^[makealpha:255,0,255)",
|
||||
t
|
||||
}
|
||||
inner_tiles = {
|
||||
t.."^("..t.."^[transformR90^(mcl_stairs_turntexture.png^[transformR180)^[makealpha:255,0,255)",
|
||||
t.."^("..t.."^[transformR270^(mcl_stairs_turntexture.png^[transformR90)^[makealpha:255,0,255)",
|
||||
t
|
||||
}
|
||||
outer_tiles[1] = t.."^("..t.."^[transformR90^mcl_stairs_turntexture.png^[makealpha:255,0,255)"
|
||||
outer_tiles[2] = t.."^("..t.."^mcl_stairs_turntexture.png^[transformR270^[makealpha:255,0,255)"
|
||||
inner_tiles[1] = t.."^("..t.."^[transformR90^(mcl_stairs_turntexture.png^[transformR180)^[makealpha:255,0,255)"
|
||||
inner_tiles[2] = t.."^("..t.."^[transformR270^(mcl_stairs_turntexture.png^[transformR90)^[makealpha:255,0,255)"
|
||||
for i=3,6 do
|
||||
-- outer_tiles[i] = t
|
||||
-- inner_tiles[i] = t
|
||||
end
|
||||
elseif stairtiles == nil or stairtiles == "default" then
|
||||
outer_tiles = node_def.tiles
|
||||
inner_tiles = node_def.tiles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue