mirror of
https://notabug.org/TenPlus1/bakedclay.git
synced 2024-11-20 01:13:46 +01:00
Tidied code
This commit is contained in:
parent
793c12cbc5
commit
3e0471d041
8
init.lua
8
init.lua
@ -1,8 +1,6 @@
|
|||||||
-- Baked Clay (0.4) by TenPlus1
|
-- Baked Clay (0.4) by TenPlus1
|
||||||
|
|
||||||
local clay = {}
|
local clay = {
|
||||||
|
|
||||||
clay.dyes = {
|
|
||||||
{"white", "White", "basecolor_white"},
|
{"white", "White", "basecolor_white"},
|
||||||
{"grey", "Grey", "basecolor_grey"},
|
{"grey", "Grey", "basecolor_grey"},
|
||||||
{"black", "Black", "basecolor_black"},
|
{"black", "Black", "basecolor_black"},
|
||||||
@ -26,7 +24,7 @@ minetest.register_craft({
|
|||||||
recipe = "default:clay",
|
recipe = "default:clay",
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, row in ipairs(clay.dyes) do
|
for _, row in ipairs(clay) do
|
||||||
|
|
||||||
-- node definition
|
-- node definition
|
||||||
minetest.register_node("bakedclay:" .. row[1], {
|
minetest.register_node("bakedclay:" .. row[1], {
|
||||||
@ -44,6 +42,7 @@ for _, row in ipairs(clay.dyes) do
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- register stair and slab
|
-- register stair and slab
|
||||||
|
if stairs and not stairs.mod then
|
||||||
stairs.register_stair_and_slab("bakedclay_".. row[1], "bakedclay:".. row[1],
|
stairs.register_stair_and_slab("bakedclay_".. row[1], "bakedclay:".. row[1],
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"baked_clay_" .. row[1] .. ".png"},
|
{"baked_clay_" .. row[1] .. ".png"},
|
||||||
@ -51,6 +50,7 @@ for _, row in ipairs(clay.dyes) do
|
|||||||
"Baked Clay " .. row[2] .. " Slab",
|
"Baked Clay " .. row[2] .. " Slab",
|
||||||
default.node_sound_stone_defaults())
|
default.node_sound_stone_defaults())
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- register a few extra dye colour options
|
-- register a few extra dye colour options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user