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

Fixes for abandoning camps #60521

Merged
merged 4 commits into from
Aug 29, 2022
Merged

Fixes for abandoning camps #60521

merged 4 commits into from
Aug 29, 2022

Conversation

angleKH
Copy link
Contributor

@angleKH angleKH commented Aug 28, 2022

Summary

Bugfixes "Fix being unable to re-establish camps near abandoned camps as well crashing when attempting to access an abandoned camp's missions"

Purpose of change

Fixes #45731, fixes #47838, and fixes #47332

Describe the solution

When the game creates a camp, it adds camps to the global camps list, but also overwrites the overmap terrain where the camp is. When the game abandons a camp it only deletes the camp from the global camps list, but does not restore the previous overmap terrain from before the camp was constructed. This fix checks for an existence of a camp by checking both things, instead of just one.

Describe alternatives you've considered

It would be better if the previous overmap terrain was restored, but I think that is currently not possible, but I am not familiar with the map system. The downside of not restoring overmap terrain is that if a new camp is constructed in the same place, only the barebones camp type can be constructed.

Testing

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Player Faction Base / Camp All about the player faction base/camp/site <Bugfix> This is a fix for a bug (or closes open issue) labels Aug 28, 2022
@Marcos6226
Copy link
Contributor

Good work!

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 28, 2022
src/faction_camp.cpp Outdated Show resolved Hide resolved
src/faction_camp.cpp Outdated Show resolved Hide resolved
@dseguin dseguin merged commit fd28f48 into CleverRaven:master Aug 29, 2022
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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
4 participants