moved amb
This commit is contained in:
parent
64f1a31167
commit
05126557e4
2
mod.conf
2
mod.conf
@ -1,6 +1,6 @@
|
||||
name = surface_effect
|
||||
description = surface effect
|
||||
depends = default, persistent_effects, mobs_monster, radiant_damage, hazmat_suit
|
||||
depends = default, persistent_effects, mobs_monster, radiant_damage, hazmat_suit, ethereal
|
||||
optional_depends = technic, farming, space_travel
|
||||
min_minetest_version = 5.7
|
||||
title = Surface Effect
|
||||
|
@ -22,4 +22,69 @@ if minetest.get_modpath("areas") then
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:flammable"},
|
||||
interval = 30/speed,
|
||||
chance = 2000,
|
||||
action = function(pos)
|
||||
if pos.y > -10 and pos.y < 1500 then
|
||||
minetest.env:add_node(pos, {name="fire:basic_flame"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:leaves"},
|
||||
interval = 10/speed,
|
||||
chance = 100,
|
||||
action = function(pos)
|
||||
if pos.y > -10 and pos.y < 1500 then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:water_source"},
|
||||
interval = 10/speed,
|
||||
chance = 50,
|
||||
action = function(pos)
|
||||
if pos.y > -10 and pos.y < 1500 then
|
||||
minetest.env:remove_node(pos)
|
||||
if minetest.env:get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x, y=pos.y -1, z=pos.z})
|
||||
end
|
||||
if minetest.env:get_node({x=pos.x, y=pos.y +1, z=pos.z}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x, y=pos.y +1, z=pos.z})
|
||||
end
|
||||
|
||||
if minetest.env:get_node({x=pos.x -1, y=pos.y, z=pos.z}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x -1, y=pos.y, z=pos.z})
|
||||
end
|
||||
if minetest.env:get_node({x=pos.x +1, y=pos.y, z=pos.z}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x +1, y=pos.y, z=pos.z})
|
||||
end
|
||||
|
||||
if minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z -1}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x, y=pos.y, z=pos.z -1})
|
||||
end
|
||||
if minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z +1}).name == "default:water_source" then
|
||||
minetest.env:remove_node({x=pos.x, y=pos.y, z=pos.z +1})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_grass"},
|
||||
interval = 30/speed,
|
||||
chance = 2000,
|
||||
action = function(pos)
|
||||
if pos.y > -10 and pos.y < 100 then
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.env:add_node(pos, {name="ethereal:dry_dirt"})
|
||||
end
|
||||
end,
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user