-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Safer vehicle grabbing/dragging #76338
Conversation
9161868
to
90d0639
Compare
90d0639
to
9d59c2a
Compare
9d59c2a
to
e1fbaab
Compare
Will it perchance fix #58027? |
For vehicles with solid parts, yes; otherwise, no. Like Patrik said in #58027, that behavior is more or less a feature for convenience's sake rather than a bug when it comes to non-solid vehicles, which is why I didn't include the issue or change the behavior. It probably doesn't need the bug label. |
-grabbing vehicles distinguishes between those with and without solid parts, and those with only one tile -can't board a solid vehicle you're grabbing -vehicles with solid parts can't change angle when dragged and can only be dragged with near-parallel movement, but can be steered (if controls are intact) to turn them with a push/pull -you can't get into a vehicle with solid parts while grabbing it -fixes to some missing grab releases, vehicle->face updates
e1fbaab
to
3b70747
Compare
Not in the way that vehicles are currently, as there is a chance you'll clip into it if you reverse it. I don't have much experience with shopping cart VPs, so I don't know if they should be non-solid. It makes sense that they would be; a person can climb into a shopping cart.
This is an edge case vehicle, as it has wheels and controls but no driver's seat, and a stow board for a single solid tile. I would recommend that the stow board gets replaced with a non-solid storage tile, as this is a portable generator, and a stow board is described as a "wall" that "prevents people from seeing through it".
Also an edge case, as it has two sets of wheels and solid tiles but no controls. In real life, you'd pick up and drag a food cart or attach it to a vehicle if it wasn't already. Most food carts have some kind of pivoting wheel, though, and ours doesn't -- in fact, it doesn't even have wheel mounts! The behavior's logical as-is: you can't steer the cart, but you can still move it back and forth. I'm not planning on including these suggestions in this PR, it's large enough already. |
10 inch wheels are not described to be on pivots, but they have "STEERABLE" flag, just like shopping cart wheels.
They do not have "NEEDS_WHEEL_MOUNT_LIGHT" flag (or any other wheel mount flag). The wheel (the set of wheels) itself assumed to include the pivot-mounts, I think |
Yeah, you're right, wheel_10 should be named "swivel caster wheels" or something more descriptive. If a vehicle has a valid wheel configuration AND only has wheel_10 for wheels, it should ignore the angle check. A solid cart with swivel wheels designed to be pushed simply isn't moved the same way as a car is, and what I wrote assumes the solid vehicle is car-like, which covers most cases. Case in point, the food cart is the only solid vehicle with more than one tile that uses wheel_10, so it can addressed in a follow-up, especially since pushing a food cart in particular is pretty low-priority. |
-also fixes bad vehicle comparison from CleverRaven#76338
Follow-up to #76338: convenience balances to safer vehicle grabbing
Summary
Bugfixes "safer vehicle grabbing/dragging"
Purpose of change
Fixes #14169
Grabbing and moving a single-tile vehicle (e.g. a fridge) works fine, and doing the same with a non-solid vehicle (e.g. a bicycle) also works fine. But if you're moving a solid vehicle like a car, you can get undesirable behavior as shown in this video:
https://github.com/user-attachments/assets/0af6c9d0-c62d-4e79-9607-51db7cb2748f
In short: player/vehicle collisions, and the player phasing through the vehicle, along with the error messages for unboarding the vehicle unexpectedly.
Describe the solution
We don't want the player to phase into a vehicle using grabbing, nor do we want them to get hit by the grabbed vehicle. Therefore, restrictions are applied to grabbing and moving vehicles to make the behavior less error-prone and more realistic.
(see video below)
Describe alternatives you've considered
It's not very possible to fix these bugs without changing how vehicles are grabbed/dragged.
Testing
Manually tested every case from this list within reason: tests.txt
All tests passed locally
Additional context
Better explained with a short video:
https://github.com/user-attachments/assets/37fcb01a-66cd-4917-9c87-3a823655c06a