Changeset 319 for trunk/AI


Ignore:
Timestamp:
Mar 19, 2021, 3:31:53 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Optimized drawing of Wonders window.
  • Modified: Used named constants for Wonders CitiID special cases.
Location:
trunk/AI/StdAI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/AI/StdAI/AI.pas

    r289 r319  
    25962596          if (iix >= 0) and (((Imp[iix].Kind in [ikNatLocal, ikNatGlobal]) and
    25972597            (RO.NatBuilt[iix] > 0)) or ((Imp[iix].Kind = ikWonder) and
    2598             (RO.Wonder[iix].CityID <> -1))) then
     2598            (RO.Wonder[iix].CityID <> WonderNotBuiltYet))) then
    25992599            CheckProd := True;
    26002600        end;
  • trunk/AI/StdAI/Barbarina.pas

    r289 r319  
    13281328  for iix := 0 to 27 do
    13291329    if (Imp[iix].Preq <> preNA) and ((Imp[iix].Preq = preNone) or
    1330       IsResearched(Imp[iix].Preq)) and (RO.Wonder[iix].CityID = -1) then
     1330      IsResearched(Imp[iix].Preq)) and (RO.Wonder[iix].CityID = WonderNotBuiltYet) then
    13311331      Inc(WonderAvailable, 1 shl iix);
    13321332  for cix := 0 to RO.nCity - 1 do
     
    15001500              if ((RO.Government <> gDespotism) or (RO.nUn >= RO.nCity * 4)) and
    15011501                not IsResearched(adMassProduction) and (Built[imPalace] > 0) and
    1502                 (RO.Wonder[woZeus].CityID = -1) and City_Improvable(cix, woZeus) then
     1502                (RO.Wonder[woZeus].CityID = WonderNotBuiltYet) and City_Improvable(cix, woZeus) then
    15031503                City_StartImprovement(cix, woZeus)
    15041504              else if (City_CurrentImprovementProject(cix) >= 0) and
  • trunk/AI/StdAI/Protocol.pas

    r289 r319  
    12651265mcHospital = mcSupplyShip;
    12661266
     1267// Wonders CityID constants
     1268WonderNotBuiltYet = -1;
     1269WonderDestroyed = -2;
     1270
    12671271type
    12681272  TServerCall = function (Command, Player, Subject: Integer; var Data)
     
    17681772procedure DelphiRandomize;
    17691773
     1774
    17701775implementation
    17711776
Note: See TracChangeset for help on using the changeset viewer.