|
|
@ -1,6 +1,6 @@ |
|
|
|
-- LUALOCALS < --------------------------------------------------------- |
|
|
|
-- LUALOCALS < --------------------------------------------------------- |
|
|
|
local include, nodecore |
|
|
|
local include, nodecore, math |
|
|
|
= include, nodecore |
|
|
|
= include, nodecore, math |
|
|
|
-- LUALOCALS > --------------------------------------------------------- |
|
|
|
-- LUALOCALS > --------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
minetest.register_abm({ |
|
|
|
minetest.register_abm({ |
|
|
@ -10,6 +10,12 @@ minetest.register_abm({ |
|
|
|
nodenames = {"group:go_stone"}, |
|
|
|
nodenames = {"group:go_stone"}, |
|
|
|
action = function(pos, node) |
|
|
|
action = function(pos, node) |
|
|
|
if not (node.param2 == 0) then |
|
|
|
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) |
|
|
|
nodecore.smokefx(pos, 60, node.param2) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|