Changeset 558 for trunk/LocalPlayer


Ignore:
Timestamp:
Apr 25, 2024, 6:31:34 PM (8 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
trunk/LocalPlayer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityType.pas

    r536 r558  
    158158  nPool := 0;
    159159  for iix := nWonder to nImp - 1 do
    160     if not(iix in Listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods)
     160    if not (iix in Listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods)
    161161      and (Imp[iix].Preq <> preNA) and
    162162      ((Imp[iix].Preq = preNone) or (MyRO.Tech[Imp[iix].Preq] >= tsApplicable))
  • trunk/LocalPlayer/Draft.pas

    r550 r558  
    419419    else
    420420      Result := 30000 + AdvValue[FeaturePreq];
    421     if not(fix in AutoFeature) then
     421    if not (fix in AutoFeature) then
    422422      Inc(Result, 90000);
    423423  end;
     
    449449function TDraftDlg.IsFeatureInList(D, I: Integer): Boolean;
    450450begin
    451   Result := not(I in AutoFeature) and (1 shl D and Feature[I].Domains <> 0) and
     451  Result := not (I in AutoFeature) and (1 shl D and Feature[I].Domains <> 0) and
    452452    (Feature[I].Preq <> preNA) and
    453453    ((Feature[I].Preq = preNone) or (Feature[I].Preq = preSun) and
     
    531531      if (X >= xFeature - 21) and (X < ClientWidth) and (ssShift in Shift) then
    532532        MainScreen.HelpDlg.ShowNewContent(WindowModeMakePersistent(FWindowMode), hkFeature, Code[I])
    533       else if not(Code[I] in AutoFeature) then
     533      else if not (Code[I] in AutoFeature) then
    534534      begin
    535535        if (Code[I] < mcFirstNonCap) and (X >= xFeature - 21) and
  • trunk/LocalPlayer/Enhance.pas

    r531 r558  
    360360    if NewJob in [jIrr, jFarm, jTrans] then
    361361      RemoveJob(jMine);
    362     if (NewJob = jRR) and not(jRoad in Done) then
     362    if (NewJob = jRR) and not (jRoad in Done) then
    363363    begin
    364364      MyData.EnhancementJobs[Page, Stage] := jRoad;
    365365      Inc(Stage);
    366366    end;
    367     if (NewJob = jFarm) and not(jIrr in Done) then
     367    if (NewJob = jFarm) and not (jIrr in Done) then
    368368    begin
    369369      MyData.EnhancementJobs[Page, Stage] := jIrr;
  • trunk/LocalPlayer/Nego.pas

    r549 r558  
    373373  begin // check techs
    374374    for I := 0 to nAdv - 1 do
    375       if not(I in FutureTech) then
     375      if not (I in FutureTech) then
    376376        if (MyRO.Tech[I] < tsSeen) and
    377377          (MyRO.EnemyReport[DipMem[Me].pContact].Tech[I] >= tsApplicable) then
     
    732732    end;
    733733    Price := ButtonPrice[TButtonN(Sender).Tag and $FF];
    734     if not(Price shr 24 in OppoAllowed) then
     734    if not (Price shr 24 in OppoAllowed) then
    735735      Exit;
    736736    case Price of
     
    845845    end;
    846846    Price := ButtonPrice[TButtonN(Sender).Tag and $FF];
    847     if not(Price shr 24 in MyAllowed) then
     847    if not (Price shr 24 in MyAllowed) then
    848848      Exit;
    849849    case Price of
     
    936936    Exit;
    937937  NewCommand := TButtonN(Sender).Tag and $FF + scDipStart;
    938   if not(NewCommand - scDipStart in CommandAllowed) then
     938  if not (NewCommand - scDipStart in CommandAllowed) then
    939939    Exit;
    940940  if (NewCommand = scDipCancelTreaty) and
  • trunk/LocalPlayer/Select.pas

    r550 r558  
    139139procedure TListDlg.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    140140begin
    141   CanClose := Closable or not(Kind in MustChooseKind);
     141  CanClose := Closable or not (Kind in MustChooseKind);
    142142end;
    143143
     
    918918  then
    919919    Include(Shift, ssShift); // don't close list window
    920   if (ssLeft in Shift) and not(ssShift in Shift) then
     920  if (ssLeft in Shift) and not (ssShift in Shift) then
    921921  begin
    922922    if Selected <> -2 then
     
    10891089            TryAddImpLine(0, I + cpImp);
    10901090        for I := nWonder to nImp - 1 do
    1091           if not(Imp[I].Kind in [ikCommon, ikTrGoods]) and
     1091          if not (Imp[I].Kind in [ikCommon, ikTrGoods]) and
    10921092            ((MyRO.NatBuilt[I] = 0) or (Imp[I].Kind = ikNatLocal)) then
    10931093            TryAddImpLine(0, I + cpImp);
     
    11821182        Inc(Lines[0]);
    11831183        for I := 0 to nAdv - 1 do
    1184           if not(I in FutureTech) and (MyRO.Tech[I] < tsApplicable) and
     1184          if not (I in FutureTech) and (MyRO.Tech[I] < tsApplicable) and
    11851185            ((AdvValue[I] < 2000) or (MyRO.Tech[adMassProduction] > tsNA)) and
    11861186            ((AdvValue[I] < 1000) or (MyRO.Tech[adScience] > tsNA)) then
     
    11941194      begin
    11951195        for I := 0 to nAdv - 1 do
    1196           if not(I in FutureTech) and (MyRO.Tech[I] >= tsApplicable) and
     1196          if not (I in FutureTech) and (MyRO.Tech[I] >= tsApplicable) and
    11971197            (MyRO.EnemyReport[DipMem[Me].pContact].Tech[I] < tsSeen) then
    11981198          begin
     
    12101210      begin
    12111211        for I := 0 to nAdv - 1 do
    1212           if not(I in FutureTech) and (MyRO.Tech[I] < tsSeen) and
     1212          if not (I in FutureTech) and (MyRO.Tech[I] < tsSeen) and
    12131213            (MyRO.EnemyReport[DipMem[Me].pContact].Tech[I] >= tsApplicable) then
    12141214          begin
     
    17431743      ShowFocus := False;
    17441744      for I := 0 to nAdv - 1 do
    1745         if not(I in FutureTech) and (MyRO.Tech[I] < tsApplicable) and
     1745        if not (I in FutureTech) and (MyRO.Tech[I] < tsApplicable) and
    17461746          ((AdvValue[I] < 2000) or (MyRO.Tech[adMassProduction] > tsNA)) and
    17471747          ((AdvValue[I] < 1000) or (MyRO.Tech[adScience] > tsNA)) and
     
    17531753  ToggleBtn.Visible := (Kind = kCities) and not Supervising or (Kind = kAdvance)
    17541754    and ShowFocus or (Kind = kModels) or (Kind = kEModels);
    1755   CloseBtn.Visible := not(Kind in MustChooseKind);
     1755  CloseBtn.Visible := not (Kind in MustChooseKind);
    17561756
    17571757  inherited ShowNewContent(NewMode, ForceClose);
  • trunk/LocalPlayer/Term.pas

    r552 r558  
    19911991              for I := 0 to nShipPart - 1 do
    19921992                if MyRO.Ship[p1].Parts[I] < ShipNeed[I] then
    1993                   Winners := Winners and not(1 shl p1);
     1993                  Winners := Winners and not (1 shl p1);
    19941994            end;
    19951995          Assert(Winners <> 0);
     
    31043104          else if CurrentMoveInfo.IsAlly then
    31053105            CurrentMoveInfo.DoShow :=
    3106               not(mAlNoMoves.Checked or mAlEffectiveMovesOnly.Checked)
     3106              not (mAlNoMoves.Checked or mAlEffectiveMovesOnly.Checked)
    31073107          else
    31083108            CurrentMoveInfo.DoShow :=
    3109               not(mEnNoMoves.Checked or mEnAttacks.Checked);
     3109              not (mEnNoMoves.Checked or mEnAttacks.Checked);
    31103110        end;
    31113111        // else keep DoShow from cShowMove/cShowAttack
     
    32113211            else if CurrentMoveInfo.IsAlly then
    32123212              CurrentMoveInfo.DoShow := not mAlNoMoves.Checked and
    3213                 not(mAlEffectiveMovesOnly.Checked and
     3213                not (mAlEffectiveMovesOnly.Checked and
    32143214                (Command <> cShowCapturing))
    32153215            else
    32163216              CurrentMoveInfo.DoShow := not mEnNoMoves.Checked and
    3217                 not(mEnAttacks.Checked and (Command <> cShowCapturing));
     3217                not (mEnAttacks.Checked and (Command <> cShowCapturing));
    32183218            if CurrentMoveInfo.DoShow then
    32193219            begin
     
    38043804    else
    38053805      Destination := Status shr 16;
    3806     Status := Status and not(usStay or usRecover) or usWaiting;
     3806    Status := Status and not (usStay or usRecover) or usWaiting;
    38073807    MoveToLoc(Destination, True);
    38083808  end;
     
    38373837    else
    38383838    begin
    3839       Status := Status and not(usStay or usRecover or usEnhance);
     3839      Status := Status and not (usStay or usRecover or usEnhance);
    38403840      MoveToLoc(maNextCity, True);
    38413841    end;
     
    57295729  if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then
    57305730    Exit;
    5731   if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then
     5731  if (Button = TMouseButton.mbLeft) and not (ssShift in Shift) then
    57325732  begin
    57335733    DoCenter := True;
     
    57535753        if MyMap[MouseLoc] and (fDeadLands or fModern) = BrushType and
    57545754          (fDeadLands or fModern) then
    5755           EditTileData.NewTile := MyMap[MouseLoc] and not(fDeadLands or fModern)
     5755          EditTileData.NewTile := MyMap[MouseLoc] and not (fDeadLands or fModern)
    57565756        else
    5757           EditTileData.NewTile := MyMap[MouseLoc] and not(fDeadLands or fModern)
     5757          EditTileData.NewTile := MyMap[MouseLoc] and not (fDeadLands or fModern)
    57585758            or BrushType
    57595759      else if BrushType and fTerImp <> 0 then
     
    57665766          (fPrefStartPos or fStartPos) then
    57675767          EditTileData.NewTile := MyMap[MouseLoc] and
    5768             not(fPrefStartPos or fStartPos)
     5768            not (fPrefStartPos or fStartPos)
    57695769        else
    57705770          EditTileData.NewTile := MyMap[MouseLoc] and
    5771             not(fPrefStartPos or fStartPos) or BrushType
     5771            not (fPrefStartPos or fStartPos) or BrushType
    57725772      else
    57735773        EditTileData.NewTile := MyMap[MouseLoc] xor BrushType;
     
    58395839        PanelPaint;
    58405840      end // own unit
    5841       else if (MyMap[MouseLoc] and fSpiedOut <> 0) and not(ssCtrl in Shift) then
     5841      else if (MyMap[MouseLoc] and fSpiedOut <> 0) and not (ssCtrl in Shift) then
    58425842      begin
    58435843        DoCenter := False;
     
    58575857  end
    58585858  else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and
    5859     not(ssShift in Shift) then
     5859    not (ssShift in Shift) then
    58605860  begin
    58615861    if Supervising then
     
    59335933          DestinationMarkON := False;
    59345934          PaintDestination;
    5935           Status := Status and not(usStay or usRecover or usEnhance) or
     5935          Status := Status and not (usStay or usRecover or usEnhance) or
    59365936            usWaiting;
    59375937          MoveToLoc(MouseLoc, False); { goto }
     
    62446244              Assert(UnFocus >= 0);
    62456245              MyUn[UnFocus].Status := MyUn[UnFocus].Status and
    6246                 not(usStay or usRecover);
     6246                not (usStay or usRecover);
    62476247              for uix := 0 to MyRO.nUn - 1 do
    62486248                if MyUn[uix].Master = UnFocus then
     
    74007400  with TUn(MyUn[UnFocus]) do begin
    74017401    if (Sender = mUtilize) and
    7402       not(Server(sRemoveUnit - sExecute, Me, UnFocus, nil^) = eUtilized) then
     7402      not (Server(sRemoveUnit - sExecute, Me, UnFocus, nil^) = eUtilized) then
    74037403    begin
    74047404      SimpleMessage(Phrases2.Lookup('SHIP_UTILIZE'));
     
    79907990  r0 := CreateRectRgn(Left, Top, Rigth, Bottom);
    79917991  for I := 0 to ControlCount - 1 do
    7992     if not(Controls[I] is TArea) and Controls[I].Visible then
     7992    if not (Controls[I] is TArea) and Controls[I].Visible then
    79937993    begin
    79947994      with Controls[I].BoundsRect do
     
    80458045      CityRepMask := CityRepMask or (1 shl (Tag shr 8))
    80468046    else
    8047       CityRepMask := CityRepMask and not(1 shl (Tag shr 8));
     8047      CityRepMask := CityRepMask and not (1 shl (Tag shr 8));
    80488048  end;
    80498049end;
Note: See TracChangeset for help on using the changeset viewer.