-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix selling improvements for multiple cities at once #2484
Conversation
Reported by clangd.
I will keep this as a draft for now. I aim to factor out the selling of improvements into it's own function/method before merging it. |
f198525
to
07350f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to unify this with eco_report::sell_buildings
in view_economics.{h,cpp}
.
The closure already captures the environment by value.
Unifying the behavior? Showing a sell results dialog after selling the improvements from the cities view seems like a good idea, and I can do that. Unifying the code on the other hand... |
Unifying code is probably better. The function If you don't see how to do it we can open a refactoring issue. |
I followed your advice and unified the code used by both views to sell city improvements. We could also generate the question and result dialog in this central function, but I am not sure if this is considered good practice, so I left it out for now. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think we can remove the draft flag (and then I'll want to check the functionality one last time).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick on the working, else ok!
The improvement will not be sold from every city the player owns, but from every selected city.
Head branch was pushed to by a user without write access
3b63647
to
c315ae8
Compare
Closes #2483