Loading

Paste #penqudfnq

  1.     /* Build the airports for real */
  2.     local last_cost = AIAccounting();
  3.     if (AITestMode() && AIAirport.BuildAirport(airport1_location, airport1_type, airport1_stationId)) {
  4.         if (HasMoney(last_cost.GetCosts())) GetMoney(last_cost.GetCosts());
  5.     }
  6.     if (!AIAirport.BuildAirport(airport1_location, airport1_type, airport1_stationId)) {
  7.         RepayLoan();
  8.         AILog.Warning("Although the testing told us we could build 2 airports, it still failed on the first airport at tile " + airport1_location + ".");
  9.         assert(AIError.GetLastError() != AIError.ERR_STATION_TOO_SPREAD_OUT);
  10.         return -1;
  11.     }
  12.     RepayLoan();
  13.  
  14.     last_cost.ResetCosts();

Comments