Patch: Small map industry selector v6 [update]
Moderator: OpenTTD Developers
Re: Patch: Small map industry selector [done]
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
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
OpenTTD-patch(es) in development: missing shores (new version of: completely shore), road lamps for each position
Re: Patch: Small map industry selector [done]
Thank you.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
![Pleased :]](./images/smilies/pleased.gif)
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.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector [done]
I worked a bit on the feature, allowing myself a few changes. Results:
- Attachments
-
- Nothing changed in here
- Now_You_See_Them.png (39.06 KiB) Viewed 2805 times
-
- Disabling has changed for grey, as it is more "universal".
Plus the legend color is the industry color without border, making it less important, thus a bit dimmed - Now_You_See_A_Few.png (41.73 KiB) Viewed 2811 times
-
- Have you noticed, no more industries on the small map ;)
- Now_You_Dont.png (38.39 KiB) Viewed 2805 times
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector [done]
And here goes the diff
- Attachments
-
- smallmap_industry_selector_r11448.diff
- (10.3 KiB) Downloaded 118 times
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Patch: Small map industry selector [done]
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 ?
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]
It is in trunk with Belugas changes.
Thank you everyone for suggestions and help.

![Pleased :]](./images/smilies/pleased.gif)
Thank you everyone for suggestions and help.
Re: Patch: Small map industry selector [in trunk r11474]
Congrats, this is one of my favorite patches
Nice to see it in trunk.

My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Re: Patch: Small map industry selector [in trunk r11474]
Sorry - not been able to check the logs. Did this make it into v0.6.0-beta1?
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector [in trunk r11474]
Nope. Sadly, i was not fast enough 

If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Patch: Small map industry selector [in trunk r11474]
Hmm .. I wonder whether it will get into beta2 once it would be out, or is there a feature freeze?
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
- Digitalfox
- Chief Executive
- Posts: 710
- Joined: 28 Oct 2004 04:42
- Location: Catch the Fox if you can...
Re: Patch: Small map industry selector [in trunk r11474]
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.0Bilbo wrote:Hmm .. I wonder whether it will get into beta2 once it would be out, or is there a feature freeze?

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..

- electricmonk
- Engineer
- Posts: 50
- Joined: 11 Aug 2006 08:20
- Location: Earth
Re: Patch: Small map industry selector [in trunk r11474]
Hi,
Finally got to try this out. Good job. Below are 3 suggestions:
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]
Very good idea. I will try to make this feature.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.
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.
- electricmonk
- Engineer
- Posts: 50
- Joined: 11 Aug 2006 08:20
- Location: Earth
Re: Patch: Small map industry selector [in trunk r11474]
And so, ECS becomes more manageable...gule wrote:Very good idea. I will try to make this feature.
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.
How about using grey as the default colour? A colour with zero saturation looks more 'unused'.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.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector [in trunk r11474]
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 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).
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...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]
Ho... and this will be quite more CPU intensive, by the way...
Do I need to express my feelings toward this one?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.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Patch: Small map industry selector [in trunk r11474]
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.belugas wrote: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...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]
Ho... and this will be quite more CPU intensive, by the way...
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.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
- electricmonk
- Engineer
- Posts: 50
- Joined: 11 Aug 2006 08:20
- Location: Earth
Re: Patch: Small map industry selector [in trunk r11474]
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: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 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).
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.belugas wrote: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...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]
Ho... and this will be quite more CPU intensive, by the way...
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.
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.belugas wrote:Do I need to express my feelings toward this one?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.
Re: Patch: Small map industry selector [in trunk r11474]
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: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.
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.electricmonk wrote:How about using grey as the default colour? A colour with zero saturation looks more 'unused'.
I agree here with Bilbo.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.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector [in trunk r11474]
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 onBilbo 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.

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.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Who is online
Users browsing this forum: Baidu [Spider] and 8 guests