Uplink items spawned no longer push player into walls #34835
+62
−3
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.
About the PR
Uplink items that spawn impassible objects such as surplus crates or syndicate bombs will now spawn one tile in front of the player, rather than directly on the player which often displaces the player into walls.
This fix also inadvertently fixes mime walls spawning on top of players and RCD being able to deconstruct the floor under tables.
Why / Balance
Fixes #31604
Fixes #34829
Fixes #34828
When I think back on my memories of this game, the one that stands out the most is a shift I had on Oasis where I was the psychologist. I was in my office and a thief purchased an invisible crate below my office. The invisible crate pushed the player into the wall suffocating them, and since they were a new player, they did not realize they could have opened the crate to free themselves and died. I did not really have an in-character way of letting them know that it wasn't their fault, and I've wanted to fix this issue ever since.
Technical details
For the fix in the turf system, I don't really know why changing from Box2Rotated to just Box2 fixes the issue it has, but it does.
For the store UI code, the goal is to not displace any object from purchasing the item. This means checking the tile in front of the buyer and ensuring it's empty.
To do that, a dummy entity is spawned in nullspace so that we can access the components from it. If the dummy entity has any fixture with collision layers that could displace the buyer or any other mob on the tile in front of the buyer, we prevent the purchasing of the item.
Media
Before the preventative measure:
2025-02-02.12-18-15.mp4
After the preventative measure:
2025-02-02.12-18-41.mp4
Mime powers fix:
2025-02-02.12-15-16.mp4
RCD fix:
2025-02-02.12-23-00.mp4
Requirements
Breaking changes
Changelog
🆑