aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-25 16:34:12 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:51 +0200
commit18bb0ea1ead82406bcfb89ea14908a4d0063209e (patch)
tree2141a857259f68c0421ca4349d82711fef6c39e2 /data
parent6a8f9135de448d805457e0b1f561c711d760565e (diff)
downloadminetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.tar.gz
minetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.tar.bz2
minetest-18bb0ea1ead82406bcfb89ea14908a4d0063209e.zip
Mode node definition loading from Lua (still not finished), fix metadata creation from name
Diffstat (limited to 'data')
-rw-r--r--data/mods/default/init.lua50
1 files changed, 41 insertions, 9 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua
index b15315e24..dbc96381e 100644
--- a/data/mods/default/init.lua
+++ b/data/mods/default/init.lua
@@ -131,6 +131,10 @@ end
-- print("minetest dump: "..dump(minetest))
+--
+-- Tool definition
+--
+
minetest.register_tool("WPick", {
image = "tool_woodpick.png",
basetime = 2.0,
@@ -330,15 +334,9 @@ minetest.register_tool("horribletool", {
})
--]]
-minetest.register_node("somenode", {
- tile_images = {"lava.png", "mese.png", "stone.png", "grass.png", "cobble.png", "tree_top.png"},
- 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"
-})
+--
+-- Crafting definition
+--
minetest.register_craft({
output = 'NodeItem "wood" 4',
@@ -617,6 +615,40 @@ minetest.register_craft({
}
})
+minetest.register_craft({
+ output = 'NodeItem "somenode" 4',
+ recipe = {
+ {'CraftItem "Stick" 1'},
+ }
+})
+
+--
+-- Node definitions
+--
+
+minetest.register_node("somenode", {
+ tile_images = {"lava.png", "mese.png", "stone.png", "grass.png", "cobble.png", "tree_top.png"},
+ inventory_image = "treeprop.png",
+ material = {
+ diggability = "normal",
+ weight = 0,
+ crackiness = 0,
+ crumbliness = 0,
+ cuttability = 0,
+ flammability = 0
+ },
+ metadata_name = "chest",
+})
+
+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",
+ dug_item = '', -- Get nothing
+ material = {
+ diggability = "not",
+ },
+})
+
--
-- Some common functions
--