portalgun/scripts/cake.lua

44 lines
1.7 KiB
Lua

stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:cake",
{
description = "Cake",
groups = {dig_immediate = 3, not_in_creative_inventory = 0},
paramtype = "light",
sunlight_propagates = true,
selection_box = {type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}},
sounds = stone_sounds,
tiles = {
"dirt.png^portalgun_cake1.png",
"dirt.png^portalgun_cake2.png"
},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, 0.375, 0.3125, -0.125, 0.4375},
{-0.3125, -0.5, -0.4375, 0.3125, -0.125, -0.375},
{-0.4375, -0.5, -0.3125, -0.375, -0.125, 0.3125},
{0.375, -0.5, -0.3125, 0.4375, -0.125, 0.3125},
{-0.375, -0.5, -0.375, 0.375, -0.125, 0.375},
{-0.25, -0.5, 0.4375, 0.25, -0.125, 0.5},
{-0.25, -0.5, -0.5, 0.25, -0.125, -0.4375},
{0.4375, -0.5, -0.25, 0.5, -0.125, 0.25},
{-0.5, -0.5, -0.25, -0.4375, -0.125, 0.25},
{0, -0.125, -0.0625, 0.0625, 0.1875, 0}
}
}
}
)