Merge c347f239d6
into 6c9550e2c5
This commit is contained in:
commit
ac9b0424db
|
@ -21,12 +21,14 @@ circular_saw.known_stairs = setmetatable({}, {
|
||||||
circular_saw.known_nodes = {}
|
circular_saw.known_nodes = {}
|
||||||
|
|
||||||
-- How many microblocks does this shape at the output inventory cost:
|
-- How many microblocks does this shape at the output inventory cost:
|
||||||
|
-- It may cause slight loss, but no gain.
|
||||||
circular_saw.cost_in_microblocks = {
|
circular_saw.cost_in_microblocks = {
|
||||||
1, 1, 1, 1, 1, 1, 1, 2,
|
1, 1, 1, 1, 1, 1, 1, 2,
|
||||||
2, 3, 2, 4, 2, 4, 5, 6,
|
2, 3, 2, 4, 2, 4, 5, 6,
|
||||||
7, 1, 1, 2, 4, 6, 7, 8,
|
7, 1, 1, 2, 4, 6, 7, 8,
|
||||||
3, 1, 1, 2, 4, 4, 2, 7,
|
3, 1, 1, 2, 4, 4, 2, 6,
|
||||||
7, 2, 7, 6, 4, 6, 5, 4,
|
7, 3, 7, 7, 4, 8, 3, 2,
|
||||||
|
6, 2, 1, 3, 4
|
||||||
}
|
}
|
||||||
|
|
||||||
circular_saw.names = {
|
circular_saw.names = {
|
||||||
|
@ -65,11 +67,16 @@ circular_saw.names = {
|
||||||
{"slope", "_inner"},
|
{"slope", "_inner"},
|
||||||
{"slope", "_inner_half"},
|
{"slope", "_inner_half"},
|
||||||
{"slope", "_inner_half_raised"},
|
{"slope", "_inner_half_raised"},
|
||||||
|
{"slope", "_inner_cut"},
|
||||||
|
{"slope", "_inner_cut_half"},
|
||||||
|
{"slope", "_inner_cut_half_raised"},
|
||||||
{"slope", "_outer"},
|
{"slope", "_outer"},
|
||||||
{"slope", "_outer_half"},
|
{"slope", "_outer_half"},
|
||||||
{"slope", "_outer_half_raised"},
|
{"slope", "_outer_half_raised"},
|
||||||
{"slope", "_outer_cut"},
|
{"slope", "_outer_cut"},
|
||||||
{"slope", "_outer_cut_half"},
|
{"slope", "_outer_cut_half"},
|
||||||
|
{"slope", "_outer_cut_half_raised"},
|
||||||
|
{"slope", "_cut"},
|
||||||
}
|
}
|
||||||
|
|
||||||
function circular_saw:get_cost(inv, stackname)
|
function circular_saw:get_cost(inv, stackname)
|
||||||
|
@ -303,7 +310,7 @@ gui_slots = "listcolors[#606060AA;#808080;#101010;#202020;#FFF]"
|
||||||
function circular_saw.on_construct(pos)
|
function circular_saw.on_construct(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
|
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
|
||||||
meta:set_string("formspec", "size[11,9]"..fancy_inv..
|
meta:set_string("formspec", "size[11,10]"..fancy_inv..
|
||||||
"label[0,0;" ..S("Input\nmaterial").. "]" ..
|
"label[0,0;" ..S("Input\nmaterial").. "]" ..
|
||||||
"list[current_name;input;1.5,0;1,1;]" ..
|
"list[current_name;input;1.5,0;1,1;]" ..
|
||||||
"label[0,1;" ..S("Left-over").. "]" ..
|
"label[0,1;" ..S("Left-over").. "]" ..
|
||||||
|
@ -312,8 +319,8 @@ function circular_saw.on_construct(pos)
|
||||||
"list[current_name;recycle;1.5,2;1,1;]" ..
|
"list[current_name;recycle;1.5,2;1,1;]" ..
|
||||||
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
|
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
|
||||||
"button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
|
"button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
|
||||||
"list[current_name;output;2.8,0;8,5;]" ..
|
"list[current_name;output;2.8,0;8,6;]" ..
|
||||||
"list[current_player;main;1.5,5.25;8,4;]")
|
"list[current_player;main;1.5,6.25;8,4;]")
|
||||||
|
|
||||||
meta:set_int("anz", 0) -- No microblocks inside yet.
|
meta:set_int("anz", 0) -- No microblocks inside yet.
|
||||||
meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
|
meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
|
||||||
|
@ -323,7 +330,7 @@ function circular_saw.on_construct(pos)
|
||||||
inv:set_size("input", 1) -- Input slot for full blocks of material x.
|
inv:set_size("input", 1) -- Input slot for full blocks of material x.
|
||||||
inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks.
|
inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks.
|
||||||
inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here.
|
inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here.
|
||||||
inv:set_size("output", 5*8) -- 5x8 versions of stair-parts of material x.
|
inv:set_size("output", 6*8) -- 6x8 versions of stair-parts of material x.
|
||||||
|
|
||||||
circular_saw:reset(pos)
|
circular_saw:reset(pos)
|
||||||
end
|
end
|
||||||
|
|
|
@ -85,40 +85,66 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||||
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
||||||
|
|
||||||
-- Some saw-less recipes:
|
-- Some saw-less recipes:
|
||||||
|
|
||||||
|
-- chopping into microblocks
|
||||||
|
|
||||||
|
-- full block minus 1 microblock
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":micro_" .. subname .. " 7",
|
output = modname .. ":micro_" .. subname .. " 7",
|
||||||
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- stair
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = modname .. ":micro_" .. subname .. " 6",
|
output = modname .. ":micro_" .. subname .. " 6",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {modname .. ":stair_" .. subname},
|
recipe = {modname .. ":stair_" .. subname},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- slab + 1 microblock
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":micro_" .. subname .. " 5",
|
output = modname .. ":micro_" .. subname .. " 5",
|
||||||
recipe = {modname .. ":stair_" .. subname .. "_outer"},
|
recipe = {modname .. ":stair_" .. subname .. "_outer"},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- slab
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":micro_" .. subname .. " 4",
|
output = modname .. ":micro_" .. subname .. " 4",
|
||||||
recipe = {modname .. ":slab_" .. subname},
|
recipe = {modname .. ":slab_" .. subname},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- right half stair
|
||||||
|
-- NOTE: this is circular crafting rule:
|
||||||
|
-- 3 microblocks -> left half stair -> right half stair -> 3 microblocks
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = modname .. ":micro_" .. subname .. " 3",
|
||||||
|
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- panel
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":micro_" .. subname .. " 2",
|
output = modname .. ":micro_" .. subname .. " 2",
|
||||||
recipe = {modname .. ":panel_" .. subname},
|
recipe = {modname .. ":panel_" .. subname},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- coupling microblocks back to full block
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = recipeitem,
|
output = recipeitem,
|
||||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
recipe = {
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
modname .. ":micro_" .. subname,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,43 +22,43 @@ end
|
||||||
|
|
||||||
function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||||
local defs = {
|
local defs = {
|
||||||
[""] = {
|
[""] = { -- 8/16 high (default panel)
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_1"] = {
|
["_1"] = { -- 1/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_2"] = {
|
["_2"] = { -- 2/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_4"] = {
|
["_4"] = { -- 4/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_12"] = {
|
["_12"] = { -- 12/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_14"] = {
|
["_14"] = { -- 14/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["_15"] = {
|
["_15"] = { -- 15/16 high
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
|
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
|
||||||
|
@ -85,6 +85,7 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||||
|
|
||||||
-- Some saw-less recipes:
|
-- Some saw-less recipes:
|
||||||
|
|
||||||
|
-- 3 blocks shaped to stair -> 12 panels
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = modname .. ":panel_" .. subname .. " 12",
|
output = modname .. ":panel_" .. subname .. " 12",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -93,6 +94,7 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- mirrored rule from above
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = modname .. ":panel_" .. subname .. " 12",
|
output = modname .. ":panel_" .. subname .. " 12",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -101,12 +103,14 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- 2 microblocks -> panel
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":panel_" .. subname,
|
output = modname .. ":panel_" .. subname,
|
||||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- 4 panels -> full block
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = recipeitem,
|
output = recipeitem,
|
||||||
|
|
|
@ -36,18 +36,25 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||||
for _, name in pairs(default_nodes) do
|
for _, name in pairs(default_nodes) do
|
||||||
local nodename = "default:" .. name
|
local nodename = "default:" .. name
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
|
|
||||||
if ndef then
|
if ndef then
|
||||||
local groups = {}
|
local groups = {}
|
||||||
for k, v in pairs(ndef.groups)
|
|
||||||
|
for k, v in pairs(ndef.groups) do
|
||||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||||
do if k ~= "wood" and k ~= "stone" then
|
if k ~= "wood" and k ~= "stone" then
|
||||||
groups[k] = v
|
groups[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local drop
|
local drop
|
||||||
|
|
||||||
|
-- Take string part after "default:" since we want to register
|
||||||
|
-- things in microblocks namespace instead of default
|
||||||
if type(ndef.drop) == "string" then
|
if type(ndef.drop) == "string" then
|
||||||
drop = ndef.drop:sub(9)
|
drop = ndef.drop:sub(9)
|
||||||
end
|
end
|
||||||
|
|
||||||
stairsplus:register_all("moreblocks", name, nodename, {
|
stairsplus:register_all("moreblocks", name, nodename, {
|
||||||
description = ndef.description,
|
description = ndef.description,
|
||||||
drop = drop,
|
drop = drop,
|
||||||
|
@ -58,4 +65,3 @@ for _, name in pairs(default_nodes) do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,39 +55,45 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||||
|
|
||||||
-- Some saw-less recipes:
|
-- Some saw-less recipes:
|
||||||
|
|
||||||
minetest.register_craft({
|
-- 3 full blocks -> 6 slabs
|
||||||
output = modname .. ":slab_" .. subname .. " 6",
|
minetest.register_craft({
|
||||||
recipe = {{recipeitem, recipeitem, recipeitem}},
|
output = modname .. ":slab_" .. subname .. " 6",
|
||||||
})
|
recipe = {{recipeitem, recipeitem, recipeitem}},
|
||||||
|
})
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
-- 4 microblocks -> slab
|
||||||
output = modname .. ":slab_" .. subname,
|
minetest.register_craft({
|
||||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
type = "shapeless",
|
||||||
})
|
output = modname .. ":slab_" .. subname,
|
||||||
|
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||||
minetest.register_craft({
|
})
|
||||||
output = modname .. ":slab_" .. subname,
|
|
||||||
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
-- 2 panels -> slab
|
||||||
})
|
minetest.register_craft({
|
||||||
|
output = modname .. ":slab_" .. subname,
|
||||||
minetest.register_craft({
|
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
||||||
output = modname .. ":slab_" .. subname,
|
})
|
||||||
recipe = {
|
|
||||||
{modname .. ":panel_" .. subname},
|
-- same as above but vertically
|
||||||
{modname .. ":panel_" .. subname},
|
minetest.register_craft({
|
||||||
},
|
output = modname .. ":slab_" .. subname,
|
||||||
})
|
recipe = {
|
||||||
|
{modname .. ":panel_" .. subname},
|
||||||
|
{modname .. ":panel_" .. subname},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
-- 2 slabs -> full block
|
||||||
type = "shapeless",
|
minetest.register_craft({
|
||||||
output = recipeitem,
|
type = "shapeless",
|
||||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
output = recipeitem,
|
||||||
})
|
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||||
|
})
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
-- 2 stairs -> 3 slabs
|
||||||
output = modname .. ":slab_" .. subname .. " 3",
|
minetest.register_craft({
|
||||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
type = "shapeless",
|
||||||
})
|
output = modname .. ":slab_" .. subname .. " 3",
|
||||||
|
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -235,248 +235,4 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||||
end
|
end
|
||||||
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
|
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Some saw-less recipes:
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. " 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":panel_" .. subname, "", ""},
|
|
||||||
{recipeitem, modname .. ":panel_" .. subname, ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":panel_" .. subname},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. " 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":panel_" .. subname},
|
|
||||||
{"", modname .. ":panel_" .. subname, recipeitem},
|
|
||||||
{modname .. ":panel_" .. subname, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half 10",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":panel_" .. subname, "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":panel_" .. subname},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half 10",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":panel_" .. subname},
|
|
||||||
{modname .. ":panel_" .. subname, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":panel_" .. subname, "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":panel_" .. subname},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":panel_" .. subname},
|
|
||||||
{modname .. ":panel_" .. subname, recipeitem, recipeitem},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
--===================================================== Inner ==
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", "", ""},
|
|
||||||
{recipeitem, modname .. ":stair_" .. subname .. "_half", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
{"", modname .. ":stair_" .. subname .. "_half", recipeitem},
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner_half 10",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner_half 10",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":stair_" .. subname .. "_half"},
|
|
||||||
{modname .. ":stair_" .. subname .. "_half", recipeitem, recipeitem},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
--===================================================== Outer ==
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":micro_" .. subname, "", ""},
|
|
||||||
{recipeitem, modname .. ":micro_" .. subname, ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":micro_" .. subname},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":micro_" .. subname},
|
|
||||||
{"", modname .. ":micro_" .. subname, recipeitem},
|
|
||||||
{modname .. ":micro_" .. subname, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_half 10",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":micro_" .. subname, "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":micro_" .. subname},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_half 10",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":micro_" .. subname},
|
|
||||||
{modname .. ":micro_" .. subname, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{modname .. ":micro_" .. subname, "", ""},
|
|
||||||
{recipeitem, recipeitem, modname .. ":micro_" .. subname},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised 7",
|
|
||||||
recipe = {
|
|
||||||
{"", "", modname .. ":micro_" .. subname},
|
|
||||||
{modname .. ":micro_" .. subname, recipeitem, recipeitem},
|
|
||||||
{recipeitem, recipeitem, recipeitem},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
--================================================= Shapeless ==
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = recipeitem,
|
|
||||||
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = recipeitem,
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_outer_cut"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = recipeitem,
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = recipeitem,
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
|
||||||
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slab_" .. subname,
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
|
||||||
modname .. ":slope_" .. subname .. "_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
|
||||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
|
|
||||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
|
|
||||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised",
|
|
||||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_cut_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_cut",
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_outer"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_cut_half",
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised",
|
|
||||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised"},
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -179,12 +179,6 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||||
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = modname .. ":stair_" .. subname .. "_half",
|
|
||||||
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = modname .. ":stair_" .. subname,
|
output = modname .. ":stair_" .. subname,
|
||||||
|
|
Loading…
Reference in New Issue