Changeset 338 for trunk/Map.pas


Ignore:
Timestamp:
Sep 8, 2024, 10:52:50 PM (2 months ago)
Author:
chronos
Message:
  • Removed: Unused map cell power replaced by unit power.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Map.pas

    r330 r338  
    2828    FId: Integer;
    2929    FMap: TMap;
    30     FPower: Integer;
    3130    FUnit: TUnit;
    32     function GetPower: Integer;
    3331    procedure SetArea(AValue: TMapArea);
    3432    procedure SetBuilding(AValue: TBuilding);
    3533    procedure SetId(AValue: Integer);
    36     procedure SetPower(AValue: Integer);
    3734    procedure SetUnit(AValue: TUnit);
    3835  public
     
    6966    property OneUnit: TUnit read FUnit write SetUnit;
    7067    property Building: TBuilding read FBuilding write SetBuilding;
    71     //property Power: Integer read GetPower;
    7268  end;
    7369
     
    917913{ TCell }
    918914
    919 procedure TCell.SetPower(AValue: Integer);
    920 begin
    921   if FPower = AValue then Exit;
    922   if AValue < 0 then
    923     raise Exception.Create(SNegativeCellPowerNotAllowed);
    924   FPower := AValue;
    925   //Check;
    926 end;
    927 
    928915procedure TCell.SetUnit(AValue: TUnit);
    929916var
     
    990977  FBuilding := AValue;
    991978  if Assigned(FBuilding) then FBuilding.MapCell := Self;
    992 end;
    993 
    994 function TCell.GetPower: Integer;
    995 begin
    996   if Assigned(OneUnit) then Result := OneUnit.Power
    997     else Result := 0;
    998979end;
    999980
Note: See TracChangeset for help on using the changeset viewer.