Support for surfaces in LuaPlayer::zoom_to_world

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
ngc0202
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 04, 2020 12:42 am
Contact:

Support for surfaces in LuaPlayer::zoom_to_world

Post by ngc0202 »

TL;DR
The ability to zoom to other surfaces from alerts or mods.
What?
Though not an issue in the base game, many mods and notably Space Exploration make use of surfaces beyond just Nauvis. This works great in general, however a big sore point is that any in-game action that results in a map jump and zoom such as clicking on an alert that's tied to a location (e.g. biter attack alert) will always jump to the coordinates on the player's current surface, not the surface on which the alert's coordinates truly lie. Mods that trigger the same map zoom action via LuaPlayer::zoom_to_world suffer the same fate. Another place I've noticed the game ignore surface is the debug setting "show-recipe-icons-on-map" which will show the icons from all surfaces combined on whatever surface is being viewed.
Why?
This change would make playing mods where multiple surfaces exist much smoother.

I hope this change wouldn't be too hard to implement, but perhaps there's some reason why it's infeasible to show the map of a different surface than the player is on.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Support for surfaces in LuaPlayer::zoom_to_world

Post by ssilk »

After thinking a while about it I think it is a bug (or a number of small bugs around surface). A very low priority bug of course, but it should work correct, and described behavior shouldn’t/couldn’t be intended. So moved from suggestions to bugs.

If other opinions: just move it back. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Support for surfaces in LuaPlayer::zoom_to_world

Post by posila »

Screen goes to positions of alerts on different surfaces was already fixed in 0.17 72632
And "show-recipe-icons-on-map" has been fixed for 0.18

Adding surface parameter to LuaPlayer::zoom_to_world is an enhacement beyond scope of bug fixes, so I am moving this back to modding interface requests.

ngc0202
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 04, 2020 12:42 am
Contact:

Re: Support for surfaces in LuaPlayer::zoom_to_world

Post by ngc0202 »

I'm not sure what the expected behavior is after 72632, but it hasn't been my experience that that is fixed.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Support for surfaces in LuaPlayer::zoom_to_world

Post by Rseding91 »

ngc0202 wrote:
Fri Jan 10, 2020 1:43 pm
I'm not sure what the expected behavior is after 72632, but it hasn't been my experience that that is fixed.
Alerts from other surfaces are ignored when clicking the button. That's how it works.
If you want to get ahold of me I'm almost always on Discord.

ngc0202
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 04, 2020 12:42 am
Contact:

Re: Support for surfaces in LuaPlayer::zoom_to_world

Post by ngc0202 »

Rseding91 wrote:
Sun Jan 12, 2020 4:47 am
ngc0202 wrote:
Fri Jan 10, 2020 1:43 pm
I'm not sure what the expected behavior is after 72632, but it hasn't been my experience that that is fixed.
Alerts from other surfaces are ignored when clicking the button. That's how it works.
Gotcha. I guess now it just kinda awkwardly opens the map instead of going somewhere in particular. The move to modding interface requests makes sense then and I look forward to seeing this implemented for zoom_to_world :)

EDIT: Just noticed that while alerts are ok, when you 'ping' a location with Ctrl+Alt, the linked coordinates do send you to the wrong spot on a different surface.

Post Reply

Return to “Modding interface requests”