-
---add in smoke and fire
-local function create_ps(pos)
- local dir = get_offset(minetest.get_node(pos).param2)
- local ppos = vector.add(dir,pos)
- local meta = minetest.get_meta(pos)
- local psf = minetest.add_particlespawner({
- amount = 2,
- time = 0,
- minpos = ppos,
- maxpos = ppos,
- minvel = vector.new(0,0,0),
- maxvel = vector.new(0,0,0),
- minacc = {x=0, y=0, z=0},
- maxacc = {x=0, y=0, z=0},
- minexptime = 1,
- maxexptime = 1,
- minsize = 3,
- maxsize = 3,
- collisiondetection = false,
- vertical = true,
- texture = "redstone_torch_animated.png",
- animation = {type = "vertical_frames",
-
- aspect_w = 16,
- -- Width of a frame in pixels
-
- aspect_h = 16,
- -- Height of a frame in pixels
-
- length = 0.2,
- -- Full loop length
- },
- })
- local pss = minetest.add_particlespawner({
- amount = 2,
- time = 0,
- minpos = ppos,
- maxpos = ppos,
- minvel = vector.new(-0.1,0.1,-0.1),
- maxvel = vector.new(0.1,0.3,0.1),
- minacc = vector.new(0,0,0),
- maxacc = vector.new(0,0,0),
- minexptime = 1,
- maxexptime = 2,
- minsize = 1,
- maxsize = 2,
- collisiondetection = false,
- vertical = false,
- texture = "smoke.png",
- })
- meta:set_int("psf", psf)
- meta:set_int("pss", pss)
-end
-