anchor.diff:  end;
   
   
  -{Extract one unit of stone}
  -function TKMTerrain.DecStoneDeposit(const Loc: TKMPoint): Boolean;
  +// Extract one unit of stone
  +function TKMTerrain.DecStoneDeposit(const aLoc: TKMPoint): Boolean;
   type
     TStoneTransitionType = (sttNone, sttGrass, sttCoastSand, sttDirt, sttSnow, sttSnowOnDirt);
   
  
positive.code: 
  //Find closest passable point to TargetPoint within line segment OriginPoint <-> TargetPoint
  //MaxDistance - maximum distance between finded point and origin point. MaxDistance = -1 means there is no distance restriction
  function TKMTerrain.GetPassablePointWithinSegment(OriginPoint, TargetPoint: TKMPoint;
                                                    aPass: TKMTerrainPassability;
                                                    MaxDistance: Integer = -1): TKMPoint;
  
    function IsDistBetweenPointsAllowed(const OriginPoint, TargetPoint: TKMPoint; aMaxDistance: Integer): Boolean; inline;
    begin
      Result := (aMaxDistance = -1) or (KMDistanceSqr(OriginPoint, TargetPoint) <= Sqr(aMaxDistance));
    end;
  
  var
    normVector: TKMPoint;
    normDistance: Integer;
  begin
    if MaxDistance = -1 then
      normDistance := Floor(KMLength(OriginPoint, TargetPoint))
    else
      normDistance := Min(MaxDistance, Floor(KMLength(OriginPoint, TargetPoint)));
  
    while (normDistance >= 0)
      and (not IsDistBetweenPointsAllowed(OriginPoint, TargetPoint, MaxDistance)
           or not CheckPassability(TargetPoint, aPass)) do
    begin
      normVector := KMNormVector(KMPoint(TargetPoint.X - OriginPoint.X, TargetPoint.Y - OriginPoint.Y), normDistance);
      TargetPoint := KMPoint(OriginPoint.X + normVector.X, OriginPoint.Y + normVector.Y);
      Dec(normDistance);
    end;
    Result := TargetPoint;
  end;
  
  
  
negative.code:     function CutCorn(const Loc: TKMPoint): Boolean;
      function CutGrapes(const Loc: TKMPoint): Boolean;
  
      function DecStoneDeposit(const aLoc: TKMPoint): Boolean;
      function DecOreDeposit(const aLoc: TKMPoint; aWare: TKMWareType): Boolean;
  
      function GetPassablePointWithinSegment(aOriginPoint, aTargetPoint: TKMPoint; aPass: TKMTerrainPassability; aMaxDistance: Integer = -1): TKMPoint;
      function CheckPassability(X, Y: Integer; aPass: TKMTerrainPassability): Boolean; overload;
      function CheckPassability(const Loc: TKMPoint; aPass: TKMTerrainPassability): Boolean; overload;
      function HasUnit(const Loc: TKMPoint): Boolean;
  