~fgaz/minetest-falling_nodes

1a101558a8eb7b5dffdc86d1c063436fee7d39ff — Francesco Gazzetta 2 months ago c1fe8c5
Generalize ignition, make powered metal an igniter
2 files changed, 5 insertions(+), 3 deletions(-)

M mods/falling_nodes/explosions.lua
M mods/falling_nodes/materials.lua
M mods/falling_nodes/explosions.lua => mods/falling_nodes/explosions.lua +3 -3
@@ 5,7 5,7 @@ local utils = dofile(minetest.get_modpath(modname) .. "/utils.lua")
minetest.register_abm {
  label = "Fire propagation",
  nodenames = {"group:falling_nodes:flammable"},
  neighbors = {"falling_nodes:fire"},
  neighbors = {"group:falling_nodes:igniter"},
  interval = minetest.settings:get("abm_interval") * 2,
  chance = 4,
  catch_up = false,


@@ 24,7 24,7 @@ end
minetest.register_abm {
  label = "Deflagration propagation",
  nodenames = {"group:falling_nodes:deflagrating"},
  neighbors = {"falling_nodes:fire"},
  neighbors = {"group:falling_nodes:igniter"},
  interval = minetest.settings:get("abm_interval") * 1,
  chance = 2,
  catch_up = false,


@@ 51,7 51,7 @@ end
minetest.register_abm {
  label = "Detonation propagation",
  nodenames = {"group:falling_nodes:detonating"},
  neighbors = {"falling_nodes:fire"},
  neighbors = {"group:falling_nodes:igniter"},
  interval = minetest.settings:get("abm_interval") * 1,
  chance = 1,
  catch_up = false,

M mods/falling_nodes/materials.lua => mods/falling_nodes/materials.lua +2 -0
@@ 54,6 54,7 @@ falling_nodes.register_material("falling_nodes:fire", {
  tiles = {"falling_nodes_fire.png"},
  groups = {
    ["falling_nodes:gas"] = 1,
    ["falling_nodes:igniter"] = 1,
  },
  sunlight_propagates = true,
  drawtype = "firelike",


@@ 195,6 196,7 @@ falling_nodes.register_material("falling_nodes:metal_powered", {
  tiles = {"[fill:1x1:#FFFF80"},
  groups = {
    ["falling_nodes:solid"] = 1,
    ["falling_nodes:igniter"] = 1,
    not_in_creative_inventory = 1,
  },
  on_construct = function(pos)