Negative numbers onchunkgenerated

This subforum contains all the issues which we already resolved.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Negative numbers onchunkgenerated

Post by ficolas »

Code: Select all

game.onevent(defines.events.onchunkgenerated, function(event)
	local x = event.area.lefttop.x/32
	local y = event.area.lefttop.y/32
	
	game.getplayer().print((x).." "..(y))
end
Adding that to the control.lua, should give me numbers between -5,-5 and 5,5 at the first chunks, and when im going further, it should give a combination of two numbers, beeing one of them bigger than 5 (like 6,5 or 6,3), but those numbers should be going up slowly as I walk, but what do I find?

134217725, 134217720
134217726, 134217720
134217727, 134217720
0, 134217720

(This only seems to happen when im going to negative directions, and im not sure if the numbers of the first chunks that are negative work)

Then I noticed that any world generation is generated in negative cordinates. (from my mod)
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Negative numbers onchunkgenerated

Post by kovarex »

Thank you for the report, there is a bug indeed, it is fixed for 0.8 now.
Post Reply

Return to “Resolved Problems and Bugs”