

ion_cannon = {}

ion_cannon.fire = function(from_pos)
	minetest.sound_play("ion_cannon", {pos=from_pos, max_hear_distance = 128, gain = 1})
        minetest.add_particlespawner({
                amount = 10,
                time = 2,
                minpos = from_pos,
                maxpos = from_pos,
                minvel = {x=0, y=100, z=0},
                maxvel = {x=0, y=100, z=0},
                minacc = {x = 0, y = 0, z = 0},
                maxacc = {x = 0, y = 0, z = 0},
                minexptime = 0.03,
                maxexptime = 0.05,
                minsize = 10,
                maxsize = 10,
                collisiondetection = false,
                vertical = false,
                glow = 8,
                texture = "ion_cannonp.png"
        })
	draconis.check_ioncannon_hit(from_pos)
end
