Loading

Paste #pvhz8qahw

  1.         if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) {
  2.             cost += self._cost_no_existing_road * 2;
  3.             if (AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile) ||
  4.                     (AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile)) && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) {
  5.                 cost -= self._cost_no_existing_road;

Paste #pf3etzgbs

  1.         if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) {
  2.             if (AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile) ||
  3.                     (AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile)) && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) {
  4.                 cost += self._cost_no_existing_road;
  5.             } else {

Paste #pliwj7tdq

  1.         if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) {
  2.             local isOmniInfra = AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile);
  3.             local isOwnedInfra = AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile);
  4.             local isSelfOwnedInfra = isOwnedInfra && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF);
  5.             local multiplier = (isOmniInfra || isSelfOwnedInfra) ? 2 : 1;

Paste #puwrfr4h7

  1. function Road::_IsSlopedRoad(start, middle, end)
  2. {
  3.     local NW = 0; //Set to true if we want to build a road to / from the north-west
  4.     local NE = 0; //Set to true if we want to build a road to / from the north-east
  5.     local SW = 0; //Set to true if we want to build a road to / from the south-west

Paste #pbdz0s7v8

  1. function Road::_CostHelper(self, prev_tile, new_tile, coast_cost_only = null)
  2. {
  3.     local cost = 0;
  4.  
  5.     if (coast_cost_only != true) {

Paste #puwkoudkt

  1.         if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) {
  2.             if (!(AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile) ||
  3.                     (AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile)) && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF))) {
  4.                 cost += self._cost_no_existing_road * 2;
  5.             } else {

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;

Paste #pkoecxumh

  1. function Road::_IsSlopedRoadEfficient(start, middle, end, map_size_x = Road._map_size_x, _AITile = AITile)
  2. {
  3.     local NW = middle - map_size_x;
  4.     local NE = middle - 1;
  5.     local SE = middle + map_size_x;

Paste #pivfk1xw7

  1. function Road::_Cost(self, path, new_tile, new_direction)
  2. {
  3.     /* path == null means this is the first node of a path, so the cost is 0. */
  4.     if (path == null) return 0;

Paste #pc8x0pggn

  1. checking awk... awk
  2. detecting OS... OSX
  3. checking build system type... x86_64-apple-darwin17.7.0
  4. checking host system type... x86_64-apple-darwin17.7.0
  5. checking universal build... no

Paste #pesaw5ntw

  1. OpenTTD.OpenTTD(master)$ gcc -v
  2. Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
  3. Apple LLVM version 9.1.0 (clang-902.0.39.2)
  4. Target: x86_64-apple-darwin17.7.0
  5. Thread model: posix
  6. InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Paste #phrvnxhrz

  1. /**
  2.  * Get a list of all bridges and tunnels that can be built from the
  3.  * current tile. Tunnels will only be built if no terraforming
  4.  * is needed on both ends.
  5.  */

Paste #pkxot9vj7

  1. /**
  2.  * Get a list of all bridges and tunnels that can be built from the
  3.  * current tile. Tunnels will only be built if no terraforming
  4.  * is needed on both ends.
  5.  */

Paste #pwtccbjkr

  1. function Road::_GetDirectionEfficient(from, to, is_bridge,
  2.         map_size_x = Road._map_size_x)
  3. {
  4.     if (!is_bridge && AITile.GetSlope(to) == AITile.SLOPE_FLAT) return 0xFF;
  5.     local diff = from - to;