1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-17 14:55:13 -05:00

Fix random node definition stuff

This commit is contained in:
Perttu Ahola 2011-11-25 22:06:50 +02:00
parent d2eed169ae
commit 425db289d5
3 changed files with 9 additions and 4 deletions

View File

@ -84,7 +84,7 @@ minetest.register_node("air", {
walkable = false, walkable = false,
pointable = false, pointable = false,
diggable = false, diggable = false,
buildable_to = false, buildable_to = true,
air_equivalent = true, air_equivalent = true,
}) })

View File

@ -628,9 +628,9 @@ function inventorycube(img1, img2, img3)
img2 = img2 or img1 img2 = img2 or img1
img3 = img3 or img1 img3 = img3 or img1
return "[inventorycube" return "[inventorycube"
.. "{" .. img1:gsub("^", "&") .. "{" .. img1:gsub("%^", "&")
.. "{" .. img2:gsub("^", "&") .. "{" .. img2:gsub("%^", "&")
.. "{" .. img3:gsub("^", "&") .. "{" .. img3:gsub("%^", "&")
end end
-- Legacy nodes -- Legacy nodes
@ -642,6 +642,7 @@ minetest.register_node("stone", {
is_ground_content = true, is_ground_content = true,
often_contains_mineral = true, -- Texture atlas hint often_contains_mineral = true, -- Texture atlas hint
material = digprop_stonelike(1.0), material = digprop_stonelike(1.0),
dug_item = 'NodeItem "cobble" 1',
}) })
minetest.register_node("dirt_with_grass", { minetest.register_node("dirt_with_grass", {
@ -649,6 +650,7 @@ minetest.register_node("dirt_with_grass", {
inventory_image = inventorycube("mud.png^grass_side.png"), inventory_image = inventorycube("mud.png^grass_side.png"),
is_ground_content = true, is_ground_content = true,
material = digprop_dirtlike(1.0), material = digprop_dirtlike(1.0),
dug_item = 'NodeItem "dirt" 1',
}) })
minetest.register_node("dirt_with_grass_footsteps", { minetest.register_node("dirt_with_grass_footsteps", {

View File

@ -497,6 +497,9 @@ static int l_register_node(lua_State *L)
// Default to getting the corresponding NodeItem when dug // Default to getting the corresponding NodeItem when dug
f.dug_item = std::string("NodeItem \"")+name+"\" 1"; 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 Read definiton from Lua