From: Perttu Ahola Date: Fri, 25 Nov 2011 20:06:50 +0000 (+0200) Subject: Fix random node definition stuff X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=425db289d59d6c9b9be29334a42c1bbb82fab87f;p=zefram%2Fminetest%2Fminetest_engine.git Fix random node definition stuff --- diff --git a/data/builtin.lua b/data/builtin.lua index ead1ed3a..4a7678a2 100644 --- a/data/builtin.lua +++ b/data/builtin.lua @@ -84,7 +84,7 @@ minetest.register_node("air", { walkable = false, pointable = false, diggable = false, - buildable_to = false, + buildable_to = true, air_equivalent = true, }) diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 3e451b64..d311c4f6 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -628,9 +628,9 @@ function inventorycube(img1, img2, img3) img2 = img2 or img1 img3 = img3 or img1 return "[inventorycube" - .. "{" .. img1:gsub("^", "&") - .. "{" .. img2:gsub("^", "&") - .. "{" .. img3:gsub("^", "&") + .. "{" .. img1:gsub("%^", "&") + .. "{" .. img2:gsub("%^", "&") + .. "{" .. img3:gsub("%^", "&") end -- Legacy nodes @@ -642,6 +642,7 @@ minetest.register_node("stone", { is_ground_content = true, often_contains_mineral = true, -- Texture atlas hint material = digprop_stonelike(1.0), + dug_item = 'NodeItem "cobble" 1', }) minetest.register_node("dirt_with_grass", { @@ -649,6 +650,7 @@ minetest.register_node("dirt_with_grass", { inventory_image = inventorycube("mud.png^grass_side.png"), is_ground_content = true, material = digprop_dirtlike(1.0), + dug_item = 'NodeItem "dirt" 1', }) minetest.register_node("dirt_with_grass_footsteps", { diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index a5454bea..a6ac4a0f 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -497,6 +497,9 @@ static int l_register_node(lua_State *L) // Default to getting the corresponding NodeItem when dug f.dug_item = std::string("NodeItem \"")+name+"\" 1"; + + // Default to unknown_block.png as all textures + f.setAllTextures("unknown_block.png"); /* Read definiton from Lua