Difference between revisions of "NML:Sorting vehicles in the purchase list"
From GRFSpecs
Jump to navigationJump to search (Moved from http://newgrf-specs.tt-wiki.net/wiki/NML:Vehicles#Sorting_vehicles_in_the_purchase_list) |
(No difference)
|
Latest revision as of 11:12, 24 February 2015
Vehicles, Stations, Canals, Bridges, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Terrain
Sort block allows arbitrary sorting of vehicles.
sort(<feature>, [<ID>, <ID>, <ID>...]);
The engines will be sorted in the given order on the position where originally the first element was. Say the original engine sorting is this: A B C D E and you use this code sort(FEAT_TRAINS, [D, B, A]);
the final sorting will be this: C D B A E