2014-06-25 13:31:50 +02:00
|
|
|
--Various kinds of paintings
|
|
|
|
|
|
|
|
for i = 1,20 do
|
|
|
|
minetest.register_node("homedecor:painting_"..i, {
|
add blank canvas craft item and recipes for paintings
First, craft a blank canvas from four sticks
and some white wool:
- s -
s W s
- s -
Then, combine that canvas with some black and white dyes in the right
pattern to get the painting you want.
Paintings are numbred in-game, from 1 to 20. Since there are so many
paintings, and so little crafting space, the only way I could think to
do it was to use binary for the recipe. Convert the number of the
painting you want into binary, then use black dye for each 0 and white for
each 1, and lay them down into the crafting grid in this pattern:
bit2 bit1 bit0
- bit4 bit3
- Canv. -
With the blank canvas in the bottom center slot. For example, if you
want painting number 9, that would be 01001 in binary, so you'd arrange
the crafting grid like so:
Black Black White ---> Painting #9
- Black White
- Canv. -
2014-07-04 10:45:58 +02:00
|
|
|
description = "Decorative painting #"..i,
|
2014-06-25 13:31:50 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {
|
|
|
|
"homedecor_painting_edges.png",
|
|
|
|
"homedecor_painting_edges.png",
|
|
|
|
"homedecor_painting_edges.png",
|
|
|
|
"homedecor_painting_edges.png",
|
|
|
|
"homedecor_painting_back.png",
|
|
|
|
"homedecor_painting"..i..".png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2014-06-25 14:14:25 +02:00
|
|
|
{ -32/64, -32/64, 28/64, -30/64, 32/64, 32/64 }, -- left edge
|
|
|
|
{ 30/64, -32/64, 28/64, 32/64, 32/64, 32/64 }, -- right edge
|
|
|
|
{ -32/64, 30/64, 28/64, 32/64, 32/64, 32/64 }, -- top edge
|
|
|
|
{ -32/64, -30/64, 28/64, 32/64, -32/64, 32/64 }, -- bottom edge
|
|
|
|
{ -32/64, -32/64, 29/64, 32/64, 32/64, 29/64 } -- the canvas
|
2014-06-25 13:31:50 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
groups = {snappy=3},
|
|
|
|
})
|
|
|
|
end
|