clean up code
This commit is contained in:
parent
b49050e1ca
commit
a3541be25c
64
api.lua
64
api.lua
@ -1,6 +1,6 @@
|
||||
fachwerk.register_fachwerk = function(basename, texture, description, craft_from)
|
||||
|
||||
local group_def = {choppy = 2,oddly_breakable_by_hand = 2,cracky = 3};
|
||||
local group_def = {choppy = 2, oddly_breakable_by_hand = 2, cracky = 3};
|
||||
|
||||
minetest.register_node("fachwerk:"..basename, {
|
||||
description = "Timber-framed "..description,
|
||||
@ -25,7 +25,7 @@ fachwerk.register_fachwerk = function(basename, texture, description, craft_from
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
|
||||
-- TODO: is this one really needed? the node above covers most of that already
|
||||
minetest.register_node("fachwerk:"..basename.."_2", {
|
||||
description = "Timber-framed "..description.." oblique beam 2",
|
||||
@ -54,49 +54,37 @@ fachwerk.register_fachwerk = function(basename, texture, description, craft_from
|
||||
-- yields 2; after all we did add a lot of wood
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.." 8",
|
||||
recipe = { { "group:wood","group:wood","group:wood" },
|
||||
{ "group:wood", craft_from,"group:wood" },
|
||||
{ "group:wood","group:wood","group:wood" },
|
||||
} });
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", craft_from, "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_cross 8",
|
||||
recipe = { { "group:wood",craft_from,"group:wood" },
|
||||
{ craft_from, "group:wood",craft_from },
|
||||
{ "group:wood",craft_from,"group:wood" },
|
||||
} });
|
||||
recipe = {
|
||||
{"group:wood", craft_from, "group:wood"},
|
||||
{craft_from, "group:wood", craft_from},
|
||||
{"group:wood", craft_from, "group:wood"},
|
||||
}
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_1 8",
|
||||
recipe = { { craft_from,"group:wood", craft_from},
|
||||
{ craft_from, craft_from, craft_from},
|
||||
{ "group:wood", craft_from, craft_from},
|
||||
} });
|
||||
recipe = {
|
||||
{craft_from,"group:wood", craft_from},
|
||||
{craft_from, craft_from, craft_from},
|
||||
{"group:wood", craft_from, craft_from},
|
||||
}
|
||||
});
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_2 8",
|
||||
recipe = { { craft_from, craft_from,"group:wood"},
|
||||
{ craft_from, craft_from, craft_from },
|
||||
{ craft_from,"group:wood" ,craft_from },
|
||||
} });
|
||||
|
||||
-- chain of craft receipes to convert nodes into each other
|
||||
|
||||
--[[minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_1",
|
||||
recipe = { {"fachwerk:"..basename }} });
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_2",
|
||||
recipe = { {"fachwerk:"..basename.."_1" }} });
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename.."_cross",
|
||||
recipe = { {"fachwerk:"..basename.."_2" }} });
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fachwerk:"..basename,
|
||||
recipe = { {"fachwerk:"..basename.."_cross" }} });
|
||||
]]
|
||||
|
||||
recipe = {
|
||||
{craft_from, craft_from, "group:wood"},
|
||||
{craft_from, craft_from, craft_from },
|
||||
{craft_from, "group:wood", craft_from},
|
||||
}
|
||||
});
|
||||
end
|
||||
|
28
nodes.lua
28
nodes.lua
@ -1,22 +1,24 @@
|
||||
-- Node id texturedescription crafting recepie
|
||||
-- fachwerk_ Timber-framed ...
|
||||
-- Node id texturedescription crafting recepie
|
||||
-- fachwerk_ Timber-framed ...
|
||||
|
||||
fachwerk.register_fachwerk( 'clay', 'default_clay.png', 'clay', 'default:clay' );
|
||||
fachwerk.register_fachwerk( 'brick', 'default_brick.png', 'bricks', 'default:brick' );
|
||||
fachwerk.register_fachwerk( 'stone_brick', 'default_stone_brick.png', 'stone bricks', 'default:stonebrick' );
|
||||
fachwerk.register_fachwerk( "clay", "default_clay.png", "clay", "default:clay" );
|
||||
fachwerk.register_fachwerk( "brick", "default_brick.png", "bricks", "default:brick" );
|
||||
fachwerk.register_fachwerk( "stone_brick", "default_stone_brick.png", "stone bricks", "default:stonebrick" );
|
||||
|
||||
fachwerk.register_fachwerk( 'cobble', 'default_cobble.png', 'cobble', 'default:cobble' );
|
||||
fachwerk.register_fachwerk( 'stone', 'default_stone.png', 'stone', 'default:stone' );
|
||||
fachwerk.register_fachwerk( "cobble", "default_cobble.png", "cobble", "default:cobble" );
|
||||
fachwerk.register_fachwerk( "stone", "default_stone.png", "stone", "default:stone" );
|
||||
|
||||
fachwerk.register_fachwerk( "stone", "default_stone.png", "stone", "default:stone" );
|
||||
|
||||
-- optional fachwerk types you can enable if you like
|
||||
--[[
|
||||
|
||||
fachwerk.register_fachwerk( 'desert_stone','default_desert_stone.png','desert stone', 'default:desert_stone' );
|
||||
fachwerk.register_fachwerk( 'white', 'wool_white.png', 'white', 'wool:white' );
|
||||
fachwerk.register_fachwerk( 'grey', 'wool_grey.png', 'grey', 'wool:grey' );
|
||||
fachwerk.register_fachwerk( 'yellow', 'wool_yellow.png', 'yellow', 'wool:yellow' );
|
||||
fachwerk.register_fachwerk( 'wood', 'default_wood.png', 'wood', 'default:wood' );
|
||||
fachwerk.register_fachwerk( 'junglewood', 'default_junglewood.png', 'junglewood', 'default:junglewood' );
|
||||
fachwerk.register_fachwerk( "desert_stone","default_desert_stone.png","desert stone", "default:desert_stone" );
|
||||
fachwerk.register_fachwerk( "white", "wool_white.png", "white", "wool:white" );
|
||||
fachwerk.register_fachwerk( "grey", "wool_grey.png", "grey", "wool:grey" );
|
||||
fachwerk.register_fachwerk( "yellow", "wool_yellow.png", "yellow", "wool:yellow" );
|
||||
fachwerk.register_fachwerk( "wood", "default_wood.png", "wood", "default:wood" );
|
||||
fachwerk.register_fachwerk( "junglewood", "default_junglewood.png", "junglewood", "default:junglewood" );
|
||||
]]
|
||||
|
||||
--nodes wich are not supported by the api
|
||||
|
Loading…
Reference in New Issue
Block a user