Changeset 294 for trunk/UClientGUI.pas


Ignore:
Timestamp:
Mar 29, 2019, 8:40:42 AM (6 years ago)
Author:
chronos
Message:
  • Modified: Change terrain type ttCity to map cell building with special type stCity.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UClientGUI.pas

    r275 r294  
    7070implementation
    7171
     72uses
     73  UBuilding;
     74
    7275resourcestring
    7376  SZeroZoomNotAlowed = 'Zero zoom not allowed';
     
    179182      Pen.Width := 1;
    180183    end else
    181     if Cell.Terrain = ttCity then begin
     184    if Assigned(Cell.Building) and (Cell.Building.Kind.SpecialType = stCity) then begin
    182185      // Cannot set clear border as it will display shifted on gtk2
    183186      //Pen.Style := psClear;
     
    441444      for Cell in ControlPlayer.PlayerMap.Cells do begin
    442445        if (Cell.MapCell.Terrain <> ttVoid) and View.IsCellVisible(Cell.MapCell) then begin
    443           if Cell.MapCell.Terrain = ttCity then begin
     446          if Assigned(Cell.MapCell.Building) and (Cell.MapCell.Building.Kind.SpecialType = stCity) then begin
    444447            // Cannot set clear border as it will display shifted on gtk2
    445448            //Pen.Style := psClear;
     
    461464        if (MapCell.Terrain <> ttVoid) and View.IsCellVisible(MapCell) then begin
    462465          if View.IsCellVisible(MapCell) and (MapCell.Terrain <> ttVoid) then begin
    463             if MapCell.Terrain = ttCity then begin
     466            if Assigned(MapCell.Building) and (MapCell.Building.Kind.SpecialType = stCity) then begin
    464467              // Cannot set clear border as it will display shifted on gtk2
    465468              //Pen.Style := psClear;
Note: See TracChangeset for help on using the changeset viewer.