anchor.diff:    AVOID_BUILDING_HOUSE_INSIDE_LOCK = 40;
     AVOID_BUILDING_NODE_LOCK_FIELD = 45;
     AVOID_BUILDING_NODE_LOCK_ROAD = 50;
  +  AVOID_BUILDING_COAL_TILE = 80;
  +  AVOID_BUILDING_MINE_TILE = 100;
  +  AVOID_BUILDING_INACCESSIBLE_TILES = 120;
     AVOID_BUILDING_FOREST_RANGE = 150; // Value: 255 <-> AVOID_BUILDING_FOREST_VARIANCE which may forest tiles have
     AVOID_BUILDING_FOREST_MINIMUM = 255 - AVOID_BUILDING_FOREST_RANGE; // Minimum value of forest reservation tiles
  -  AVOID_BUILDING_COAL_TILE = 254;
   
   
   type
  +
  +  TKKRoadableFF = class(TKMQuickFlood)
  +  private
  +    fVisitIdx: Byte;
  +    fVisitArr, fSearchArr: TKMByte2Array;
  +  protected
  +    procedure MakeNewQueue(); override;
  +    function CanBeVisited(const aX,aY: SmallInt): Boolean; override;
  +    function IsVisited(const aX,aY: SmallInt): Boolean; override;
  +    procedure MarkAsVisited(const aX,aY: SmallInt); override;
  +  public
  +    constructor Create(aMinLimit, aMaxLimit: TKMPoint; var aSearchArr: TKMByte2Array; const aScanEightTiles: Boolean = False); reintroduce;
  +  end;
   
     //Collection of influence maps
     TKMInfluences = class
  
positive.code:   KM_CommonClasses, KM_CommonTypes, KM_Defaults, KM_Points,
    KM_Units, KM_UnitGroups,
    KM_NavMesh, KM_NavMeshInfluences,
    KM_NavMeshFloodFill;
  
  
  const
  
negative.code: 
  
  
  { TKKRoadableFF }
  constructor TKKRoadableFF.Create(aMinLimit, aMaxLimit: TKMPoint; var aSearchArr: TKMByte2Array; const aScanEightTiles: Boolean = False);
  begin
    inherited Create(aScanEightTiles);
    fVisitIdx := High(Byte);
    fSearchArr := aSearchArr;
    fMinLimit := aMinLimit;
    fMaxLimit := aMaxLimit;
    SetLength(fVisitArr, Length(fSearchArr), Length(fSearchArr[0]));
  end;
  
  
  procedure TKKRoadableFF.MakeNewQueue();
  var
    X,Y: Integer;
  begin
    if (fVisitIdx >= High(Byte) - 1) then
    begin
      fVisitIdx := 0;
      for Y := Low(fVisitArr) to High(fVisitArr) do
        for X := Low(fVisitArr[Y]) to High(fVisitArr[Y]) do
          fVisitArr[Y,X] := 0;
    end;
    fVisitIdx := fVisitIdx + 1;
    inherited MakeNewQueue();
  end;
  
  
  function TKKRoadableFF.CanBeVisited(const aX,aY: SmallInt): Boolean;
  begin
    Result := gRes.Tileset.TileIsRoadable( gTerrain.Land[aY,aX].Terrain );
  end;
  
  
  function TKKRoadableFF.IsVisited(const aX,aY: SmallInt): Boolean;
  begin
    Result := fVisitArr[aY,aX] = fVisitIdx;
  end;
  
  
  procedure TKKRoadableFF.MarkAsVisited(const aX,aY: SmallInt);
  begin
    fVisitArr[aY,aX] := fVisitIdx;
    fSearchArr[aY,aX] := 0;
  end;
  
  
  end.
  