cg72_game/mods/default/disco_ball.lua

63 lines
2.5 KiB
Lua

-- This file supplies disco balls
minetest.register_node("default:disco_ball", {
description = "Disco Ball",
drawtype = "nodebox",
tiles = {
{name="disco_ball_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
},
paramtype = "light",
paramtype2 = "facedir",
light_source = 13,
buildable_to = true,
sounds = default.node_sound_glass_defaults(),
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = {
{ -0.353, -0.353, -0.353, 0.353, 0.353, 0.353 }, -- Box
{ -0.495, -0.064, -0.064, 0.495, 0.064, 0.064 }, -- Circle +-x
{ -0.483, -0.128, -0.128, 0.483, 0.128, 0.128 },
{ -0.462, -0.191, -0.191, 0.462, 0.191, 0.191 },
{ -0.433, -0.249, -0.249, 0.433, 0.249, 0.249 },
{ -0.397, -0.303, -0.303, 0.397, 0.303, 0.303 },
{ -0.305, -0.396, -0.305, 0.305, 0.396, 0.305 }, -- Circle +-y
{ -0.250, -0.432, -0.250, 0.250, 0.432, 0.250 },
{ -0.191, -0.461, -0.191, 0.191, 0.461, 0.191 },
{ -0.130, -0.482, -0.130, 0.130, 0.482, 0.130 },
{ -0.066, -0.495, -0.066, 0.066, 0.495, 0.066 },
{ -0.064, -0.064, -0.495, 0.064, 0.064, 0.495 }, -- Circle +-z
{ -0.128, -0.128, -0.483, 0.128, 0.128, 0.483 },
{ -0.191, -0.191, -0.462, 0.191, 0.191, 0.462 },
{ -0.249, -0.249, -0.433, 0.249, 0.249, 0.433 },
{ -0.303, -0.303, -0.397, 0.303, 0.303, 0.397 },
}
},
node_box = {
type = "fixed",
fixed = {
{ -0.353, -0.353, -0.353, 0.353, 0.353, 0.353 }, -- Box
{ -0.495, -0.064, -0.064, 0.495, 0.064, 0.064 }, -- Circle +-x
{ -0.483, -0.128, -0.128, 0.483, 0.128, 0.128 },
{ -0.462, -0.191, -0.191, 0.462, 0.191, 0.191 },
{ -0.433, -0.249, -0.249, 0.433, 0.249, 0.249 },
{ -0.397, -0.303, -0.303, 0.397, 0.303, 0.303 },
{ -0.305, -0.396, -0.305, 0.305, 0.396, 0.305 }, -- Circle +-y
{ -0.250, -0.432, -0.250, 0.250, 0.432, 0.250 },
{ -0.191, -0.461, -0.191, 0.191, 0.461, 0.191 },
{ -0.130, -0.482, -0.130, 0.130, 0.482, 0.130 },
{ -0.066, -0.495, -0.066, 0.066, 0.495, 0.066 },
{ -0.064, -0.064, -0.495, 0.064, 0.064, 0.495 }, -- Circle +-z
{ -0.128, -0.128, -0.483, 0.128, 0.128, 0.483 },
{ -0.191, -0.191, -0.462, 0.191, 0.191, 0.462 },
{ -0.249, -0.249, -0.433, 0.249, 0.249, 0.433 },
{ -0.303, -0.303, -0.397, 0.303, 0.303, 0.397 },
}
},
})