portalgun/scripts/powerballtarget.lua

28 lines
994 B
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:powerballtarget",
{
description = "Power ball target",
tiles = {"portalgun_powerballstarget.png"},
groups = {mesecon = 2, cracky = 2},
mesecons = {receptor = {state = "off"}},
sounds = stone_sounds,
is_ground_content = false,
on_timer = function(pos, elapsed)
mesecon.receptor_off(pos)
return false
end
}
)