forked from mtcontrib/coloredwood
Tidy code
This commit is contained in:
parent
e58317b58e
commit
7933350b60
17
init.lua
17
init.lua
|
@ -116,25 +116,16 @@ if coloredwood.enable_stairsplus then
|
||||||
or chk == "moreblocks:panel_woo"
|
or chk == "moreblocks:panel_woo"
|
||||||
or chk == "moreblocks:micro_woo"
|
or chk == "moreblocks:micro_woo"
|
||||||
or chk == "moreblocks:slope_woo"
|
or chk == "moreblocks:slope_woo"
|
||||||
and not string.find(i.name, "wood_tile") then
|
and not string.find(i.name, "wood_tile") then
|
||||||
|
|
||||||
local class = string.sub(i.name, 12, 15)
|
|
||||||
local shape = string.sub(i.name, 22)
|
|
||||||
|
|
||||||
table.insert(coloredwood_cuts, i.name)
|
table.insert(coloredwood_cuts, i.name)
|
||||||
|
|
||||||
if chk ~= "moreblocks:slab_wood" then
|
local class, shape = is_stairsplus(i.name, false)
|
||||||
class = string.sub(i.name, 12, 16)
|
|
||||||
shape = string.sub(i.name, 23)
|
|
||||||
end
|
|
||||||
|
|
||||||
local s1, s2 = is_stairsplus(i.name, false)
|
|
||||||
minetest.override_item(i.name, {
|
minetest.override_item(i.name, {
|
||||||
groups = groups2,
|
groups = groups2,
|
||||||
paramtype2 = "colorfacedir",
|
paramtype2 = "colorfacedir",
|
||||||
palette = "unifieddyes_palette_greys.png",
|
palette = "unifieddyes_palette_greys.png",
|
||||||
airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape,
|
airbrush_replacement_node = "coloredwood:"..class.."_wood_grey"..shape,
|
||||||
drop = "moreblocks:"..s1.."_wood"..s2 -- NALC: Fix stack division with moreblocks
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue