Skip to content

Commit

Permalink
Insert the mapgen callback rather than registering it. This lets vmg
Browse files Browse the repository at this point in the history
build before other mods attempt to (and find nothing there), allowing
them to cooperate. It won't work if someone else uses the same trick, of
course.
  • Loading branch information
duane-r committed Oct 3, 2015
1 parent 7a74a1a commit b9b990c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init.lua
Expand Up @@ -87,7 +87,8 @@ if vmg.define("respawn", true) then
end

-- Call the mapgen function vmg.generate on mapgen.
minetest.register_on_generated(vmg.generate)
-- Inserting helps to ensure that vmg operates first.
table.insert(minetest.registered_on_generateds, 1, vmg.generate)

if vmg.loglevel >= 2 then
print("[Valleys Mapgen] Loading nodes ...")
Expand Down

0 comments on commit b9b990c

Please sign in to comment.