FS#2545 - Snow line height in create scenario window

Attached to Project: OpenTTD
Opened by Jose Soler (Terkhen) - Friday, 16 January 2009, 12:38 GMT
Last edited by andythenorth (andythenorth) - Monday, 14 August 2017, 20:23 GMT
Type Patch
Category Interface
Status Closed
Assigned To andythenorth (andythenorth)
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


This simple patch adds an option in the create scenario window to change the snow line height. Without this patch, if you want a flat scenario with a certain snow line height, you have to enter into random land generation to change it, then come back to the original window.

Forum thread:
This task depends upon

Closed by  andythenorth (andythenorth)
Monday, 14 August 2017, 20:23 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Mass closure of patch tickets with no commentary for >5 years. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets).
Comment by Jose Soler (Terkhen) - Friday, 16 January 2009, 12:40 GMT
Sorry, here is the patch.
Comment by Jose Soler (Terkhen) - Friday, 16 January 2009, 23:19 GMT
Changes in v0.2: Removed a few comments that have been added to trunk. Everything else keeps the same.
Comment by Jean-Francois Claeys (Belugas) - Saturday, 17 January 2009, 23:59 GMT
I've been thinking a lot about that patch.
My opinion is not to put it in trunk as it is.
The main reason is more about the fact that it should be a subset of the generation world one, not a copy of some piece.
So... my preferred solution would be to make a base class for world generation, with the parameters required for it, without trees, industries and all, just the landscape itself.
Then, the current full-blown landscape generator will inherit from base class and expand it a bit.
What do you think?
Comment by Jose Soler (Terkhen) - Sunday, 18 January 2009, 16:19 GMT
If there are plans to separate both generation methods, then adding more duplicated code, like this patch, will only complicate it: the code for snow line selection, scenario size, max height, etc, should be only in the parent class. The heightmap generation could also get data from the same base class. It could even be possible then to define another methods of map generation that use different parameters if they're needed in the future. So I think your solution is way better.

What I don't really know is how to implement both gui in this OO model, because I'm still grasping the method used in OpenTTD to make guis. The most simple way would be to define some widgets in the parent class and then the rest of them in the child class, but I dont know if that's possible to begin with... Should we have a single enum to define the widgets in both windows and have the parent parent class use only a subset of them?.