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]: Vehicle::motion_counter for articulated train engine parts no longer updated due to #12229
- [Bug]: Desync errors since 14.0 HOT 11
- [Bug]: Station/industry nearby industry lists can become incorrect after BuildOilRig is called
- [Bug]: Timer period modifications may violate invariants of TimerManager::base_timer_sorter std::set sorting
- [Bug]: ``screenshot minimap`` is stored incorrect place in dedicated server HOT 2
- [Crash]: Assertion failed at line 114 of D:\\a\\OpenTTD\\OpenTTD\\src\\core\\pool_type.hpp: index < this->first_unused HOT 4
- [Bug]: Passengers are not accepted by all industrial factories HOT 7
- [Bug] Avatar skin color should be a dropdown menu instead of racial selectors HOT 8
- [Crash]: "id": 3221225477, "reason": "EXCEPTION_ACCESS_VIOLATION" - OpenTTD_crash20240423150954 HOT 1
- [Bug]: Unbunch breaks CargoDist HOT 1
- [Bug]: Possible race condition in WinHTTP backend
- [Bug]: Updates on admin port are unreliable
- [Bug]: GSText maximum params HOT 1
- [Crash]: Unhandled exception in ottd:game thread: invalid stoul argument HOT 2
- [Bug]: No descriptive error message when building incorrect station layout using drag-and-drop
- Help for translating Basque (i18n issues) HOT 13
- [Bug]: No descriptive error when hostile takeover fails due to vehicle limit HOT 2
- [Crash]: Out of Memory HOT 3
- [Crash]: Segmentation fault on dedicated server launch (Linux arm64) HOT 4
- [Bug]: Incorrect length of block section in a diagonal tracks HOT 1
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.