add basic crafts

This commit is contained in:
wsor 2021-03-27 23:30:47 -04:00
parent ad723ea616
commit d93400ae86
4 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,39 @@
minetest.register_craft({
output = "fl_terrain:condensed_ice",
recipe = {
{"fl_terrain:ice", "fl_terrain:ice"},
{"fl_terrain:ice", "fl_terrain:ice"},
}
})
minetest.register_craft({
output = "fl_terrain:coal_block",
recipe = {
{"fl_terrain:coal_ore", "fl_terrain:coal_ore", "fl_terrain:coal_ore"},
{"fl_terrain:coal_ore", "fl_terrain:coal_ore", "fl_terrain:coal_ore"},
{"fl_terrain:coal_ore", "fl_terrain:coal_ore", "fl_terrain:coal_ore"},
}
})
minetest.register_craft({
output = "fl_terrain:diamond_block",
recipe = {
{"fl_terrain:diamond_ore", "fl_terrain:diamond_ore", "fl_terrain:diamond_ore"},
{"fl_terrain:diamond_ore", "fl_terrain:diamond_ore", "fl_terrain:diamond_ore"},
{"fl_terrain:diamond_ore", "fl_terrain:diamond_ore", "fl_terrain:diamond_ore"},
}
})
minetest.register_craft({
output = "fl_terrain:snow_block",
recipe = {
{"fl_terrain:snow", "fl_terrain:snow", "fl_terrain:snow"},
{"fl_terrain:snow", "", "fl_terrain:snow"},
{"fl_terrain:snow", "fl_terrain:snow", "fl_terrain:snow"},
}
})
minetest.register_craft({
output = "fl_terrain:snow 8",
recipe = {{"fl_terrain:snow_block",}}
})

View File

@ -4,4 +4,5 @@ dofile(modpath .. "/stones.lua")
dofile(modpath .. "/ores.lua")
dofile(modpath .. "/liquids.lua")
dofile(modpath .. "/topsoil.lua")
dofile(modpath .. "/other.lua")
dofile(modpath .. "/other.lua")
dofile(modpath .. "/crafts.lua")

View File

@ -11,6 +11,7 @@ minetest.register_node("fl_terrain:desert_stone", {
local function create_stone_types(name, groups)
local gp = groups or {oddly_breakable_by_hand = 3}
--node registration
minetest.register_node("fl_terrain:" .. name .. "_rubble", {
description = name .. " rubble",
tiles = {"farlands_" .. name .. "_rubble.png"},
@ -33,6 +34,23 @@ local function create_stone_types(name, groups)
groups = gp,
})
--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},
}
})
end
create_stone_types("stone")

View File

@ -4,6 +4,7 @@ local function tree_nodes(name, tgroup, lgroup, pgroup)
local pgp = pgroup or {oddly_breakable_by_hand = 3, wood_related = 1, plank = 1}
minetest.register_node("fl_trees:" .. name .. "_trunk", {
--nodes
description = name .. " tree trunk",
tiles = {
"farlands_" .. name .. "_trunk_top.png",
@ -29,6 +30,12 @@ local function tree_nodes(name, tgroup, lgroup, pgroup)
groups = pgp,
on_place = minetest.rotate_node
})
--crafts
minetest.register_craft({
output = "fl_trees:" .. name .. "_plank 4",
recipe = {{"fl_trees:" .. name .. "_trunk",}}
})
end
tree_nodes("acacia")