Git Product home page Git Product logo

Comments (13)

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

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

from openttd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.