mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 03:56:43 +00:00
(svn r16803) [0.7] -Backport from trunk:
- Add: [NoAI] AIVehicle::GetReliability to get the current reliability of vehicles (r16790) - Fix: The win32 and win64 binary packages would not get their readme converted to DOS line endings (r16769) - Fix: [NoAI] AITile::GetCargoProduction/Acceptance did not accept a radius of 0 anymore (r16767) - Fix: In the refit window the "Select cargo type to carry" line always showed the ship refit tooltip [FS#3018] (r16757)
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
|
||||
/* static */ int32 AITile::GetCargoAcceptance(TileIndex tile, CargoID cargo_type, int width, int height, int radius)
|
||||
{
|
||||
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius <= 0) return -1;
|
||||
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius < 0) return -1;
|
||||
|
||||
AcceptedCargo accepts;
|
||||
::GetAcceptanceAroundTiles(accepts, tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED);
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
/* static */ int32 AITile::GetCargoProduction(TileIndex tile, CargoID cargo_type, int width, int height, int radius)
|
||||
{
|
||||
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius <= 0) return -1;
|
||||
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius < 0) return -1;
|
||||
|
||||
AcceptedCargo produced;
|
||||
::GetProductionAroundTiles(produced, tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED);
|
||||
|
||||
Reference in New Issue
Block a user