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

Sort vehicles by model (like in depot) #35

Closed
DorpsGek opened this issue Jan 1, 2006 · 13 comments
Closed

Sort vehicles by model (like in depot) #35

DorpsGek opened this issue Jan 1, 2006 · 13 comments
Labels
component: interface This is an interface issue 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

DorpsGek commented Jan 1, 2006

Meush opened the ticket and wrote:

This patch lets users sort theirs vehicles by model, just like in vehicle buying window.
Very small and safe patch, tested on road vehicles, ships, planes, standard trains, monorails and maglevs. Everything works fine :) Just merge it

Thank you for your time
Meush

Attachments

Reported version: trunk
Operating system: All


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

peter1138 wrote:

  1. The spacing in the english.txt file is wrong; the colons need to line up :-)

  2. It might be an idea to add a comma after &VehicleModelSorter in the the _vehicle_sorter list; it will require less changes to add things later.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment84

@DorpsGek
Copy link
Member Author

Meush wrote:

  1. Done. I totally forgot about fixing that before making .patch

  2. You mean comma "," after "&VehicleLastOrderSorter" (last entry). Sure thing, done

Also updated to r3419

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment87

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2006

Darkvater wrote:

The value and type-sorter look fine, although I fail to see the usefulness of the order-sorter.
Also don't forget to initialize the variables:
+int valuea;
+int valueb;
+do valuea += va->value; while ( (va=va->next) != NULL); //go through all wagons
+do valueb += vb->value; while ( (vb=vb->next) != NULL); //and count their values

valuea and valueb to 0.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment93

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2006

Meush wrote:

I think the order sorter is almost as useful as model sorter.
It makes the job easier especially with giant bus/airplane network, aswell as with trains.

With this, all vehicles going to station A will be in one section.
"Last order" lets user sort all vehicles by the last station, which is usually unloading station for cargo.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment94

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 2, 2006

peter1138 wrote:

I've looked at this a bit more... the value sorter doesn't work, amongst other stuff, so here's an updated version...

I'm dubious of the GetStation()s (without checking return value) too. What'll happen if a station is removed?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment95

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 2, 2006

Meush wrote:

I'll take a look at GetStation in the ordering related files
I'll find the lines that display "Invalid station" or "Void order".

Thank you peter1138


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment96

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 2, 2006

peter1138 wrote:

Ok, the sorting by orders does need more work. Currently what it does is pretty pointless; You've got the index in the order list, so there is no need to use GetStation() to get the index from that. However, it's also doing this without checking the order type (see the OT_* enum)

It may just be enough to sort by the order->station value, but they are not unique. Perhaps it could include the order->type in the sort?


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment97

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 4, 2006

Meush wrote:

Thank you for merging it.
Now I'll work on the stations sorter, and I think it would be the best to simply sort by station names. What do you think about it?


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment102

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 7, 2006

peter1138 wrote:

Sorting by station names really requires the station name to be visible, to be meaningful. Can you make that happen? :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment105

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2006

Darkvater wrote:

I still think station sorter is unneeded, at least if we are talking about sorting the vehicle-list by stations. Why? Exactly because of that. Whenever you click on a station you already get a sorted list of all vehicles scheduled there so there is no need for the same thing to be in the vehicle-list.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment106

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2006

Meush wrote:

Hmm you might right Darkvater... It would be putting too much to code something similiar that already exist, just in the other window.

peter1138, I may do this. Not exacly for the station sorter, if we won't have it, but it can be done for age, value, max speed, cargo, model etc.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment107

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2006

Darkvater wrote:

Those are already implemented :)
If you want to do sorting this much, I'd rather have you look at the station-sorter patch on SF and see in what state that is.


This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment108

@DorpsGek
Copy link
Member Author

peter1138 closed the ticket.

Reason for closing: Implemented

Well, most of it implemented...


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

@DorpsGek DorpsGek added component: interface This is an interface issue 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 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue 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