

Editing either the orders on train 1 or train 2 are actually edits to the shared order, and so the other trains linked to this order are updated automatically. In code, a shared order as described above is created, and both train 1 and train 2 reference it. For example you set up orders on train 1, and on train 2 you say "follow train 1's orders". However this isn't necessary and you could get away with not having the shared orders window by simply 'linking' trains and automatically sharing the orders. Additionally when a shared order is modified, how should the linked vehicles respond? Maintaining where they are in the order list is probably the safest bet (as opposed to restarting from the top of the list).Ī new window may need to be added to facilitate creating, editing and deleting these shared orders. Having a shared order would solve this issue as all vehicles would reference the single shared order and updating that shared order would 'apply' the changes to all vehicles linked to that shared order.Ĭare must be taken in implementation - each vehicle still needs to store their own 'local' set of orders to maintain where in the order list they are up to and what the next waypoint/station is.
#Openttd shared orders update#
If you have a large vehicle network and all your vehicles have the same order (via cloning the vehicle, for example), then if you need to update that route, you need to manually update it for every single vehicle.
