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

Vehicle position -> absolute #79528

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

PatrikLundell
Copy link
Contributor

Summary

None

Purpose of change

Convert code to keep track of which map it operates on rather than (almost) always assume it's the reality bubble.
This time the focus was on changing the vehicle position to absolute rather than bubble coordinates relative to some undefined map (typically a local mapgen one or the reality bubble). Code sort of happened to work for some reason when mapgen maps were used to generate bubble ones.

Describe the solution

Convert a few vehicle operations, but mainly change the vehicle position data.

Describe alternatives you've considered

Spend additional effort trying to work around the need for map references. That was possible in a few cases (getting the absolute position, which gets what's stored, and thus doesn't need any map reference, to feed an operation that can take either an absolute or a bubble coordinate, such as getting a monster at a location). Thus far only easy cases have been spotted.

Testing

Running tests locally (a number of errors were shown before being found, including the one stumping me on an earlier attempt).
Play testing, i.e. a couple of hours of normal game play with a lot of driving around (and thus generation of vehicles on new maps) without seeing anything odd.

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership Info / User Interface Game - player communication, menus, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display Vehicles Vehicles, parts, mechanics & interactions Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` Appliance/Power Grid Anything to do with appliances and power grid json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 3, 2025
@GuardianDll GuardianDll merged commit 88bb805 into CleverRaven:master Feb 4, 2025
28 of 29 checks passed
@PatrikLundell PatrikLundell deleted the vehicle branch February 4, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid 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. Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display NPC / Factions NPCs, AI, Speech, Factions, Ownership Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants