Page 1 of 1

LuaControl.map_position

Posted: Tue May 12, 2020 3:41 pm
by PyroFire
FOR USE WITH [m] Map Overlay

LuaControl.map_position = position the player is at on the map screen (center point)
LuaControl.map_zoom = tells me how zoomed in the player is, specifically to determine of the surface is being drawn or if the map overlay is being drawn.
LuaControl.map_is_open = exactly what it says on the tin

defines.events.on_player_map_state_changed (or opened/closed)


.... Why?

Because factorio doesn't like it when i draw over 200,000 sprites at once.

Image

So instead i need to only draw them when they should be visible to a player.

Can't detect that for map view.

Re: LuaControl.map_position

Posted: Tue May 12, 2020 4:59 pm
by Rseding91
The zoom level, and map position are not part of the game state and so can't be read by mods because they aren't deterministic.

We aren't looking to add them because it would mean more network traffic in multiplayer and more disk space for replays - all for something the base game would never use.