How to change map gen settings on event without desync?
Posted: Wed Aug 16, 2023 7:07 am
I'm trying to change map gen settings after an amount of chunks have been generated. It causes desync. Any tips?
Code: Select all
local chunk_count = 0
local apply_map_gen_2 = false
local on_chunk_generated = function(event)
chunk_count = chunk_count + 1
if (chunk_count == 1600) then
apply_map_gen_2 = true
end
end
local on_sector_scanned = function(event)
if (apply_map_gen_2 == true) then
map_gen_2()
apply_map_gen_2 = false
end
end