Fix cut woodframe glass if workbench is off
This commit is contained in:
parent
e4f91d5c71
commit
d76b478b9f
@ -68,6 +68,23 @@ local function xdecor_stairs_alternative(nodename, def)
|
||||
}
|
||||
)
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
local custom_tiles = xdecor.glasscuts[nodename]
|
||||
if custom_tiles and (custom_tiles.slab or custom_tiles.stair) then
|
||||
if custom_tiles.stair then
|
||||
stairs.register_stair(name, nodename,
|
||||
def.groups, custom_tiles.stair, S("@1 Stair", def.description),
|
||||
def.sounds)
|
||||
stairs.register_stair_inner(name, nodename,
|
||||
def.groups, custom_tiles.stair_inner, "", def.sounds, nil, S("Inner @1 Stair", def.description))
|
||||
stairs.register_stair_outer(name, nodename,
|
||||
def.groups, custom_tiles.stair_outer, "", def.sounds, nil, S("Outer @1 Stair", def.description))
|
||||
end
|
||||
if custom_tiles.slab then
|
||||
stairs.register_slab(name, nodename,
|
||||
def.groups, custom_tiles.slab, S("@1 Slab", def.description),
|
||||
def.sounds)
|
||||
end
|
||||
else
|
||||
stairs.register_stair_and_slab(name,nodename,
|
||||
def.groups,
|
||||
def.tiles,
|
||||
@ -77,6 +94,7 @@ local function xdecor_stairs_alternative(nodename, def)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function xdecor.register(name, def)
|
||||
def.drawtype = def.drawtype or (def.mesh and "mesh") or (def.node_box and "nodebox")
|
||||
|
1
init.lua
1
init.lua
@ -3,6 +3,7 @@
|
||||
xdecor = {}
|
||||
local modpath = minetest.get_modpath("xdecor")
|
||||
|
||||
dofile(modpath .. "/handlers/glasscut.lua")
|
||||
dofile(modpath .. "/handlers/animations.lua")
|
||||
dofile(modpath .. "/handlers/helpers.lua")
|
||||
dofile(modpath .. "/handlers/nodeboxes.lua")
|
||||
|
@ -1,5 +1,3 @@
|
||||
dofile(minetest.get_modpath("xdecor") .. "/src/glasscut.lua")
|
||||
|
||||
local workbench = {}
|
||||
local nodes = {}
|
||||
|
||||
@ -325,9 +323,9 @@ for i = 1, #nodes do
|
||||
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)
|
||||
groups, custom_tiles.stair_inner, "", def.sounds, nil, S("Inner @1 Stair", def.description))
|
||||
stairs.register_stair_outer(item_name, node,
|
||||
groups, custom_tiles.stair_outer, "", def.sounds)
|
||||
groups, custom_tiles.stair_outer, "", def.sounds, nil, S("Outer @1 Stair", def.description))
|
||||
end
|
||||
if custom_tiles.slab then
|
||||
stairs.register_slab(item_name, node,
|
||||
|
Loading…
Reference in New Issue
Block a user