Page 1 of 2

Patch: Build and Refit

Posted: 16 Jan 2008 14:09
by gule
v3.1 (r20538)
- update to trunk
- in list mode is buy and refit button hidden

v3.0 (r20521)
- resurrected from death :)
- update to trunk

v2.3 (r12176)
- default size of window bigger
- update to trunk

v2.2 (r12072)
- update to trunk

v2.1 (r11957)
- remove cargo buttons and replace them with dropdown

v2 (r11915)
I updated patch "Filter vehicles by cargo" and added new button "Build and Refit".
If you are in filter mode (one filter cargo selected) you can click on button "Build and Refit" and you get a new vehicle which is already refited in selected cargo. Now you can easy build the same wagon with different cargo or quicly build same trucks refited to different cargo in one click.
It is working for all vehicle types.

Old version (v1)
I made a patch to filter vehicles in build vehicle window by which cargos they can transport, so you can eazy find the right one.
My next idea is to add a button "Build and refit", which will create a new vehicle and also directly refit it to selected cargo.

Re: Patch: Filter vehicles by cargo

Posted: 16 Jan 2008 14:24
by Bilbo
I think this patch is a great area, makes orientation amongth all that various wagons for various cargoes in newgrfs much easier.

Re: Patch: Build and Refit

Posted: 18 Jan 2008 13:30
by gule
I updated this patch and add a new button "Build and Refit".
If you are in filter mode (one filter cargo selected) you can click on button "Build and Refit" and you get a new vehicle which is already refited in selected cargo.
Diff file and screenshot in first post.

Re: Patch: Build and Refit

Posted: 18 Jan 2008 14:43
by Bilbo
Nice. Also, have you added your path to the bugtracker? If not, head to http://bugs.openttd.org and add it there as patch - you increase the chance one of the devs will notice it and add it to trunk.

Re: Patch: Build and Refit

Posted: 18 Jan 2008 16:05
by planetmaker
gule wrote:v2 (r11915)
I updated patch "Filter vehicles by cargo" and added new button "Build and Refit".
This is a great feature and patch. I hope it'll make it into trunk

Re: Patch: Build and Refit

Posted: 18 Jan 2008 18:00
by Bot_40
That's an awesome idea! But I wonder if the "build and refit" button is a bit redundant. I think it would be fine to just have the regular build button do the refitting automatically when you are filtering.

Re: Patch: Build and Refit

Posted: 18 Jan 2008 19:11
by Sir A. Boey
I'll repeat what almost everybody's thinking...
OMG OMG OMG that's a very very good patch
I can't wait to see this in the trunk, this will make
choosing the right carriage much easier and
(which I regularly get) you can't forget to refit anymore!!!

Very good feature for all the absent-minded professors ;-)
[Like me, not a professor though ;-)]

Re: Patch: Build and Refit

Posted: 18 Jan 2008 22:24
by Gonozal_VIII
Great idea :D but I think the buttons at the side are problematic... e.g. with all of Georges ECS vectors loaded, they won't fit there, I also think that they are not needed... Most of the time you would only select one of them anyways... I made a little mockup out of your screenshot how I think it could be more flexible... (Sort by text removed, triangle only, enough space for a dropdown where you can select any cargo).
And as Bot_40 wrote: The Build Vehicle button should refit to the selected cargo by default

Re: Patch: Build and Refit

Posted: 19 Jan 2008 13:59
by gule
Bot_40 wrote:But I wonder if the "build and refit" button is a bit redundant. I think it would be fine to just have the regular build button do the refitting automatically when you are filtering.
Gonozal_VIII wrote:And as Bot_40 wrote: The Build Vehicle button should refit to the selected cargo by default
I do not agree with you two. I think that we have to keep both buttons, because some players will still use the old way (first build all vehicles and then refit them) and if I remove "build and refit" they can not use filter options.
Gonozal_VIII wrote:but I think the buttons at the side are problematic... e.g. with all of Georges ECS vectors loaded, they won't fit there, I also think that they are not needed... Most of the time you would only select one of them anyways... I made a little mockup out of your screenshot how I think it could be more flexible... (Sort by text removed, triangle only, enough space for a dropdown where you can select any cargo).
I know that windows can be too small to accomodate all filter buttons.
There are two solutions:
- resize window at creation time (very eazy for me)
- use dropdown (harder to code, and one click more at useing it - open dropdown -> select cargo)
So i think i will go with resizing (I am leazy :) ).

Re: Patch: Build and Refit

Posted: 20 Jan 2008 15:55
by Bilbo
But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...

Re: Patch: Build and Refit

Posted: 20 Jan 2008 17:10
by gule
Bilbo wrote:But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...
You are right. It looks like I have to make dropdown. Goodbye to my laziness..... :)

Re: Patch: Build and Refit

Posted: 22 Jan 2008 13:02
by richk67
One extra suggestion: if a wagon is only refittable to 4 cargoes, either a) only list 4 cargoes, or b) list all cargoes, but with only the available 4 enabled. Then it is nice and clear that I can have X, Y, and Z, rather than it looking as though I could choose A,B, and C as well.

Re: Patch: Build and Refit

Posted: 22 Jan 2008 16:10
by Bilbo
richk67 wrote:One extra suggestion: if a wagon is only refittable to 4 cargoes, either a) only list 4 cargoes, or b) list all cargoes, but with only the available 4 enabled. Then it is nice and clear that I can have X, Y, and Z, rather than it looking as though I could choose A,B, and C as well.
Well, but what I thought is that with this patch you first select a cargo, rthen you see all wagons capable of transporting selected cargo ...

So all cargoes (or at least all that could be transported by at least one existing wagon) would be selectable at all time ...

Re: Patch: Build and Refit

Posted: 22 Jan 2008 17:12
by Rainer
Hi Bilbo,
Bilbo wrote:Well, but what I thought is that with this patch you first select a cargo, then you see all wagons capable of transporting selected cargo ...
A big yes from my side. And I'd like to see all buttons (perhaps in two columns) and a window with more rows...

cu
Rainer

Re: Patch: Build and Refit

Posted: 23 Jan 2008 13:59
by gule
gule wrote:
Bilbo wrote:But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...
You are right. It looks like I have to make dropdown. Goodbye to my laziness..... :)
I made a new version with dropdown. It looks better now, you can see full cargo name and not just abbreviation.
Screenshot and diff file are in first post.

Re: Patch: Build and Refit

Posted: 23 Jan 2008 18:36
by Gonozal_VIII
wow nice update *downloading*

edit: compiled it with r11965, lots of vehicle newgrfs and the ecs vectors and it works fine :D only problem is, that i have to resize the new vehicle window everytime to be able to read it.. could you make the default size of that window bigger or make the buttons smaller?
another edit: could you add cargo type: none, to filter out only the engines/special cars?

Re: Patch: Build and Refit

Posted: 06 Feb 2008 20:12
by gule
Updated to trunk, diff in first post.

Re: Patch: Build and Refit

Posted: 18 Feb 2008 15:37
by gule
Gonozal_VIII wrote:compiled it with r11965, lots of vehicle newgrfs and the ecs vectors and it works fine :D only problem is, that i have to resize the new vehicle window everytime to be able to read it.. could you make the default size of that window bigger or make the buttons smaller?
I made window bigger. Diff file in first post.
Gonozal_VIII wrote:could you add cargo type: none, to filter out only the engines/special cars?
I'll try. :)

Re: Patch: Build and Refit

Posted: 17 Aug 2010 09:15
by gule
I resurrected this patch. :)
It is updated to trunk. It should work as the old version.
Diff and screenshot in first post.

Re: Patch: Build and Refit

Posted: 17 Aug 2010 09:24
by planetmaker
It seems the buttons should be next to eachother, not in two rows.