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

Feature: Expand all towns in the scenario editor #10215

Merged
merged 1 commit into from Dec 25, 2022

Conversation

perezdidac
Copy link
Contributor

Motivation / Problem

  • As a user, I want to make all towns grow in the scenario editor in case I want to play a game with towns and cities that have more population.
  • I asked around on Discord and people seemed excited about adding this functionality.

Description

This code change adds a button in the town window in the scenario editor that will expand all towns on the map.

Limitations

This code change does not add a button to decrease the population of all downs.

Checklist for review

N/A

@perezdidac perezdidac changed the title Feature: expand all towns in the scenario editor Feature: Expand all towns in the scenario editor Dec 4, 2022
@perezdidac perezdidac force-pushed the expandtowns branch 5 times, most recently from 7c9fe76 to 91dd77d Compare December 5, 2022 00:12
@perezdidac perezdidac marked this pull request as ready for review December 5, 2022 00:35
@perezdidac perezdidac force-pushed the expandtowns branch 2 times, most recently from 1e12c6f to 9aa70c8 Compare December 5, 2022 18:57
@2TallTyler 2TallTyler added the preview This PR is receiving preview builds label Dec 5, 2022
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 5, 2022 19:00 Inactive
src/lang/english.txt Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 6, 2022 01:14 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 6, 2022 03:26 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 6, 2022 04:16 Inactive
@LC-Zorg
Copy link

LC-Zorg commented Dec 8, 2022

It's funny, but not so long ago, that's exactly what I missed. :) I was working on a scenario where many cities were very small, literally 2-4 buildings, which often made it difficult for them to start growing at all. So I think this could be a useful feature. :)

If I had to make a comment, it would be that small cities grow too much, and big ones too little, often hardly at all. In the case of the expansion function that is in the city window, each press will enlarge the city by about 20%. Is it possible (easy to do) to make the multi-city extension work similarly?

I also think it might be worth adding a confirmation request for at least "Many random towns" - this feature is beside and accidentally pressing it when expanding towns can cause unpleasant results.

@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 8, 2022 03:54 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 9, 2022 03:56 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 14, 2022 04:24 Inactive
@2TallTyler 2TallTyler added the size: trivial This Pull Request is trivial label Dec 15, 2022
Copy link
Member

@2TallTyler 2TallTyler left a comment

Choose a reason for hiding this comment

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

If you can get these changes done promptly, this would be good to have in OpenTTD 13 (Release Candidate build and feature-freeze coming soon ™️). 😃

src/town_cmd.cpp Outdated Show resolved Hide resolved
src/town_gui.cpp Outdated Show resolved Hide resolved
src/widgets/town_widget.h Outdated Show resolved Hide resolved
@2TallTyler 2TallTyler added this to the 13.0 milestone Dec 15, 2022
@2TallTyler 2TallTyler added the work: minor details This Pull Request has some minor details left to do label Dec 16, 2022
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 24, 2022 03:45 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 24, 2022 03:56 Inactive
@perezdidac
Copy link
Contributor Author

It's funny, but not so long ago, that's exactly what I missed. :) I was working on a scenario where many cities were very small, literally 2-4 buildings, which often made it difficult for them to start growing at all. So I think this could be a useful feature. :)

If I had to make a comment, it would be that small cities grow too much, and big ones too little, often hardly at all. In the case of the expansion function that is in the city window, each press will enlarge the city by about 20%. Is it possible (easy to do) to make the multi-city extension work similarly?

I also think it might be worth adding a confirmation request for at least "Many random towns" - this feature is beside and accidentally pressing it when expanding towns can cause unpleasant results.

I made the changes that @2TallTyler suggested and now it effectively does what you suggest :D

src/town_cmd.cpp Outdated Show resolved Hide resolved
src/town_cmd.cpp Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 25, 2022 05:51 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 25, 2022 05:52 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-10215 December 25, 2022 06:00 Inactive
@perezdidac perezdidac requested review from LordAro, James103 and 2TallTyler and removed request for 2TallTyler, LordAro and James103 December 25, 2022 06:00
@2TallTyler 2TallTyler removed the work: minor details This Pull Request has some minor details left to do label Dec 25, 2022
@michicc michicc merged commit 35d55bd into OpenTTD:master Dec 25, 2022
@perezdidac
Copy link
Contributor Author

Thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview This PR is receiving preview builds size: trivial This Pull Request is trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants