Feature: Order flag to unbunch vehicles at depot (#11945)
This commit is contained in:
@@ -387,6 +387,9 @@ static bool CheckShipLeaveDepot(Ship *v)
|
||||
{
|
||||
if (!v->IsChainInDepot()) return false;
|
||||
|
||||
/* Check if we should wait here for unbunching. */
|
||||
if (v->IsWaitingForUnbunching()) return true;
|
||||
|
||||
/* We are leaving a depot, but have to go to the exact same one; re-enter */
|
||||
if (v->current_order.IsType(OT_GOTO_DEPOT) &&
|
||||
IsShipDepotTile(v->tile) && GetDepotIndex(v->tile) == v->current_order.GetDestination()) {
|
||||
@@ -433,8 +436,9 @@ static bool CheckShipLeaveDepot(Ship *v)
|
||||
v->UpdateViewport(true, true);
|
||||
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
|
||||
|
||||
v->PlayLeaveStationSound();
|
||||
VehicleServiceInDepot(v);
|
||||
v->LeaveUnbunchingDepot();
|
||||
v->PlayLeaveStationSound();
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
SetWindowClassesDirty(WC_SHIPS_LIST);
|
||||
|
||||
|
Reference in New Issue
Block a user