2019-09-07 09:44:30 -04:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
|
|
|
local minetest, nodecore
|
|
|
|
= minetest, nodecore
|
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
|
|
|
if nodecore.loaded_mods().nc_fire then
|
2021-07-10 11:09:44 -04:00
|
|
|
minetest.register_abm({
|
2020-06-17 07:09:20 -04:00
|
|
|
label = "flammable stack ignite",
|
2019-09-07 09:44:30 -04:00
|
|
|
interval = 5,
|
|
|
|
chance = 1,
|
|
|
|
nodenames = {modname .. ":stack"},
|
|
|
|
neighbors = {"group:igniter"},
|
2021-03-21 12:08:55 -04:00
|
|
|
neighbors_invert = true,
|
2022-01-22 16:20:10 -05:00
|
|
|
action_delay = true,
|
2019-09-07 09:44:30 -04:00
|
|
|
action = function(pos)
|
|
|
|
local stack = nodecore.stack_get(pos)
|
2019-11-28 11:18:03 -05:00
|
|
|
return nodecore.fire_check_ignite(pos, {
|
|
|
|
name = stack:get_name(),
|
|
|
|
count = stack:get_count()
|
|
|
|
})
|
2019-09-07 09:44:30 -04:00
|
|
|
end
|
|
|
|
})
|
|
|
|
end
|