Paintings update

>Added artist infotext.
>Removed collision box
>Started work on the easel
master
D00Med 2017-12-13 07:24:56 +10:00
parent 264d1e0237
commit 0bd60ccba0
1 changed files with 33 additions and 10 deletions

View File

@ -3,15 +3,15 @@
--sizes are: 1X1, 1X2 (wide), 2X1 (tall), 2X2
local paintings = {
--{"name/texture", "description", "size"}
{"hummingbird", "Hummingbird Painting", "2X2"},
{"dragon", "Dragon Painting", "2X1"},
{"landscape", "Landscape Painting", "1X2"},
{"forest", "Forest Painting", "1X2"},
{"waterlilie", "Water Lily Painting", "1X1"},
{"cthulhu", "Cthulhu Painting", "2X2"},
{"mistiriusgirl", "Mistirius Girl Painting", "1X2"},
{"possessedwoman", "Possessed Woman Painting", "1X2"},
{"rose", "Rose Painting", "1X1"},
{"hummingbird", "Hummingbird Painting", "2X2", "D00Med"},
{"dragon", "Dragon Painting", "2X1", "D00Med"},
{"landscape", "Landscape Painting", "1X2", "D00Med"},
{"forest", "Forest Painting", "1X2", "D00Med"},
{"waterlilie", "Water Lily Painting", "1X1", "toby109tt"},
{"cthulhu", "Cthulhu Painting", "2X2", "toby109tt"},
{"mistiriusgirl", "Mistirius Girl Painting", "1X2", "toby109tt"},
{"possessedwoman", "Possessed Woman Painting", "1X2", "D00Med"},
{"rose", "Rose Painting", "1X1", "toby109tt"},
}
local small = {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}
@ -23,6 +23,7 @@ for _, row in ipairs(paintings) do
local name = row[1]
local description = row[2]
local size = row[3]
local artist = row[4]
local box = small
if size == "1X2" then
box = medium
@ -49,8 +50,30 @@ for _, row in ipairs(paintings) do
},
collision_box = {
type = "fixed",
fixed = box
fixed = {0,0,0,0,0,0}
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Artist: "..artist)
end,
sounds = default.node_sound_wood_defaults()
})
end
--[[
minetest.register_node("paintings:easel", {
description = "Easel",
tiles = {"default_wood.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=1},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Painting Easel")
meta:set_string("formspec", easel_formspec)
end,
on_righclick = function(pos, node, clicker, itemstack)
end,
sounds = default.node_sound_wood_defaults()
})
]]