1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Crafting definition in scripts

This commit is contained in:
Perttu Ahola 2011-11-17 02:28:46 +02:00
parent 8dd3622c6d
commit 9d5b458479
12 changed files with 634 additions and 57 deletions

View file

@ -321,6 +321,29 @@ minetest.register_node("somenode", {
inventory_image = "treeprop.png"
})
minetest.register_node("TNT", {
tile_images = {"tnt_top.png", "tnt_bottom.png", "tnt_side.png", "tnt_side.png", "tnt_side.png", "tnt_side.png"},
inventory_image = "tnt_side.png"
})
minetest.register_craft({
output = 'ToolItem "STPick" 4',
recipe = {
{'NodeItem "cobble" 1', 'NodeItem "cobble" 1', 'NodeItem "cobble" 1'},
{'', 'CraftItem "Stick"', ''},
{'', 'CraftItem "Stick"', ''},
}
})
minetest.register_craft({
output = 'NodeItem "TNT" 4',
recipe = {
{'NodeItem "wood" 1'},
{'CraftItem "lump_of_coal" 1'},
{'NodeItem "wood" 1'}
}
})
local TNT = {
-- Maybe handle gravity and collision this way? dunno
physical = true,