-
-
Notifications
You must be signed in to change notification settings - Fork 128
Fix and improve world ping bugs #794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and improve world ping bugs #794
Conversation
- Prevent pinging invalid locations - This includes trying to ping space or planet locations that aren't part of playable world - When finding a tile under a mouse failed, attempt again but snap to expandable world objects - This will properly handle finding world objects in space - This doesn't allow pinging empty locations in space, as `GenWorld.MouseTile` cannot select those - Prevent drawing pings from planet layers that aren't currently active - When sending map location, use `PlanetTile.Invalid` rather than a surface tile with ID of 0. - When receiving pings, make sure that we received a valid ping location before accepting it
|
Thanks for getting on this so fast! I must have missed this when I pushed my PR. (Little disappointed that my PR didn't address the issue correctly, but at least it's fixed.) Is it possible to programmatically determine the visual height of a planet layer? I thought it was really neat being able to see the pings lower on the planet. |
|
There's technically the radius of the layer - but you could make a layer that's further out also have smaller radius, so it's not really a good approach. For example, for a moon that's away from the planet. Then there's height on the layers/planet tiles. However, those are a string, so you can't really rely on those. And they vary on the planet itself. Finally, each layer can define a different layer that it can zoom in/out to. But it could be set up in a way that zooming in/out transfers you from one planet/moon/space object to another, in which case we still don't really want to draw the ping. So we either have to make some assumptions here based on this information, which may turn out incorrect if we consider mods/potential future content. Or hardcode some specific interaction. Or have a list for each layer that determines pings from which layers it can see. |
|
Hm. I see… That’s unfortunate. Would you consider adding it as an experimental feature? |
Requires adding translations
|
Sorry, didn't notice this message. I've decided to add this as an option (enabled by default, since it generally should be fine). I've done this by grabbing the current player's layer, and then grabbing the layer it would zoom in in a loop (max of 25 times to prevent layers that recursively zoom into one another). |
GenWorld.MouseTilecannot select thosePlanetTile.Invalidrather than a surface tile with ID of 0.