Fix "attempt to index a nil value"
multi_map settings like number_of_layers must be finalized before invoking mmgen_*.lua files, as they invoke multi_map.register_global_2dmap() which create an array of global_2d_params - one for each layer.
This commit is contained in:
parent
adb42fa270
commit
cf66603d61
|
@ -1,5 +1,10 @@
|
|||
local multi_map_generators_path = minetest.get_modpath("multi_map_generators")
|
||||
|
||||
multi_map.number_of_layers = 38
|
||||
multi_map.layers_start_chunk = 0
|
||||
multi_map.layer_height_chunks = 20
|
||||
--multi_map.wrap_layers = true
|
||||
|
||||
dofile(multi_map_generators_path.."/mmgen_levels.lua")
|
||||
--dofile(multi_map_generators_path.."/mmgen_lvm_example.lua")
|
||||
dofile(multi_map_generators_path.."/mmgen_simple.lua")
|
||||
|
@ -13,11 +18,6 @@ dofile(multi_map_generators_path.."/mmgen_testauri.lua")
|
|||
--multi_map.register_generator(12, mmgen_testauri.generate)
|
||||
--multi_map.register_generator(13, mmgen_levels.generate)
|
||||
|
||||
multi_map.number_of_layers = 38
|
||||
multi_map.layers_start_chunk = 0
|
||||
multi_map.layer_height_chunks = 20
|
||||
--multi_map.wrap_layers = true
|
||||
|
||||
multi_map.register_fallback_generator(mmgen_simple.generate)
|
||||
|
||||
--multi_map.register_generator(18, mmgen_testauri.generate)
|
||||
|
|
Loading…
Reference in New Issue