Add more colours
68
init.lua
@ -1,32 +1,42 @@
|
|||||||
|
|
||||||
minetest.register_node("butterflies:butterfly", {
|
local butter_list = {
|
||||||
description = "Butterfly",
|
{"white", "White"},
|
||||||
drawtype = "plantlike",
|
{"red", "Red"},
|
||||||
tiles = {{
|
{"violet", "Violet"}
|
||||||
name = "butterflies_butterfly_animated.png",
|
}
|
||||||
animation = {
|
|
||||||
type = "vertical_frames",
|
for i in ipairs (butter_list) do
|
||||||
aspect_w = 16,
|
local name = butter_list[i][1]
|
||||||
aspect_h = 16,
|
local desc = butter_list[i][2]
|
||||||
length = 3
|
|
||||||
|
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},
|
||||||
},
|
},
|
||||||
}},
|
floodable = true,
|
||||||
inventory_image = "butterflies_butterfly.png",
|
on_flood = function(pos, oldnode, newnode)
|
||||||
wield_image = "butterflies_butterfly.png",
|
minetest.add_item(pos, "butterflies:butterfly_"..name.."1")
|
||||||
waving = 1,
|
end
|
||||||
paramtype = "light",
|
})
|
||||||
sunlight_propagates = true,
|
end
|
||||||
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
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,5 +33,9 @@ Textures
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
Shara RedCat (CC BY-SA 3.0):
|
Shara RedCat (CC BY-SA 3.0):
|
||||||
butterflies_butterfly.png
|
butterflies_butterfly_red.png
|
||||||
butterflies_butterfly_animated.png
|
butterflies_butterfly_red_animated.png
|
||||||
|
butterflies_butterfly_violet.png
|
||||||
|
butterflies_butterfly_violet_animated.png
|
||||||
|
butterflies_butterfly_white.png
|
||||||
|
butterflies_butterfly_white_animated.png
|
Before Width: | Height: | Size: 113 B |
BIN
textures/butterflies_butterfly_red.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/butterflies_butterfly_red_animated.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/butterflies_butterfly_violet.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
textures/butterflies_butterfly_white.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
textures/butterflies_butterfly_white_animated.png
Normal file
After Width: | Height: | Size: 2.8 KiB |