When you change or write to an existing camera's surface_index, it will show various forms of weird behavior. Sometimes it will stop rendering anything at all, sometimes it will display the old surface's entities on the new surface's tiles.
The same thing happens when you destroy and recreate the camera with the new parameters (as long as it's still in the same callback or at least the same tick), so destroying and recreating a camera does not circumvent this issue (at least it did this when I tested that back in 0.15.3)
[0.15.7] Weird behavior writing to camera.surface_index
-
- Inserter
- Posts: 37
- Joined: Sun Jul 17, 2016 9:05 pm
- Contact:
[0.15.7] Weird behavior writing to camera.surface_index
I don't visit the forum very often. If you want to contact me, message me on the mod portal for Factorissimo-related things, or on Discord.
Re: [0.15.7] Weird behavior writing to camera.surface_index
Can you post a save file + mod showing the problem?
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 37
- Joined: Sun Jul 17, 2016 9:05 pm
- Contact:
Re: [0.15.7] Weird behavior writing to camera.surface_index
In the attached savefile, move your mouse between the factory buildings quickly, and a plethora of nonsense will happen. Here is the relevant Lua code.
- Attachments
-
- WeirdCamera.zip
- Savefile
- (916.44 KiB) Downloaded 176 times
-
- Factorissimo2_2.1.4.zip
- Retail version
- (3.04 MiB) Downloaded 155 times
I don't visit the forum very often. If you want to contact me, message me on the mod portal for Factorissimo-related things, or on Discord.
Re: [0.15.7] Weird behavior writing to camera.surface_index
Thanks for the save and mod. It was a simple fix: the read/write surface for the GUI element was taking 0-based indexing instead of Lua 1 based indexing.
It's now fixed for the next version of 0.15.
It's now fixed for the next version of 0.15.
If you want to get ahold of me I'm almost always on Discord.