Ignore:
Timestamp:
Mar 25, 2021, 3:02:29 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Use nWonder constant as number of wonders instead of numeric value.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r318 r328  
    14841484                hkMisc + hkCrossLink, miscGovList);
    14851485          NextSection('BUILDALLOW');
    1486           for i := 0 to 27 do
     1486          for i := 0 to nWonder - 1 do
    14871487            if Imp[i].Preq = no then
    14881488              AddImprovement(i);
    1489           for i := 28 to nImp - 1 do
     1489          for i := nWonder to nImp - 1 do
    14901490            if (Imp[i].Preq = no) and (Imp[i].Kind <> ikCommon) then
    14911491              AddImprovement(i);
    1492           for i := 28 to nImp - 1 do
     1492          for i := nWonder to nImp - 1 do
    14931493            if (Imp[i].Preq = no) and (Imp[i].Kind = ikCommon) then
    14941494              AddImprovement(i);
     
    15271527              end;
    15281528          NextSection('EXPIRATION');
    1529           for i := 0 to 27 do
     1529          for i := 0 to nWonder - 1 do
    15301530            if (Imp[i].Preq <> preNA) and (Imp[i].Expiration = no) then
    15311531              AddImprovement(i);
     
    15451545          List := THyperText.Create;
    15461546          List.OwnsObjects := True;
    1547           for i := 28 to nImp - 1 do
     1547          for i := nWonder to nImp - 1 do
    15481548            if (i <> imTrGoods) and (Imp[i].Preq <> preNA) and
    15491549              (Imp[i].Kind = ikCommon) then
     
    15581558          Caption := HelpText.Lookup('HELPTITLE_UNIQUELIST');
    15591559          // AddLine(HelpText.Lookup('HELPTITLE_UNIQUELIST'),pkSection);
    1560           for i := 28 to nImp - 1 do
     1560          for i := nWonder to nImp - 1 do
    15611561            if (Imp[i].Preq <> preNA) and
    15621562              ((Imp[i].Kind = ikNatLocal) or (Imp[i].Kind = ikNatGlobal)) then
     
    15661566            LineFeed;
    15671567            AddLine(HelpText.Lookup('HELPTITLE_SHIPPARTLIST'),pkSection);
    1568             for i:=28 to nImp-1 do
     1568            for i:= nWonder to nImp-1 do
    15691569            if (Imp[i].Preq<>preNA) and (Imp[i].Kind=ikShipPart) then
    15701570            AddLine(Phrases.Lookup('IMPROVEMENTS',i),pkSmallIcon,i,hkImp,i); }
     
    15741574          Caption := HelpText.Lookup('HELPTITLE_WONDERLIST');
    15751575          // AddLine(HelpText.Lookup('HELPTITLE_WONDERLIST'),pkSection);
    1576           for i := 0 to 27 do
     1576          for i := 0 to nWonder - 1 do
    15771577            if Imp[i].Preq <> preNA then
    15781578              AddLine(Phrases.Lookup('IMPROVEMENTS', i), pkSmallIcon, i,
     
    16001600            AddFeature(mcAcademy);
    16011601          end;
    1602           if (no < 28) and not Phrases2FallenBackToEnglish then
     1602          if (no < nWonder) and not Phrases2FallenBackToEnglish then
    16031603          begin
    16041604            LineFeed;
     
    16461646              [Phrases.Lookup('TERRAIN', 3 * 12 + i)]), pkTer, 3 * 12 + i);
    16471647          end;
    1648           if (no < 28) and (Imp[no].Expiration >= 0) then
     1648          if (no < nWonder) and (Imp[no].Expiration >= 0) then
    16491649          begin
    16501650            NextSection('EXPIRATION');
     
    16561656          end;
    16571657          NextSection('SEEALSO');
    1658           if (no < 28) and (Imp[no].Expiration >= 0) then
     1658          if (no < nWonder) and (Imp[no].Expiration >= 0) then
    16591659            AddImprovement(woEiffel);
    16601660          for i := 0 to nImpReplacement - 1 do
Note: See TracChangeset for help on using the changeset viewer.