-- LUALOCALS < --------------------------------------------------------- local include, nodecore, math = include, nodecore, math -- LUALOCALS > --------------------------------------------------------- minetest.register_abm({ label = "go smoke", interval = 15, chance = 1, nodenames = {"group:go_stone"}, action = function(pos, node) if not (node.param2 == 0) then -- if smoke level is higher than 1, it can decay (lazy pseudoexponential decay) if math.random() < (0.01 * (node.param2 - 1)) then node.param2 = node.param2 - 1 minetest.swap_node(pos, node) end nodecore.smokefx(pos, 60, node.param2) end end })