Set transparency cache dirty when placing a vehicle. #78428
Merged
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
There's an intermittent but common test failure that has been cropping up recently that looks like:
Scanning through test runs, it looks like the first place it happened was https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/12087387906/job/33711062255 but that doesn't seem to be cause, it looks like #78104 is a likely culprit.
I'm not sure if this is visible in-game, because it's likely that the transparency cache at the vehicle's location gets invalidated before it comes into view anyway, but in tests we need to be able to set the scene in a more ad-hoc way.
Describe the solution
Add a transparency cache invalidation for each tile of a vehicle when it's added to the map.
Describe alternatives you've considered
I'm a little concerned about there being missing invalidations elsewhere as well, but I'm not up to digging into it right now.
Testing
Unfortunately I can't get this to reproduce locally so this is all analysis based, but worst case it should be harmless?