Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
Improve an error message.
Describe the solution
Print the bubble coordinates of the location whose submap couldn't be found, together with the map size of the map, and the previously printed submap map square coordinates of the particular locaction within the missing submap.
Also swapped the main implementation from the untyped to the typed version of the operation while at it.
Describe alternatives you've considered
Testing
Compilation. Testing an error message that shouldn't show up is hard...
Additional context
This is prompted by the error message being printed by a failed test for a PR that didn't involve map generation and the realization that the error message didn't provide any useful info at all. The updated info would at least provide the info to tell you if the submap is out of bounds, at the edges of the map, etc. that might at least be marginally useful.