anchor.diff:    finally
       stm.Free;
     end;
  -  //TODO: TTerrainManager.LoadConfig
  +  FPatternConfig.ConvertConfig;
   end;
   
   procedure TTerrainManager.LoadTerrainGraphics;
  
positive.code:     WATER,
      ROCK);
  
    {$push}
    {$m+}
  
    { TTransition }
  
    TTransition = class (TCollectionItem)
    private
      FData: TStringList;
      FID: string;
      FMapping: string;
      FMinPoints: integer;
      function GetData: TStrings;
      procedure SetID(AValue: string);
      procedure SetMapping(AValue: string);
      procedure SetMinPoints(AValue: integer);
    public
      constructor Create(ACollection: TCollection); override;
      destructor Destroy; override;
    published
      property Data: TStrings read GetData;
      property Mapping: string read FMapping write SetMapping;
      property ID:string read FID write SetID;
      property MinPoints: integer read FMinPoints write SetMinPoints;
    end;
  
    { TTransitions }
  
    TTransitions = class(TArrayCollection)
    public
      constructor Create;
    end;
  
    { TTerrainPatternConfig }
  
    TTerrainPatternConfig = class
    private
      FDirt: TTransitions;
      FNormal: TTransitions;
      FRock: TTransitions;
      FSand: TTransitions;
      FWater: TTransitions;
  
    public
      constructor Create;
      destructor Destroy; override;
  
      function GetGroupConfig(AGroup: TTerrainGroup):TTransitions;
  
      function GetTerrainConfig(ATerrain: TTerrainType):TTransitions;
    published
      property Dirt: TTransitions read FDirt;
      property Normal: TTransitions read FNormal;
      property Sand: TTransitions read FSand;
      property Water: TTransitions read FWater;
      property Rock: TTransitions read FRock;
    end;
  
  
  
negative.code:   v.min:=min;
  end;
  
  { TWeightedRule }
  
  constructor TWeightedRule.Create;
  begin
    points := 0;
    name := '';
  end;
  
  function TWeightedRule.IsStandartRule: boolean;
  begin
    Result := (name = RULE_ANY)
      or (name = RULE_DIRT)
      or (name = RULE_NATIVE)
      or (name = RULE_SAND)
      or (name = RULE_TRANSITION);
  end;
  
  { TTerrainPatternConfig }
  
  procedure TTerrainPatternConfig.ConvertConfig;
  begin
    FDirt.Loaded;
    FNormal.Loaded;
    FRock.Loaded;
    FSand.Loaded;
    FWater.Loaded;
  end;
  
  constructor TTerrainPatternConfig.Create;
  begin
    FDirt := TPatterns.Create;
    FNormal := TPatterns.Create;
    FRock := TPatterns.Create;
    FSand := TPatterns.Create;
    FWater := TPatterns.Create;
  end;
  
  destructor TTerrainPatternConfig.Destroy;
  