Comments (13)
peter1138 wrote:
The spacing in the english.txt file is wrong; the colons need to line up :-)
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.
Meush wrote:
Done. I totally forgot about fixing that before making .patch
You mean comma "," after "&VehicleLastOrderSorter" (last entry). Sure thing, done
Also updated to r3419
Attachments
- sort_by_3419.patch (4.57 KiB)
This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment87
from openttd.
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 valuesvaluea and valueb to 0.
This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment93
from openttd.
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.
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
- vehicle_sorter.diff (4.56 KiB)
This comment was imported from FlySpray: https://bugs.openttd.org/task/35#comment95
from openttd.
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.
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.
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.
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.
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.
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.
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.
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)
- [Bug]: Won't launch if installed in /opt/ and added to $PATH HOT 2
- [Bug]: Text edit boxes do not display text added at the start, if the text is already longer than the box
- [Bug]: Company inauguration date should use calendar year in wallclock mode HOT 2
- [Bug]: Industry Chain Window - Decreased responsiveness/area of buttons (cargo names) HOT 1
- [Bug]: Road transport - pathfinder doesn't see traffic on the roads, which intensifies existing traffic jams
- [Bug]: Wrong land area information in sub-arctic landscape
- [Bug]: Building station on slopes is not posible. HOT 2
- [Bug]: Train head autoreplace operations leak a unitnumber in the case where there are 1 or more wagons HOT 1
- [Bug]: Console message "map successfully saved" appears before save actually completes
- [Bug]: Sign list - strange behavior, half of the links are unavailable HOT 2
- [Bug]: Orders window - ctrl+click on the list doesn't move the view to the selected station/depot HOT 2
- [Bug]: Manager name can be cut off in company window
- [Crash]: Game crashes when changing font type HOT 4
- [Bug]: Admin packet SERVER_WELCOME can send UINT32_MAX as seed HOT 3
- [Bug]: Nightly builds are failing since March 29 (excl. March 30) HOT 2
- [Bug]: Incorrect payment for aircraft mail secondary cargo
- [Bug]: vehicle number and group name are a bit too close HOT 3
- [Crash]: Selling a vehicle after returning to depot
- [Bug]: Click/tooltip vertical misalignment for cargo line (CFT_CARGO) in industry chain window
- [Crash]: changing setting when running OpenTTD from DropBox HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openttd.