mirror of
https://notabug.org/TenPlus1/bakedclay.git
synced 2024-08-20 05:14:12 +02:00
Code tidy
This commit is contained in:
parent
3e0471d041
commit
780b2915c6
39
init.lua
39
init.lua
@ -1,21 +1,22 @@
|
|||||||
|
|
||||||
-- Baked Clay (0.4) by TenPlus1
|
-- Baked Clay (0.4) by TenPlus1
|
||||||
|
|
||||||
local clay = {
|
local clay = {
|
||||||
{"white", "White", "basecolor_white"},
|
{"white", "White"},
|
||||||
{"grey", "Grey", "basecolor_grey"},
|
{"grey", "Grey"},
|
||||||
{"black", "Black", "basecolor_black"},
|
{"black", "Black"},
|
||||||
{"red", "Red", "basecolor_red"},
|
{"red", "Red"},
|
||||||
{"yellow", "Yellow", "basecolor_yellow"},
|
{"yellow", "Yellow"},
|
||||||
{"green", "Green", "basecolor_green"},
|
{"green", "Green"},
|
||||||
{"cyan", "Cyan", "basecolor_cyan"},
|
{"cyan", "Cyan"},
|
||||||
{"blue", "Blue", "basecolor_blue"},
|
{"blue", "Blue"},
|
||||||
{"magenta", "Magenta", "basecolor_magenta"},
|
{"magenta", "Magenta"},
|
||||||
{"orange", "Orange", "excolor_orange"},
|
{"orange", "Orange"},
|
||||||
{"violet", "Violet", "excolor_violet"},
|
{"violet", "Violet"},
|
||||||
{"brown", "Brown", "unicolor_dark_orange"},
|
{"brown", "Brown"},
|
||||||
{"pink", "Pink", "unicolor_light_red"},
|
{"pink", "Pink"},
|
||||||
{"dark_grey", "Dark Grey", "unicolor_darkgrey"},
|
{"dark_grey", "Dark Grey"},
|
||||||
{"dark_green", "Dark Green", "unicolor_dark_green"},
|
{"dark_green", "Dark Green"},
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -24,21 +25,21 @@ minetest.register_craft({
|
|||||||
recipe = "default:clay",
|
recipe = "default:clay",
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, row in ipairs(clay) do
|
for _, row in pairs(clay) do
|
||||||
|
|
||||||
-- node definition
|
-- node definition
|
||||||
minetest.register_node("bakedclay:" .. row[1], {
|
minetest.register_node("bakedclay:" .. row[1], {
|
||||||
description = row[2] .. " Baked Clay",
|
description = row[2] .. " Baked Clay",
|
||||||
tiles = {"baked_clay_" .. row[1] ..".png"},
|
tiles = {"baked_clay_" .. row[1] ..".png"},
|
||||||
groups = {cracky=3, bakedclay=1},
|
groups = {cracky = 3, bakedclay = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- craft from dye and white clay
|
-- craft from dye and any baked clay
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "bakedclay:" .. row[1],
|
output = "bakedclay:" .. row[1],
|
||||||
recipe = {"group:dye," .. row[3], "group:bakedclay"},
|
recipe = {"dye:" .. row[1], "group:bakedclay"},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- register stair and slab
|
-- register stair and slab
|
||||||
|
Loading…
Reference in New Issue
Block a user