game.take_screenshot additions.
Posted: Mon Jun 27, 2016 9:52 pm
Current game.take_screenshot options table is
My proposed update is to add surface and brightness fields to the options table
Surface is needed to make sure the screenshot is take of the right surface and not the player's current surface. This is especially important for mods that make time-lapses or create a map of your world. Now that mods like factorissimo creating multiple surfaces the chance of the screenshot being of the completely wrong surface than intended increases rapidly.
Brightness is needed to allow for screenshots to always be taken at a specific brightness level regardless of what the surface brightness currently is. Removes the need to perform ugly "hacks" to simulate this. The train cameras already seem to do this so I, naively, assume giving this power to take_screenshot is quick-n-easy.
Code: Select all
player :: LuaPlayer (optional)
by_player :: LuaPlayer (optional)
position :: Position (optional)
resolution :: Position (optional)
zoom :: double (optional)
path :: string (optional): Path to save the screenshot in
show_gui :: boolean (optional): Include game GUI in the screenshot?
show_entity_info :: boolean (optional): Include entity info (alt-mode)?
Code: Select all
player :: LuaPlayer (optional)
by_player :: LuaPlayer (optional)
position :: Position (optional)
surface :: LuaSurface (optional)
resolution :: Position (optional)
zoom :: double (optional)
path :: string (optional): Path to save the screenshot in
show_gui :: boolean (optional): Include game GUI in the screenshot?
show_entity_info :: boolean (optional): Include entity info (alt-mode)?
brightness :: double (optional) :: Take screenshot at specified brightness 14% is in-game night and 100% is normal daylight.
Brightness is needed to allow for screenshots to always be taken at a specific brightness level regardless of what the surface brightness currently is. Removes the need to perform ugly "hacks" to simulate this. The train cameras already seem to do this so I, naively, assume giving this power to take_screenshot is quick-n-easy.