forked from nalc/nalc_game
Fix leaking globals in flowers and default mapgen.lua
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
This commit is contained in:
parent
e71b71c1a9
commit
3bf3249d71
|
@ -406,9 +406,8 @@ end
|
|||
-- Detect mapgen and register suitable on-generated function
|
||||
--
|
||||
|
||||
minetest.register_on_mapgen_init(function(MapgenParams)
|
||||
mgname = MapgenParams.mgname
|
||||
if mgname == "v6" then
|
||||
minetest.register_on_mapgen_init(function(mg_params)
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(default.mgv6_ongen)
|
||||
end
|
||||
end)
|
||||
|
@ -466,4 +465,3 @@ function default.generate_nyancats(minp, maxp, seed)
|
|||
end
|
||||
|
||||
minetest.register_on_generated(default.generate_nyancats)
|
||||
|
||||
|
|
|
@ -63,10 +63,8 @@ end
|
|||
|
||||
-- Enable in mapgen v6 only
|
||||
|
||||
minetest.register_on_mapgen_init(function(MapgenParams)
|
||||
mgname = MapgenParams.mgname
|
||||
if mgname == "v6" then
|
||||
minetest.register_on_mapgen_init(function(mg_params)
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(flowers.mgv6ongen)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user