finished pieces

master
tony-ka 2012-08-26 06:39:01 +02:00
parent 0e87de4d6c
commit c576a26f77
1 changed files with 117 additions and 8 deletions

View File

@ -86,12 +86,9 @@ for color = 1, 2 do
})
--Knight
--Bishop
minetest.register_node("chess:bishop_"..colors[color],
minetest.register_node("chess:knight_"..colors[color],
{
description = 'bishop',
description = 'Knight',
groups = {snappy = 2},
tiles = {"chess_piece_"..colors[color]..".png"},
drawtype = "nodebox",
@ -102,19 +99,131 @@ for color = 1, 2 do
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.8, -0.3, 0.2, -0.4, 0.3},
{-0.2, -0.5, -0.3, 0.2, -0.4, 0.3},
{-0.3, -0.5, -0.2, 0.3, -0.4, 0.2},
{-0.1, -0.4, -0.2, 0.1, -0.3, 0.2},
{-0.2, -0.4, -0.1, 0.2, -0.3, 0.1},
{-0.1, -0.3, -0.1, 0.1, 0.45, 0.1},
{-0.1, -0.2, -0.2, 0.1, 0.1, 0.15},
{-0.15, -0.2, -0.1, 0.15, 0.1, 0.1},
{-0.1, 0.2, -0.25, 0.1, 0.35, 0.15},
{-0.1, 0.45, 0.01, -0.07, 0.5, 0.06},
{0.07, 0.45, 0.01, 0.1, 0.5, 0.06},
},
},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
},
groups = piece_group
})
--Bishop
minetest.register_node("chess:bishop_"..colors[color],
{
description = 'Bishop',
groups = {snappy = 2},
tiles = {"chess_piece_"..colors[color]..".png"},
drawtype = "nodebox",
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = "facedir",
light_source = 8, --max light is 18
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.3, 0.2, -0.4, 0.3},
{-0.3, -0.5, -0.2, 0.3, -0.4, 0.2},
{-0.1, -0.4, -0.2, 0.1, -0.3, 0.2},
{-0.2, -0.4, -0.1, 0.2, -0.3, 0.1},
{-0.1, -0.3, -0.1, 0.1, 0.4, 0.1},
{-0.1, 0, -0.2, 0.1, 0.1, 0.2},
{-0.2, 0, -0.1, 0.2, 0.1, 0.1},
{-0.1, 0.15, -0.2, 0.1, 0.35, 0.2},
{-0.2, 0.15, -0.1, 0.2, 0.35, 0.1 },
{-0.05, 0.4, -0.05, 0.05, 0.5, 0.05},
},
},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.2, 0.3},
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
},
groups = piece_group
})
--Queen
minetest.register_node("chess:queen_"..colors[color],
{
description = 'Queen',
groups = {snappy = 2},
tiles = {"chess_piece_"..colors[color]..".png"},
drawtype = "nodebox",
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = "facedir",
light_source = 8, --max light is 18
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.3, 0.2, -0.4, 0.3},
{-0.3, -0.5, -0.2, 0.3, -0.4, 0.2},
{-0.1, -0.4, -0.2, 0.1, -0.3, 0.2},
{-0.2, -0.4, -0.1, 0.2, -0.3, 0.1},
{-0.1, -0.3, -0.1, 0.1, 0.2, 0.1},
{-0.1, 0, -0.2, 0.1, 0.1, 0.2},
{-0.2, 0, -0.1, 0.2, 0.1, 0.1},
{-0.1, 0.2, -0.2, 0.1, 0.4, 0.2},
{-0.2, 0.2, -0.1, 0.2, 0.4, 0.1},
{-0.07, 0.4, -0.19, 0.07, 0.44, -0.11},
{-0.07, 0.4, 0.11, 0.07, 0.44, 0.19},
{-0.19, 0.4, -0.07, -0.11, 0.44, 0.07},
{0.11, 0.4, -0.07, 0.19, 0.44, 0.07},
{-0.04, 0.4, -0.07, 0.04, 0.46, 0.07},
{-0.07, 0.4, -0.04, 0.07, 0.46, 0.04},
{-0.04, 0.46, -0.04, 0.04, 0.49, 0.04},
},
},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
},
groups = piece_group
})
--King
minetest.register_node("chess:king_"..colors[color],
{
description = 'King',
groups = {snappy = 2},
tiles = {"chess_piece_"..colors[color]..".png"},
drawtype = "nodebox",
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = "facedir",
light_source = 8, --max light is 18
node_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.3, 0.2, -0.4, 0.3},
{-0.3, -0.5, -0.2, 0.3, -0.4, 0.2},
{-0.1, -0.4, -0.2, 0.1, -0.3, 0.2},
{-0.2, -0.4, -0.1, 0.2, -0.3, 0.1},
{-0.1, -0.3, -0.1, 0.1, 0.2, 0.1},
{-0.1, 0, -0.2, 0.1, 0.1, 0.2},
{-0.2, 0, -0.1, 0.2, 0.1, 0.1},
{-0.1, 0.2, -0.2, 0.1, 0.4, 0.2},
{-0.2, 0.2, -0.1, 0.2, 0.4, 0.1},
{-0.02, 0.4, -0.02, 0.02, 0.5, 0.02},
{-0.02, 0.43, -0.05, 0.02, 0.47, 0.05},
{-0.05, 0.43, -0.02, 0.05, 0.47, 0.02},
},
},
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
},
groups = piece_group
})
end