(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
const AirportFTAClass *afc = ::GetAirport(type);
|
||||
return _price.build_airport * afc->size_x * afc->size_y;
|
||||
return _price[PR_BUILD_STATION_AIRPORT] * afc->size_x * afc->size_y;
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::IsHangarTile(TileIndex tile)
|
||||
|
@@ -145,7 +145,7 @@ static void _DoCommandReturnBuildBridge1(class AIInstance *instance)
|
||||
{
|
||||
if (!IsValidBridge(bridge_id)) return -1;
|
||||
|
||||
return ::CalcBridgeLenCostFactor(length) * _price.build_bridge * ::GetBridgeSpec(bridge_id)->price >> 8;
|
||||
return ::CalcBridgeLenCostFactor(length) * _price[PR_BUILD_BRIDGE] * ::GetBridgeSpec(bridge_id)->price >> 8;
|
||||
}
|
||||
|
||||
/* static */ int32 AIBridge::GetMaxLength(BridgeID bridge_id)
|
||||
|
Reference in New Issue
Block a user