Add more colours
68
init.lua
@ -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
|
||||
|
||||
|
@ -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
|
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 |