forked from mirror/OpenTTD
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "company_func.h"
|
||||
#include "effectvehicle_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "station_base.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -262,7 +263,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
if (!IsHangarTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR;
|
||||
|
||||
/* Prevent building aircraft types at places which can't handle them */
|
||||
if (!CanVehicleUseStation(p1, GetStationByTile(tile))) return CMD_ERROR;
|
||||
if (!CanVehicleUseStation(p1, Station::GetByTile(tile))) return CMD_ERROR;
|
||||
|
||||
/* We will need to allocate 2 or 3 vehicle structs, depending on type */
|
||||
if (!Vehicle::CanAllocateItem(avi->subtype & AIR_CTOL ? 2 : 3)) {
|
||||
@@ -343,7 +344,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
* layout for #th position of depot. Since layout must start with a listing
|
||||
* of all depots, it is simple */
|
||||
for (uint i = 0;; i++) {
|
||||
const Station *st = GetStationByTile(tile);
|
||||
const Station *st = Station::GetByTile(tile);
|
||||
const AirportFTAClass *apc = st->Airport();
|
||||
|
||||
assert(i != apc->nof_depots);
|
||||
|
Reference in New Issue
Block a user