(svn r21866) -Feature [FS#4394]: [NewGRF] Rail type property to influence sorting of rail types in the drop down list

This commit is contained in:
rubidium
2011-01-20 12:22:38 +00:00
parent 6a2ae92811
commit 2f6c840ebf
5 changed files with 42 additions and 0 deletions

View File

@@ -106,6 +106,14 @@ RailType AllocateRailType(RailTypeLabel label)
/* We also introduce ourself. */
rti->introduces_railtypes = (RailTypes)(1 << rt);
/* Default sort order; order of allocation, but with some
* offsets so it's easier for NewGRF to pick a spot without
* changing the order of other (original) rail types.
* The << is so you can place other railtypes in between the
* other railtypes, the 7 is to be able to place something
* before the first (default) rail type. */
rti->sorting_order = rt << 4 | 7;
return rt;
}
}