src/ship_cmd.cpp
changeset 10126 bed2d9d38577
parent 10098 00ebbccc6181
child 10127 ab5e35f77e87
equal deleted inserted replaced
10125:64de1e83efa8 10126:bed2d9d38577
   910 	}
   910 	}
   911 
   911 
   912 	return CommandCost();
   912 	return CommandCost();
   913 }
   913 }
   914 
   914 
       
   915 bool Ship::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
       
   916 {
       
   917 	const Depot *depot = FindClosestShipDepot(this);
       
   918 
       
   919 	if (depot == NULL) return false;
       
   920 
       
   921 	if (location    != NULL) *location    = depot->xy;
       
   922 	if (destination != NULL) *destination = depot->index;
       
   923 
       
   924 	return true;
       
   925 }
       
   926 
   915 /** Send a ship to the depot.
   927 /** Send a ship to the depot.
   916  * @param tile unused
   928  * @param tile unused
   917  * @param flags type of operation
   929  * @param flags type of operation
   918  * @param p1 vehicle ID to send to the depot
   930  * @param p1 vehicle ID to send to the depot
   919  * @param p2 various bitmasked elements
   931  * @param p2 various bitmasked elements