Page 3 of 4
Re: Patch: Small map industry selector [done]
Posted: 07 Nov 2007 17:41
by BigBB
Hi gule,
first: nice patch.
I had a look into your patch-file and you have a big problem with spaces and tabs. E.g. the only thing what you change in an original code line is a space which you add on the end (e.g. line 61/62 and more). Or you have void lines only with tabs. In line 190 have you spaces instead of tabs before the DrawString().
And this DrawString() in line 190 have a magic number which isn't needed. Replace the "16" with "TC_BLACK" and have a look if there are more magic numbers which you can remove.
As a tip: it's helpfully if you read your patchfile before publish it.
Regards,
BigBB
Re: Patch: Small map industry selector [done]
Posted: 09 Nov 2007 10:16
by gule
BigBB wrote:Hi gule,
first: nice patch.
I had a look into your patch-file and you have a big problem with spaces and tabs. E.g. the only thing what you change in an original code line is a space which you add on the end (e.g. line 61/62 and more). Or you have void lines only with tabs. In line 190 have you spaces instead of tabs before the DrawString().
And this DrawString() in line 190 have a magic number which isn't needed. Replace the "16" with "TC_BLACK" and have a look if there are more magic numbers which you can remove.
As a tip: it's helpfully if you read your patchfile before publish it.
Regards,
BigBB
Thank you.
I removed unneeded tabs and spaces and replace that magic number.
There are still a few magic numbers to replace (smallmap type, window size,...), but first i have to find the right enumerators or define new.
New version is in first post.
Re: Patch: Small map industry selector [done]
Posted: 17 Nov 2007 02:52
by belugas
I worked a bit on the feature, allowing myself a few changes. Results:
Re: Patch: Small map industry selector [done]
Posted: 17 Nov 2007 02:53
by belugas
And here goes the diff
Re: Patch: Small map industry selector [done]
Posted: 17 Nov 2007 07:05
by George
Time to put into the trunk?
Re: Patch: Small map industry selector [done]
Posted: 17 Nov 2007 08:52
by fabca2
just my poor suggestion (before going into trunk)
Instead of "enable all" and "disable all", it would be better to have "show all" and "hide all", no ?
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 10:49
by gule
It is in trunk with Belugas changes.
Thank you everyone for suggestions and help.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 17:29
by pavel1269
Congrats, this is one of my favorite patches

Nice to see it in trunk.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 17:40
by richk67
Sorry - not been able to check the logs. Did this make it into v0.6.0-beta1?
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 17:44
by belugas
Nope. Sadly, i was not fast enough

Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 19:22
by Bilbo
Hmm .. I wonder whether it will get into beta2 once it would be out, or is there a feature freeze?
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 19 Nov 2007 21:51
by Digitalfox
Bilbo wrote:Hmm .. I wonder whether it will get into beta2 once it would be out, or is there a feature freeze?
For what i understand, trunk is in a half freeze new features state ( just small medium features are inserted to prevent instability ), so this new feature will be in 0.6 beta 2 or RC's or Final 0.6.0
Basically before when a RC was released from let's say version 0.5, no new features that made their way to trunk after the branch was created would be included.. With this system of Beta's every commit made in trunk until Final 0.6 is released will be in 0.6.0.. That is if theres no RC and it copy's the system of release from 0.5.0.. Hope i made myself easy to understand..

Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 18:03
by electricmonk
Hi,
Finally got to try this out. Good job. Below are 3 suggestions:
- There should be a third button that toggles the selection (unselected industries are selected and selected industries are unselected). This is handy if you press an industry button but you forgot to press the "Disable all" button.
- If the industries come from multiple GRF files (such as the ECS vectors), there should be a means of enabling/disabling only the vectors from a specific GRF file (eg. a single ECS vector).
- If just one industry is selected, it should be possible to be able to select only those industries that accept a cargo produced by the selected industry. Likewise for selecting industries that produce cargo accepted by the selected industry.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 19:07
by gule
electricmonk wrote:
- If just one industry is selected, it should be possible to be able to select only those industries that accept a cargo produced by the selected industry. Likewise for selecting industries that produce cargo accepted by the selected industry.
Very good idea. I will try to make this feature.
But first I will add a button for selecting if disabled industries are shown in default color (red) or as grass (green). Because I like to see where are the other (not disabled) industries for better network planing.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 19:54
by electricmonk
gule wrote:Very good idea. I will try to make this feature.
And so, ECS becomes more manageable...
What if an industry produced cargoes accepted by towns? Would the towns disappear from the map if what the industry produced was not accepted by towns? Perhaps the parts of the towns that accept the cargo could be coloured differently.
gule wrote:But first I will add a button for selecting if disabled industries are shown in default color (red) or as grass (green). Because I like to see where are the other (not disabled) industries for better network planing.
How about using grey as the default colour? A colour with zero saturation looks more 'unused'.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 21:34
by belugas
electricmonk wrote:[*]If the industries come from multiple GRF files (such as the ECS vectors), there should be a means of enabling/disabling only the vectors from a specific GRF file (eg. a single ECS vector).
No way. Industries are industries, no matter where they are coming from. Although it is faisable, it is not required and is totally useless.
electricmonk wrote:[*]If just one industry is selected, it should be possible to be able to select only those industries that accept a cargo produced by the selected industry. Likewise for selecting industries that produce cargo accepted by the selected industry.[/list]
Once more, no way. This will only be usefull for a couple of minutes for the real beginners. Once they know what industry produces and requires what (all infor mations that are available easily), the feature will not be used, except maybe out of laziness. And I have very little respect of laziness...
Ho... and this will be quite more CPU intensive, by the way...
electricmonk wrote:What if an industry produced cargoes accepted by towns? Would the towns disappear from the map if what the industry produced was not accepted by towns? Perhaps the parts of the towns that accept the cargo could be coloured differently.
Do I need to express my feelings toward this one?
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 22:23
by Bilbo
belugas wrote:
electricmonk wrote:[*]If just one industry is selected, it should be possible to be able to select only those industries that accept a cargo produced by the selected industry. Likewise for selecting industries that produce cargo accepted by the selected industry.[/list]
Once more, no way. This will only be usefull for a couple of minutes for the real beginners. Once they know what industry produces and requires what (all infor mations that are available easily), the feature will not be used, except maybe out of laziness. And I have very little respect of laziness...
Ho... and this will be quite more CPU intensive, by the way...
Still better to select that in-game than digging in some readme file ... this query can be done only once at start/loading the map (what produces what) and then stored in memory.
So for temperate if you turn on this feature, then pick up coal mine, powerplants gets highlighted too. Then switch to iron ore mine and you see steel mills too, with only one click. Another function "do this with one click instead of five", which is IMHO useful not only for beginners.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 22:29
by electricmonk
belugas wrote:electricmonk wrote:[*]If the industries come from multiple GRF files (such as the ECS vectors), there should be a means of enabling/disabling only the vectors from a specific GRF file (eg. a single ECS vector).
No way. Industries are industries, no matter where they are coming from. Although it is faisable, it is not required and is totally useless.
I suppose you're right. I was thinking about the ECS vectors and immagined that it would be easier to visualise the industry-chains if only one set was displayed at a time, but seeing that there are many cross-vector links in the chain, I see your point.
belugas wrote:electricmonk wrote:[*]If just one industry is selected, it should be possible to be able to select only those industries that accept a cargo produced by the selected industry. Likewise for selecting industries that produce cargo accepted by the selected industry.[/list]
Once more, no way. This will only be usefull for a couple of minutes for the real beginners. Once they know what industry produces and requires what (all infor mations that are available easily), the feature will not be used, except maybe out of laziness. And I have very little respect of laziness...
Ho... and this will be quite more CPU intensive, by the way...
Here I have to disagree. What I had in mind was being able to select industry-types that are capable of recieving/producing cargo from/for the currently selected industry-type. That is, things like an instance of an industy-type (an individual industry) not accepting a certain type of cargo because it's stockpile is too full is not taken into account. All the code has to do is iterate through the 37 or so industry types and select them depending on whether or not they can accept/produce any type of cargo from/for the selected industry-type. This just needs to be done once. However, if the map were to display the current acceptance status of each and every individual industry in realtime, I can immagine that being CPU intensive, but that is not what I had in mind.
Now that NewIndustries has been implemented, even non-beginners will have trouble remembering all the cargo-flow possibilities. At the moment, there's ECS and PBI, and someone could just as well produce more industry-chains in the future, and every time someone wants to try a new industry-chain, they'll have to memorise an entire schema. Even though I've printed out the big schema-diagram of George's ECS vectors and refer to it frequently, I would still find being able to visualise potential cargo-flow on the map useful.
belugas wrote:electricmonk wrote:What if an industry produced cargoes accepted by towns? Would the towns disappear from the map if what the industry produced was not accepted by towns? Perhaps the parts of the towns that accept the cargo could be coloured differently.
Do I need to express my feelings toward this one?
I suppose you're right here as well. I'd guess that that could take up much CPU time. It's probably not worth the CPU-time involved.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 13 Dec 2007 22:52
by gule
electricmonk wrote:What if an industry produced cargoes accepted by towns? Would the towns disappear from the map if what the industry produced was not accepted by towns? Perhaps the parts of the towns that accept the cargo could be coloured differently.
I will not touch towns. If you select an industy and select to see which industry accept produced cargo and none industry shows up it is posible only that industry produce something for towns (goods, mail,....) or that it produce nothing.
electricmonk wrote:How about using grey as the default colour? A colour with zero saturation looks more 'unused'.
In all smallmap types are industries shown in red color, so i will use it. Like I made it in my original version of this patch.
Bilbo wrote:Still better to select that in-game than digging in some readme file ... this query can be done only once at start/loading the map (what produces what) and then stored in memory.
So for temperate if you turn on this feature, then pick up coal mine, powerplants gets highlighted too. Then switch to iron ore mine and you see steel mills too, with only one click. Another function "do this with one click instead of five", which is IMHO useful not only for beginners.
I agree here with Bilbo.
Re: Patch: Small map industry selector [in trunk r11474]
Posted: 14 Dec 2007 00:09
by belugas
Bilbo wrote:Still better to select that in-game than digging in some readme file ... this query can be done only once at start/loading the map (what produces what) and then stored in memory.
Maybe yu're not aware, but in newindustries, via callbacks, it is possible to change production and/or acceptance cargoes. Which means, if one would like to do it right, that the query at load will not reflect reality, and therefor would render the feature erroneous. So only the looping will be adequate. And then, watch out, more then one industry can accept/product given cargo. So... it's getting a bit complex, don't you think? And I was not referring to a readme file, by the way. The fund industry gui is full of infos, as well as each industry been clicked on

So, all in all, i do not see much of a problem.
One thing that i could envision, though, would be a new section, where you will have "acceptance" points and "production" points. Much like the industry section, but only showing the cargo(s) been accepted/produced. I.E: houses do producce and accept passengers. Show it. INdustru too, show it, etc...
But this will not be a simple task to do. Just that it might be considered more interesting then overcharging the industry section with tons of new features.