Loading

Paste #pzowtug1e

  1. if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) {
  2.     bool isOmniInfra = AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile);
  3.     bool isOwnedInfra = AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile);
  4.     bool isSelfOwnedInfra = isOwnedInfra && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF);
  5.     int multiplier = (isOmniInfra || isSelfOwnedInfra) ? 2 : 1;
  6.     cost += self._cost_no_existing_road * multiplier;
  7. }

Version history

Revision # Author Created at
pvhz8qahw Anonymous 24 Sep 2018, 14:01:13 UTC Diff

Comments