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

Duplicate town names #4951

Closed
DorpsGek opened this issue Jan 5, 2012 · 9 comments
Closed

Duplicate town names #4951

DorpsGek opened this issue Jan 5, 2012 · 9 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 5, 2012

PaulC opened the ticket and wrote:

While testing a new town name grf I was able to generate a random map with duplicate town names.

r23732

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4951
@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 5, 2012

PaulC wrote:

I don't see anything in my nfo that might cause this; on the other hand I did notice a similar bug report for planetmaker's German Town Name grf (http://dev.openttdcoop.org/issues/2664).


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10680

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 5, 2012

PaulC wrote:

FWIW I managed to duplicate this bug on another random map (with a slightly modified grf). The common factor in both cases is that one of the duplicate towns was generated with an initial poulation of 0.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10682

@DorpsGek
Copy link
Member Author

PaulC wrote:

Can someone take another look at this? I've had the exact same thing happen using r23810.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10741

@DorpsGek
Copy link
Member Author

PaulC wrote:

Another save game, this time with the default French town names and no grfs loaded. Note that "Le Puy" appears twice, and again one of them has a zero population.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10744

@DorpsGek
Copy link
Member Author

PaulC wrote:

Same bug occurs in r23810.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10746

@DorpsGek
Copy link
Member Author

SmatZ wrote:

I am not able to reproduce that problem anymore. Can you give an example on how to reproduce that please?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10747

@DorpsGek
Copy link
Member Author

PaulC wrote:

Perhaps a large map with many towns might make it more likely to occur, but I'm not doing anything special to make this happen. It only occurs when a town has zero population at the start of the game, so just keep generating new maps until you get one.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10748

@DorpsGek
Copy link
Member Author

frosch wrote:

The population of one town is zero. In such cases the town should be removed immediately. (see CreateRandomTown())
Apparently this fails. And if it fails it tries to found a new town without rerandomising the name.

So, the bug is with the removal of the town.

Edit: Oh, so easy... first line of CmdDeleteTown says: if (_game_mode != GM_EDITOR) return CMD_ERROR;


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951#comment10757

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r23819


This comment was imported from FlySpray: https://bugs.openttd.org/task/4951

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant