~fgaz/minetest-falling_nodes

51fd7f8cb2bcf68a452aba2c87ecbca110751d75 — Francesco Gazzetta a month ago fbd9d91
Add water
1 files changed, 50 insertions(+), 0 deletions(-)

M mods/falling_nodes/materials.lua
M mods/falling_nodes/materials.lua => mods/falling_nodes/materials.lua +50 -0
@@ 192,6 192,56 @@ falling_nodes.register_material("falling_nodes:wood", {
  },
})

falling_nodes.register_material("falling_nodes:water", {
  description = "Water",
  tiles = {"[fill:1x1:#2030D0"},
  groups = {
    ["falling_nodes:liquid"] = 1,
  },
  temperature_high = {
    temperature = C2K(101),
    action = function(pos)
      minetest.swap_node(pos, {name = "falling_nodes:steam"})
    end
  },
  temperature_low = {
    temperature = C2K(-1),
    action = function(pos)
      minetest.swap_node(pos, {name = "falling_nodes:ice"})
    end
  },
})

falling_nodes.register_material("falling_nodes:steam", {
  description = "Steam",
  tiles = {"[fill:1x1:#A0A0FF"},
  groups = {
    ["falling_nodes:gas"] = 1,
  },
  temperature_base = C2K(122),
  temperature_low = {
    temperature = C2K(99),
    action = function(pos)
      minetest.swap_node(pos, {name = "falling_nodes:water"})
    end
  },
})

falling_nodes.register_material("falling_nodes:ice", {
  description = "Ice",
  tiles = {"[fill:1x1:#A0C0FF"},
  groups = {
    ["falling_nodes:solid"] = 1,
  },
  temperature_base = C2K(-28),
  temperature_high = {
    temperature = C2K(1),
    action = function(pos)
      minetest.swap_node(pos, {name = "falling_nodes:water"})
    end
  },
})

-- Electronics
--------------