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

Genericize vehicle handling for characters (no special avatar stuff) #75467

Merged
merged 5 commits into from
Aug 18, 2024

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Aug 5, 2024

Summary

None

Purpose of change

image

Describe the solution

Get us closer to the future. Prep the groundwork by getting rid of a bunch of assumptions that the player is the only character that can drive.

This does not enable NPCs to drive.

This is just a ton of tedious work that needs to be done before NPCs can drive, and I might as well get it out of the way.

Describe alternatives you've considered

player_in_control and a few other functions could use a renaming, but that was more churn than I wanted to deal with right now

Testing

Did some driving around with various kinds of vehicles. Jumped into them, jumped out of them, turned them on and off and on and off. Found a bug where the player couldn't start driving anything, squashed that.

Did some autodriving too, just to be sure. No issues, plays like I expect it to. Let's see how the tests do.

Additional context

There should be no functional changes.

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Aug 5, 2024
@RenechCDDA RenechCDDA force-pushed the npc_driving_infra branch 2 times, most recently from 5148114 to 7f740b4 Compare August 5, 2024 15:21
@github-actions github-actions bot added Map / Mapgen Overmap, Mapgen, Map extras, Map display Code: Tests Measurement, self-control, statistics, balancing. labels Aug 5, 2024
@RenechCDDA RenechCDDA marked this pull request as ready for review August 5, 2024 15:50
@Maleclypse
Copy link
Member

Wow that's a lot of angry vehicle tests.

@RenechCDDA
Copy link
Member Author

Just needed an override for the tests. Though all those test failures did make me reconsider some of the changes, I went for a more conservative approach with my code changes. Now there really, absolutely should be no functional changes no matter how technical. (Hopefully I don't have to force push this branch again to make it true)

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 14, 2024
@dseguin dseguin merged commit b60b8ec into CleverRaven:master Aug 18, 2024
26 checks passed
@RenechCDDA RenechCDDA deleted the npc_driving_infra branch August 19, 2024 00:52
@Alm999
Copy link
Contributor

Alm999 commented Sep 29, 2024

Apparently, remote control via drive-by-wire was broken by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants