diff options
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 59e92d9c9..ee42e15e8 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2141,3 +2141,23 @@ void StopGlobalFollowVehicle(const Vehicle *v) w->viewport->follow_vehicle = INVALID_VEHICLE; } } + + +/** + * This is the Callback method after the construction attempt of a primary vehicle + * @param success indicates completion (or not) of the operation + * @param tile unused + * @param p1 unused + * @param p2 unused + */ +void CcBuildPrimaryVehicle(bool success, TileIndex tile, uint32 p1, uint32 p2) +{ + if (!success) return; + + const Vehicle *v = Vehicle::Get(_new_vehicle_id); + if (v->tile == _backup_orders_tile) { + _backup_orders_tile = 0; + RestoreVehicleOrders(v); + } + ShowVehicleViewWindow(v); +} |