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

Suggestion: Add NewGRF global variable for industry density #8261

Closed
2TallTyler opened this issue Jul 4, 2020 · 1 comment
Closed

Suggestion: Add NewGRF global variable for industry density #8261

2TallTyler opened this issue Jul 4, 2020 · 1 comment

Comments

@2TallTyler
Copy link
Member

OpenTTD maintains a minimum number of industries in the world based on map size, year, and the industry density selected by the player. This method is an obstacle to NewGRFs controlling industry availability, for example to prevent steel mills before 1856, because the game doesn't reserve slots for industries which aren't available yet. Once available, the new industries only appear when another industry happens to close.

It would be simple for an industry NewGRF to calculate and reserve slots itself, but NewGRFs cannot detect the industry density selected by the player to calculate the intended number of industries in the world. If the selected industry density were made a global variable, it would give NewGRFs all the information needed to augment base game industry generation logic while seamlessly respecting the player's chosen settings.

@2TallTyler
Copy link
Member Author

Having tried this method of controlling industry totals, it's more trouble than it's worth and I'm moving back towards having vanilla OpenTTD handle industry management. Closing my request.

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

No branches or pull requests

1 participant