diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-17 02:28:46 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:48 +0200 |
commit | 9d5b458479a4eac14acb5af28f51ad23432264ab (patch) | |
tree | 76c90e2f88be617ca4fc8e1c0772f27207f8eacd /data | |
parent | 8dd3622c6d3c85adbb293eacf61f76c1118c9255 (diff) | |
download | minetest-9d5b458479a4eac14acb5af28f51ad23432264ab.tar.gz minetest-9d5b458479a4eac14acb5af28f51ad23432264ab.tar.bz2 minetest-9d5b458479a4eac14acb5af28f51ad23432264ab.zip |
Crafting definition in scripts
Diffstat (limited to 'data')
-rw-r--r-- | data/mods/default/init.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index c2e1d3300..a0b381fb1 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -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, |