Page 1 of 1

player.zoom

Posted: Sun Apr 26, 2015 1:59 pm
by Kexík
Hi, i wasnt there for few patched, now i got bugreporth about player.zoom so i was looking for api changes on forum and only thing i found was https://forums.factorio.com/forum/vie ... layer+zoom
Does that mean there is no longer any way to control player zoom? (setting min max zoom)

I am in my mod using god mode with zoom limitation for speed. So if there is some workaround please tell me, otherwise i will remove zoom control :/

Re: player.zoom

Posted: Sun Apr 26, 2015 11:00 pm
by Rseding91
You can set the zoom level but you can't read it.

Re: player.zoom

Posted: Mon Apr 27, 2015 1:18 pm
by Kexík
I dont understand, Is player.zoom variable still availabel but write only (wtf) or is there some new function like setZoom ( maybe even getZoom? )

Re: player.zoom

Posted: Tue Apr 28, 2015 5:43 pm
by Rseding91

Code: Select all

game.player.zoom = 0.1 -- valid

Code: Select all

game.player.print(game.player.zoom) -- invalid

The zoom level is part of the GUI and as such is not serialized or saved. That means it's not determistic. If you set zoom = 0.1, save and reload the game it will not be at 0.1.

Re: player.zoom

Posted: Tue Apr 28, 2015 8:51 pm
by Kexík
ok thank you

Re: player.zoom

Posted: Sat Jul 28, 2018 4:51 pm
by ownlyme
there should be a way to make it readable.
would be a helpful api with many use cases (mainly workarounds for other things that don't work)