From 1fe2bfdb4cabd699c4e9e8bf49b3911ec7834857 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 6 Dec 2015 15:27:34 -0600 Subject: [PATCH] Add particle spawner to campfire --- mods/campfire/init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mods/campfire/init.lua b/mods/campfire/init.lua index 4e4522c..6e2e456 100755 --- a/mods/campfire/init.lua +++ b/mods/campfire/init.lua @@ -213,6 +213,26 @@ minetest.register_abm({ end meta:set_string("src_time", 0) end + if randomChance(25) then + local ps_def = { + amount = 12, + time = 0.25, + minpos = {x=pos.x-0.2, y=pos.y-0.2, z=pos.z-0.2}, + maxpos = {x=pos.x+0.2, y=pos.y+0.2, z=pos.z+0.2}, + minvel = {x=0, y=1, z=0}, + maxvel = {x=1, y=2, z=1}, + minacc = {x=-0.5,y=-1,z=-0.5}, + maxacc = {x=0.5,y=1,z=0.5}, + minexptime = 0.1, + maxexptime = 1, + minsize = 0.25, + maxsize = 0.5, + collisiondetection = false, + texture = "fire_basic_flame.png" + } + minetest.add_particlespawner(ps_def) + end + end if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then