Skip to content
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 invalid item placement error #39497

Merged
merged 2 commits into from
Apr 13, 2020

Conversation

jbytheway
Copy link
Contributor

@jbytheway jbytheway commented Apr 12, 2020

Summary

SUMMARY: None

Purpose of change

To fix a common CI test failure.

Describe the solution

Sometimes items from smashed car pieces are placed outside of the map bounds during mapgen. There doesn't seem to be a reasonable way to prevent this, so just suppress the error message in the cases it is expected to occur (the item position was already being clamped to the valid bounds).

Describe alternatives you've considered

The "proper" solution here would (I think) be to have a global cache of items that were intended to be placed in locations not currently loaded, and then when those submaps are next loaded the items would be placed on them. But that's a lot of infrastructure to fix a situation that rarely occurs in practice (it's only hitting the tests so much because of the unusual way in which one particular test does its mapgen).

Testing

Verified that the error no longer appears for a seed which was previously reliably causing a test failure.

Sometimes items from smashed car pieces are placed outside of the map
bounds during mapgen.  There doesn't seem to be a reasonable way to
prevent this, so just suppress the error message in the cases it is
expected to occur (the item position was already being clamped to the
valid bounds).

This should fix one of the more common current CI test failures.
@jbytheway jbytheway changed the title Invalid tile error Fix invalid item placement error Apr 12, 2020
@jbytheway jbytheway mentioned this pull request Apr 13, 2020
@kevingranade kevingranade merged commit 28a8b92 into CleverRaven:master Apr 13, 2020
@jbytheway jbytheway deleted the invalid_tile_error branch April 13, 2020 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants