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

Catchments as settings #5453

Closed
DorpsGek opened this issue Jan 27, 2013 · 8 comments
Closed

Catchments as settings #5453

DorpsGek opened this issue Jan 27, 2013 · 8 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

ComLock opened the ticket and wrote:

This patch also includes bugfix #5449

I'm not really a c++ programmer, so the airport catchments could probably be done in a prettier way.
But everything seems to work.

You might also want to have a look at:
http://www.tt-forums.net/viewtopic.php?f=32&t=63947

Attachments

Reported version: trunk
Operating system: All


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

Alberth wrote:

The nice thing about enumerations is that they behave like integers, you can use numbers like the airports as an index in an array. That should collapse your switches to a single line of code. If not, refactor duplicate code into a separate function.

I don't believe for a minute this patch actually works. Your new _settings_game variables are not getting initialized.

The load and save code is also missing. Try changing a few settings, and then saving the game, quit the program, then restart, and reload the save game. Similar problems will happen when you do this in MP (a multi-player network game).

Coding style does not even look right, we use TAB for indenting and a space between the keyword "switch" and the opening parenthesis.

Last but not least, when you change catchment areas, all kinds of things change, stations do not accept types of cargo any more, industries stop delivering to you, stations that were merged cannot co-exist any more, etc. I don't see any of that back in your patch.
I am not that well informed about that part of the code, but it would be a miracle when you literally don't have to do anything.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11913

@DorpsGek
Copy link
Member Author

frosch wrote:

Also note that airport catchment areas are defined by NewGRF.
Settings are not exactly useful for something than can be changed and overwritten by NewGRF.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11914

@DorpsGek
Copy link
Member Author

Zuu wrote:

You have removed eg. CA_TRAIN and changed some code, but not all places which uses this constant. For example ScriptStation::GetCoverageRadius is left unchanged. This method is exposed to AIs and Game Scripts. I'm surprised that your code compiles. Maybe you have compiled a build with AI + GameScript disabled?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11915

@DorpsGek
Copy link
Member Author

ComLock wrote:

I did mention I'm not really a c++ programmer... Also this was my first look at the openttd code... So I don't know it at all.
So please have some positivity...

Supercheese wrote:
Airport catchments are already configurable via grf: http://newgrf-specs.tt-wiki.net/wiki/NM ... properties

My reply
Aha, so I guess I should add more newgrf support, rather than more settings.

Yes, I did not test savegame and MP.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11924

@DorpsGek
Copy link
Member Author

ComLock wrote:

Here's a screenshot showing it actually does work.

I'll see if I can do it newgrf style instead.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11931

@DorpsGek
Copy link
Member Author

frosch wrote:

I am not convinced this feature is particulary useful at all. Why do you want to change the catchment area, and even with a GUI setting?

From a gameplay POV you can get any arbitrary catchment area anyway by joining multiple station tiles.

From a user interface POV you add a dozen setting which 1% of users might be interested to try them once.

From a code POV any attempt at coding this can only be inconsistent. Airports are dynamically added by NewGRF, so any selection of them in the settings is pointless. And adding the other station types without airports is just weird as well. Besides you might want different catchment areas for different station types or similar.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11935

@DorpsGek
Copy link
Member Author

frosch wrote:

We've discussed this briefly in a small round of devs, and don't think this feature is viable.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5453#comment11937

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Won't implement


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant