2016-02-02 19:41:28 -08:00
|
|
|
|
|
|
|
minetest.set_gen_notify("dungeon")
|
|
|
|
|
|
|
|
minetest.register_on_generated(function(minp, maxp, blockseed)
|
|
|
|
|
|
|
|
local notif = minetest.get_mapgen_object("gennotify")
|
|
|
|
|
|
|
|
if not notif then return end
|
|
|
|
|
|
|
|
local locations = notif.dungeon
|
|
|
|
|
|
|
|
if not locations then return end
|
|
|
|
|
|
|
|
for i, location in ipairs(locations) do
|
|
|
|
if math.random(3) == 1 then
|
2019-06-07 13:37:15 -04:00
|
|
|
minetest.add_node(location, { name = "loot:loot_node" })
|
2016-02-02 19:41:28 -08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|