LuaGameScriptame.take_technology_screenshot fails silently, with no feedback
LuaGameScriptame.take_technology_screenshot fails silently, with no feedback
After a short discussion on the Factorio discord, I was trying to take a screenshot of my technologies, and my command was not doing anything, despite multiple others running it fine. It took about 10 minutes of screwing around to realize that it was writing an error into the log (file too big) but nothing in chat. If the screenshot - or similar commands - fail, there should be a message indicating as such.
Re: LuaGameScriptame.take_technology_screenshot fails silently, with no feedback
I changed take_technology_screenshot to scale down the technology tree rendering to fit maximum supported texture size, but DirectX/OpenGL can still fail allocate new texture so it still may fail. Screenshot functions don't take screenshot when the function is called (mainly because rendering can't be called from update thread), but queue request to take screenshot, and the requests are processed at the start of the rendering of the next frame (which might not even happen at the same tick, in case frames are dropped for whatever reason). I don't find it worthwhile solving propagation of the failure of these auxiliary functions back to update to report it somewhere inside of the game ... but I'll leave the bug report open in case someone else wants to give it a go.
Re: LuaGameScriptame.take_technology_screenshot fails silently, with no feedback
Moving to minor issues. The error is reported to the log file which is about the best that the logic can do without a lot of annoying work-arounds to get the error back to the calling lua function. So, it's not silent and it has feedback: the log file.
If you want to get ahold of me I'm almost always on Discord.