2021-04-18 21:54:18 -04:00
|
|
|
local modpath = minetest.get_modpath("fl_stone")
|
|
|
|
dofile(modpath .. "/other.lua")
|
2021-03-22 11:29:28 -04:00
|
|
|
|
|
|
|
local function create_stone_types(name, groups)
|
|
|
|
local gp = groups or {oddly_breakable_by_hand = 3}
|
|
|
|
|
2021-03-27 23:30:47 -04:00
|
|
|
--node registration
|
2021-04-18 21:54:18 -04:00
|
|
|
minetest.register_node(":fl_terrain:" .. name .. "_rubble", {
|
2021-03-22 11:29:28 -04:00
|
|
|
description = name .. " rubble",
|
|
|
|
tiles = {"farlands_" .. name .. "_rubble.png"},
|
|
|
|
groups = gp,
|
|
|
|
})
|
2021-04-18 21:54:18 -04:00
|
|
|
minetest.register_node(":fl_terrain:" .. name, {
|
2021-03-22 11:29:28 -04:00
|
|
|
description = name,
|
|
|
|
tiles = {"farlands_" .. name .. ".png"},
|
|
|
|
drop = "fl_terrain:" .. name .. "_rubble",
|
|
|
|
groups = gp,
|
|
|
|
})
|
2021-04-18 21:54:18 -04:00
|
|
|
minetest.register_node(":fl_terrain:" .. name .. "_block", {
|
2021-03-22 11:29:28 -04:00
|
|
|
description = name .. " block",
|
|
|
|
tiles = {"farlands_" .. name .. "_block.png"},
|
|
|
|
groups = gp,
|
|
|
|
})
|
2021-04-18 21:54:18 -04:00
|
|
|
minetest.register_node(":fl_terrain:" .. name .. "_brick", {
|
2021-03-22 11:29:28 -04:00
|
|
|
description = name .. " brick",
|
|
|
|
tiles = {"farlands_" .. name .. "_brick.png"},
|
|
|
|
groups = gp,
|
|
|
|
})
|
|
|
|
|
2021-03-27 23:30:47 -04:00
|
|
|
--craft registration
|
|
|
|
local coreN = "fl_terrain:" .. name
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "fl_terrain:" .. name .. "_block",
|
|
|
|
recipe = {
|
|
|
|
{coreN, coreN, coreN},
|
|
|
|
{coreN, coreN, coreN},
|
|
|
|
{coreN, coreN, coreN},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "fl_terrain:" .. name .. "_brick",
|
|
|
|
recipe = {
|
|
|
|
{coreN, coreN},
|
|
|
|
{coreN, coreN},
|
|
|
|
}
|
|
|
|
})
|
2021-03-22 11:29:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
create_stone_types("stone")
|
|
|
|
create_stone_types("ors")
|
|
|
|
create_stone_types("tuff")
|
|
|
|
create_stone_types("basalt")
|
|
|
|
create_stone_types("gneiss")
|
|
|
|
create_stone_types("desert_stone")
|