Ignore:
Timestamp:
Apr 21, 2024, 8:55:53 PM (7 months ago)
Author:
chronos
Message:
  • Modified: Optimize code with earlier break from for cycle evaluating boolean result.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r531 r549  
    965965      else if Item = 'AITSTAT' then
    966966        for I := 0 to 3 do
    967           AddLine(Phrases2.Lookup('AITSTAT', I), pkAITStat, I)
     967          AddLine(Phrases2.Lookup('AITSTAT', I), pkAITStat, I);
    968968    end;
    969969  end;
     
    15221522          for Domain := 0 to nDomains - 1 do
    15231523            for I := 1 to nUpgrade - 1 do
    1524               if upgrade[Domain, I].Preq = No then
     1524              if Upgrade[Domain, I].Preq = No then
    15251525              begin
    1526                 if upgrade[Domain, I].Strength > 0 then
     1526                if Upgrade[Domain, I].Strength > 0 then
    15271527                  AddLine(Format(HelpText.Lookup('STRENGTHUP'),
    15281528                    [Phrases.Lookup('DOMAIN', Domain), upgrade[Domain,
    15291529                    I].Strength]), pkDomain, Domain);
    1530                 if upgrade[Domain, I].Trans > 0 then
     1530                if Upgrade[Domain, I].Trans > 0 then
    15311531                  AddLine(Format(HelpText.Lookup('TRANSUP'),
    15321532                    [Phrases.Lookup('DOMAIN', Domain), upgrade[Domain, I].Trans]
     
    15341534                if No in FutureTech then
    15351535                  AddLine(Format(HelpText.Lookup('COSTUP'),
    1536                     [upgrade[Domain, I].Cost]), pkNormal_Dot)
     1536                    [Upgrade[Domain, I].Cost]), pkNormal_Dot)
    15371537                else
    15381538                  AddLine(Format(HelpText.Lookup('COSTMIN'),
    1539                     [upgrade[Domain, I].Cost]), pkNormal_Dot)
     1539                    [Upgrade[Domain, I].Cost]), pkNormal_Dot)
    15401540              end;
    15411541          NextSection('EXPIRATION');
Note: See TracChangeset for help on using the changeset viewer.