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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Initial untangling of town_cmd.cpp #11389

Merged
merged 7 commits into from Nov 28, 2023

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

While working on the Scenario Editor features suggested in #11377, I discovered that town_cmd.cpp is a hot mess.

Before I can even consider refactoring town growth code, the entire file needs some cleanup.

Description

This is a first pass at cleaning up the file. Each task is a separate commit for ease of review. I plan to rebase when merging to keep the history clear.

Yes, my last documentation commit got a bit out of hand; adding missing doxygen turned into fixing grammar and then fixing punctuation... 馃槵 I hope it's not too hard to review. 馃槂

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@2TallTyler 2TallTyler force-pushed the town_cmd_cleanup branch 3 times, most recently from 2eb614d to 35b685d Compare November 1, 2023 19:49
Copy link
Contributor

@rubidium42 rubidium42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest seems okay to me.

src/town_cmd.cpp Outdated Show resolved Hide resolved
@2TallTyler 2TallTyler enabled auto-merge (rebase) November 28, 2023 19:03
@2TallTyler 2TallTyler merged commit 4181d3c into OpenTTD:master Nov 28, 2023
20 checks passed
@2TallTyler 2TallTyler deleted the town_cmd_cleanup branch November 28, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants