[0.15.7] Weird behavior writing to camera.surface_index

This subforum contains all the issues which we already resolved.
MagmaMcFry
Inserter
Inserter
Posts: 37
Joined: Sun Jul 17, 2016 9:05 pm
Contact:

[0.15.7] Weird behavior writing to camera.surface_index

Post by MagmaMcFry »

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)
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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14253
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.7] Weird behavior writing to camera.surface_index

Post by Rseding91 »

Can you post a save file + mod showing the problem?
If you want to get ahold of me I'm almost always on Discord.
MagmaMcFry
Inserter
Inserter
Posts: 37
Joined: Sun Jul 17, 2016 9:05 pm
Contact:

Re: [0.15.7] Weird behavior writing to camera.surface_index

Post by MagmaMcFry »

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 174 times
Factorissimo2_2.1.4.zip
Retail version
(3.04 MiB) Downloaded 154 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14253
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.7] Weird behavior writing to camera.surface_index

Post by Rseding91 »

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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”