Changeset 317 for trunk/Player.pas


Ignore:
Timestamp:
Jun 21, 2024, 12:44:53 PM (2 weeks ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Use TFormEx for all forms for code simplification.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Player.pas

    r316 r317  
    1 unit UPlayer;
     1unit Player;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Graphics, UMap, DOM, Generics.Collections, Generics.Defaults,
    7   XMLConf, XML, Math, UGeometry, UUnit, UNation, UItemList;
     6  Classes, SysUtils, Graphics, Map, DOM, Generics.Collections, Generics.Defaults,
     7  XMLConf, XML, Math, Geometry, &Unit, Nation, ItemList;
    88
    99type
     
    205205
    206206uses
    207   UGame, UGameSystem, UBuilding;
     207  Game, GameSystem, Building;
    208208
    209209resourcestring
     
    10301030begin
    10311031  for I := 0 to PlayerMap.Cells.Count - 1 do
    1032   with TPlayerCell(PlayerMap.Cells[I]) do begin
     1032  with PlayerMap.Cells[I] do begin
    10331033    if Assigned(MapCell.OneUnit) and (MapCell.OneUnit.Power = 0) then begin
    10341034      OneUnit := MapCell.OneUnit;
     
    10441044begin
    10451045  for I := 0 to Units.Count - 1 do
    1046     TUnit(Units[I]).Moves := TUnit(Units[I]).Kind.Moves;
     1046    Units[I].Moves := Units[I].Kind.Moves;
    10471047end;
    10481048
     
    13561356    NewNode := Node.OwnerDocument.CreateElement('TurnStat');
    13571357    Node.AppendChild(NewNode);
    1358     TGameTurnStat(Items[I]).SaveToNode(NewNode);
    1359   end;
    1360 end;
    1361 
     1358    Items[I].SaveToNode(NewNode);
     1359  end;
     1360end;
    13621361
    13631362end.
Note: See TracChangeset for help on using the changeset viewer.