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

Uplink items spawned no longer push player into walls #34835

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Plykiya
Copy link

@Plykiya Plykiya commented Feb 2, 2025

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

🆑

  • add: Crates and large objects purchased from the uplink now spawn one tile in front of the player if the tile is free.
  • fix: Mime powers are now correctly blocked by mobs and walls.
  • fix: RCD can no longer deconstruct tiles that are occupied.

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S Denotes a PR that changes 10-99 lines. labels Feb 2, 2025
@Plykiya
Copy link
Author

Plykiya commented Feb 2, 2025

There should probably be some kind of audio cue as well to let the player know the purchase failed, but sound design isn't really my thing. If anyone wants to provide that, I'd be happy to add it to the PR as well.

Also, not my test fail.

@ArtisticRoomba
Copy link
Contributor

It's beautiful

@ArtisticRoomba ArtisticRoomba added T: Bugfix Type: Bugs and/or bugfixes P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. T: New Feature Type: New feature or content, or extending existing content D3: Low Difficulty: Some codebase knowledge required. S: Needs Review Status: Requires additional reviews before being fully accepted A: General Interactions Area: General in-game interactions that don't relate to another area. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: General Interactions Area: General in-game interactions that don't relate to another area. D3: Low Difficulty: Some codebase knowledge required. P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. S: Needs Review Status: Requires additional reviews before being fully accepted size/S Denotes a PR that changes 10-99 lines. T: Bugfix Type: Bugs and/or bugfixes T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
2 participants