condense node defs for bathroom tiles

give slightly more meaningful filenames for their textures
This commit is contained in:
Vanessa Ezekowitz 2014-07-27 09:04:53 -04:00
parent c30fa31336
commit 8aeb2f1007
5 changed files with 24 additions and 58 deletions

View File

@ -1,64 +1,30 @@
local S = homedecor.gettext local S = homedecor.gettext
minetest.register_node("homedecor:tiles_1", { local bathroom_tile_colors = {
description = "Bathroom/kitchen tiles (shade #1)", { "1", "white/grey" },
tiles = { { "2", "white/dark grey" },
"homedecor_tiles1.png", { "3", "white/black" },
"homedecor_tiles1.png", { "4", "black/dark grey" },
"homedecor_tiles1.png", }
"homedecor_tiles1.png",
"homedecor_tiles1.png^[transformR90",
"homedecor_tiles1.png^[transformR90"
},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("homedecor:tiles_2", { for i in ipairs(bathroom_tile_colors) do
description = "Bathroom/kitchen tiles (shade #2)", local color = bathroom_tile_colors[i][1]
local shade = bathroom_tile_colors[i][2]
minetest.register_node("homedecor:tiles_"..color, {
description = "Bathroom/kitchen tiles ("..shade..")",
tiles = { tiles = {
"homedecor_tiles2.png", "homedecor_bathroom_tiles_"..color..".png",
"homedecor_tiles2.png", "homedecor_bathroom_tiles_"..color..".png",
"homedecor_tiles2.png", "homedecor_bathroom_tiles_"..color..".png",
"homedecor_tiles2.png", "homedecor_bathroom_tiles_"..color..".png",
"homedecor_tiles2.png^[transformR90", "homedecor_bathroom_tiles_"..color..".png^[transformR90",
"homedecor_tiles2.png^[transformR90" "homedecor_bathroom_tiles_"..color..".png^[transformR90"
}, },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
end
minetest.register_node("homedecor:tiles_3", {
description = "Bathroom/kitchen tiles (shade #3)",
tiles = {
"homedecor_tiles3.png",
"homedecor_tiles3.png",
"homedecor_tiles3.png",
"homedecor_tiles3.png",
"homedecor_tiles3.png^[transformR90",
"homedecor_tiles3.png^[transformR90"
},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("homedecor:tiles_4", {
description = "Bathroom/kitchen tiles (shade #4)",
tiles = {
"homedecor_tiles4.png",
"homedecor_tiles4.png",
"homedecor_tiles4.png",
"homedecor_tiles4.png",
"homedecor_tiles4.png^[transformR90",
"homedecor_tiles4.png^[transformR90"
},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("homedecor:towel_rod", { minetest.register_node("homedecor:towel_rod", {
description = "Towel rod with towel", description = "Towel rod with towel",

View File

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

View File

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

View File

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

View File

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 452 B