Skip to content

Commit

Permalink
shut down gas seeps that are close to lava to reduce endless explosions
Browse files Browse the repository at this point in the history
  • Loading branch information
FaceDeer committed Feb 23, 2020
1 parent 9370cbb commit c328f05
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mine_gas/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,20 @@ local orthogonal = {
{x=-1,y=0,z=0},
}

minetest.register_lbm({
label = "shut down gas seeps near lava",
name = "mine_gas:shut_down_lava_adjacent",
nodenames = {"mine_gas:gas_seep"},
run_at_every_load = true,
action = function(pos, node)
minetest.after(math.random()*60, function()
if minetest.find_node_near(pos, 30, "group:lava") then
minetest.set_node(pos, {name="default:stone_with_coal"})
end
end)
end,
})

minetest.register_abm({
label = "mine_gas:gas seep",
nodenames = {"mine_gas:gas_seep"},
Expand Down

0 comments on commit c328f05

Please sign in to comment.