1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 09:52:44 +01:00

(svn r24424) [1.2] -Backport from trunk:

- Fix: Use the 'all vehicles' group for the autoreplace window from the vehicle list [FS#5239] (r24392)
- Fix: Do not consider not finding a particular base set critical; just load a different one and display an in-game error later on [FS#5233] (r24388)
- Fix: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked [FS#5188] (r24384)
- Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon) (r24382)
- Fix: Do not resize the object GUI when selecting objects. Rather clip the object name (r24379)
This commit is contained in:
rubidium
2012-07-20 19:45:31 +00:00
parent b704037039
commit d726d793ed
19 changed files with 105 additions and 73 deletions

View File

@@ -142,7 +142,7 @@ static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance)
static void CheckIfShipNeedsService(Vehicle *v)
{
if (Company::Get(v->owner)->settings.vehicle.servint_ships == 0 || !v->NeedsAutomaticServicing()) return;
if (v->IsInDepot()) {
if (v->IsChainInDepot()) {
VehicleServiceInDepot(v);
return;
}
@@ -299,7 +299,7 @@ static const TileIndexDiffC _ship_leave_depot_offs[] = {
static bool CheckShipLeaveDepot(Ship *v)
{
if (!v->IsInDepot()) return false;
if (!v->IsChainInDepot()) return false;
/* We are leaving a depot, but have to go to the exact same one; re-enter */
if (v->current_order.IsType(OT_GOTO_DEPOT) &&