- Timestamp:
- Jun 25, 2024, 1:15:02 AM (5 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GameSystem.pas
r318 r322 5 5 uses 6 6 Classes, SysUtils, Generics.Collections, &Unit, DOM, XMLRead, XMLWrite, XML, XMLConf, 7 FileUtil, LazFileUtils, MapType, Nation, Building ;7 FileUtil, LazFileUtils, MapType, Nation, Building, ItemList; 8 8 9 9 type … … 69 69 begin 70 70 I := 0; 71 while (I < Count) and ( TGameSystem(Items[I]).GetName <> Name) do Inc(I);71 while (I < Count) and (Items[I].GetName <> Name) do Inc(I); 72 72 if I < Count then Result := Items[I] 73 73 else Result := nil; -
trunk/Map.pas
r317 r322 262 262 I := 0; 263 263 while (I < Count) do begin 264 if (( TCellLink(Items[I]).Cells[0] = Cell1) and (TCellLink(Items[I]).Cells[1] = Cell2)) or265 (( TCellLink(Items[I]).Cells[0] = Cell2) and (TCellLink(Items[I]).Cells[1] = Cell1)) then264 if ((Items[I].Cells[0] = Cell1) and (Items[I].Cells[1] = Cell2)) or 265 ((Items[I].Cells[0] = Cell2) and (Items[I].Cells[1] = Cell1)) then 266 266 Break; 267 267 Inc(I); 268 268 end; 269 if I < Count then Result := TCellLink(Items[I])269 if I < Count then Result := Items[I] 270 270 else Result := nil; 271 271 end; … … 308 308 begin 309 309 for I := 0 to Count - 1 do 310 with TCellLink(Items[I])do begin310 with Items[I] do begin 311 311 NewNode2 := Node.OwnerDocument.CreateElement('CellLink'); 312 312 Node.AppendChild(NewNode2); … … 545 545 procedure TMap.LoadFromFile(FileName: string); 546 546 begin 547 548 547 end; 549 548 550 549 procedure TMap.SaveToFile(FileName: string); 551 550 begin 552 553 551 end; 554 552 … … 851 849 if Areas.Count > 1 then 852 850 for I := 0 to Areas.Count - 1 do 853 with TMapArea(Areas[I])do begin851 with Areas[I] do begin 854 852 GetBorderCells(BorderList); 855 853 if BorderList.Count > 0 then -
trunk/Player.pas
r318 r322 1277 1277 with TGame(Game).Map do 1278 1278 for I := 0 to Cells.Count - 1 do 1279 with TCell(Cells[I])do begin1279 with Cells[I] do begin 1280 1280 if (Player = Self) and ((TGame(Game).GrowCells = gcPlayerAll) or 1281 1281 ((TGame(Game).GrowCells = gcPlayerCities) and (Assigned(Building) and (Building.Kind.SpecialType = stCity)))) then begin … … 1283 1283 NewUnit := TGame(Game).Units.AddNew(TUnitKind(TGame(Game).GameSystem.UnitKinds.First), 0); 1284 1284 NewUnit.Player := Self; 1285 NewUnit.MapCell := TCell(Cells[I]);1285 NewUnit.MapCell := Cells[I]; 1286 1286 Units.Add(NewUnit); 1287 1287 end;
Note:
See TracChangeset
for help on using the changeset viewer.