Update 25/01/09
Finally an update to trunk, scroll down to the bottom of this post for a patch file.
Update 20/10/08
Update to current trunk, including savegame bump. I also posted a combined patch file of this patch and the stop in depot order patch. See http://www.tt-forums.net/viewtopic.php? ... 76#p738076
Major Update 25/08/08
New Features! and more. Check out this post for more info and the patch file.
Topic renamed from the way-too-long 'order jump based on waiting/accepted cargo' to 'More conditional orders'
-----------------------------
Update 11/07/2008
Changes
- If the patch hits the end of the order list without finding a 'next station', it will continue searching at the top.
- 'Next station accepts' and 'Waiting at next station' are moved to the bottom of the dropdown list, both in the GUI and internally. This should make this patch fully savegame-compatible with the trunk. However, it broke savegame compatibility with the previous version

- Some coding issues were fixed. I could not fix them all before I go on holiday, though. (These are my last minutes on the internet) Further improvements of coding style, better strings and more features will have to wait a few weeks.
<<file removed>>
-----------------------------
This patch adds two more options for a conditional order jump:
- Next station accepts [cargo] is true/false
- [cargo] waiting at next station is true/false
Note: 'Next station' refers to the next real station in the order list. If no such station exists in the order list, the expression evaluates to false.
These new options can have a lot of uses, especially in combination with ECS. A few examples:
1) It becomes very easy to balance pickup from several scources. If 'cargo waiting at scource A is false', then another train is already loading there and we can go somewhere else.
2) You transport coal to an ECS steel mill. If the coal stockpile is full, the train goes to the power plant instead (see picture) 3) Distribution of stuff like ECS vehicles or fertilizer to all the industries that need them becomes a lot easier. There is no need to send the cargo to industries whose stockpile is already full any more. See the following example order list: This is my first patch (actually the first thing ever in c++). All comments/criticism regarding bugs, functionality, coding style or anything else are welcome.
This patch has one known issue; when replacing a vehicle in a depot, conditional orders and all orders following it are lost. This is not the fault of this patch, but a trunk bug (FS #2130)
The patch file is below. Patch is against r13677. Although the savegame format/version is not changed, keep in mind that savegames are not backwards compatible.