loot/dungeon.lua

20 lines
413 B
Lua
Raw Normal View History

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
minetest.add_node(location, { name = "loot:loot_node" })
2016-02-02 19:41:28 -08:00
end
end
end)