How to change map gen settings on event without desync?

Place to get help with not working mods / modding interface.
Post Reply
Atraps003
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Thu Jan 04, 2018 6:34 am
Contact:

How to change map gen settings on event without desync?

Post by Atraps003 »

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


Atraps003
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Thu Jan 04, 2018 6:34 am
Contact:

Re: How to change map gen settings on event without desync?

Post by Atraps003 »

I understand my error now. Thanks.

Post Reply

Return to “Modding help”