Changeset 301 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Mar 8, 2021, 10:11:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r295 r301 786 786 function CreateTribe(p: integer; FileName: string; Original: boolean): boolean; 787 787 begin 788 if not FileExists(LocalizedFilePath('Tribes' + DirectorySeparator + FileName + 789 '.tribe.txt')) then 790 begin 791 result := false; 792 exit 788 FileName := LocalizedFilePath('Tribes' + DirectorySeparator + FileName + 789 CevoTribeExt); 790 if not FileExists(FileName) then 791 begin 792 Result := False; 793 Exit; 793 794 end; 794 795 … … 1413 1414 begin 1414 1415 UnusedTribeFiles.Clear; 1415 ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '* .tribe.txt',1416 ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt, 1416 1417 faArchive + faReadOnly, SearchRec) = 0; 1417 1418 if not ok then 1418 1419 begin 1419 1420 FindClose(SearchRec); 1420 ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '* .tribe.txt'),1421 ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt), 1421 1422 faArchive + faReadOnly, SearchRec) = 0; 1422 1423 end; 1423 1424 if ok then 1424 1425 repeat 1425 SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - 10);1426 SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - Length(CevoTribeExt)); 1426 1427 if GetTribeInfo(SearchRec.Name, Name, Color) then 1427 1428 UnusedTribeFiles.AddObject(SearchRec.Name, TObject(Color)); … … 1432 1433 function TMainScreen.ChooseUnusedTribe: integer; 1433 1434 var 1434 i, j, ColorDistance, BestColorDistance, TestColorDistance, 1435 CountBest: integer; 1435 i: Integer; 1436 j: Integer; 1437 ColorDistance: Integer; 1438 BestColorDistance: Integer; 1439 TestColorDistance: Integer; 1440 CountBest: Integer; 1436 1441 begin 1437 1442 assert(UnusedTribeFiles.Count > 0);
Note:
See TracChangeset
for help on using the changeset viewer.