Add more colours

This commit is contained in:
ezhh 2018-03-06 00:53:20 +00:00
parent e7c1e9920a
commit 8791dd3fc3
9 changed files with 45 additions and 31 deletions

View File

@ -1,32 +1,42 @@
minetest.register_node("butterflies:butterfly", {
description = "Butterfly",
drawtype = "plantlike",
tiles = {{
name = "butterflies_butterfly_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3
local butter_list = {
{"white", "White"},
{"red", "Red"},
{"violet", "Violet"}
}
for i in ipairs (butter_list) do
local name = butter_list[i][1]
local desc = butter_list[i][2]
minetest.register_node("butterflies:butterfly_"..name, {
description = desc.." Butterfly",
drawtype = "plantlike",
tiles = {{
name = "butterflies_butterfly_"..name.."_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3
},
}},
inventory_image = "butterflies_butterfly_"..name..".png",
wield_image = "butterflies_butterfly_"..name..".png",
waving = 1,
paramtype = "light",
sunlight_propagates = true,
buildable_to = true,
walkable = false,
groups = {catchable = 1},
selection_box = {
type = "fixed",
fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
},
}},
inventory_image = "butterflies_butterfly.png",
wield_image = "butterflies_butterfly.png",
waving = 1,
paramtype = "light",
sunlight_propagates = true,
buildable_to = true,
walkable = false,
groups = {catchable = 1},
selection_box = {
type = "fixed",
fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
},
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "butterflies:butterfly 1")
end
})
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "butterflies:butterfly_"..name.."1")
end
})
end

View File

@ -33,5 +33,9 @@ Textures
--------
Shara RedCat (CC BY-SA 3.0):
butterflies_butterfly.png
butterflies_butterfly_animated.png
butterflies_butterfly_red.png
butterflies_butterfly_red_animated.png
butterflies_butterfly_violet.png
butterflies_butterfly_violet_animated.png
butterflies_butterfly_white.png
butterflies_butterfly_white_animated.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB