Loading

Paste #pknb4f6ep

  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();
  15.     if (AITestMode() && AIAirport.BuildAirport(airport2_location, airport2_type, airport2_stationId)) {
  16.         if (HasMoney(last_cost.GetCosts())) GetMoney(last_cost.GetCosts());
  17.     }
  18.     if (!AIAirport.BuildAirport(airport2_location, airport2_type, airport2_stationId)) {
  19.         RepayLoan();
  20.         AILog.Warning("Although the testing told us we could build 2 airports, it still failed on the second airport at tile " + airport2_location + ".");
  21.         assert(AIError.GetLastError() != AIError.ERR_STATION_TOO_SPREAD_OUT);
  22.         return -1;
  23.     }
  24.     RepayLoan();

Version history

Revision # Author Created at
penqudfnq Anonymous 01 Sep 2018, 10:37:17 UTC Diff

Comments