Changeset 398
Legend:
- Unmodified
- Added
- Removed
-
trunk/Game.pas
r397 r398 11 11 DefaultPlayerStartUnits = 5; 12 12 MinPlayerCount = 1; 13 MaxPlayerCount = 8;13 MaxPlayerCount = 12; 14 14 GameFileExt = '.xtg'; 15 15 -
trunk/Map.pas
r376 r398 1058 1058 Cell: TCell; 1059 1059 begin 1060 Player := TGame(Map.Game).Players.FindById(PlayerId); 1061 OneUnit := TGame(Map.Game).Units.FindById(OneUnitId); 1060 if PlayerId <> 0 then begin 1061 Player := TGame(Map.Game).Players.FindById(PlayerId); 1062 if not Assigned(Player) then 1063 raise Exception.Create('Referenced player id ' + IntToStr(PlayerId) + ' not found.'); 1064 end else Player := nil; 1065 1066 if OneUnitId <> 0 then begin 1067 OneUnit := TGame(Map.Game).Units.FindById(OneUnitId); 1068 if not Assigned(OneUnit) then 1069 raise Exception.Create('Referenced unit id ' + IntToStr(OneUnitId) + ' not found.'); 1070 end else OneUnit := nil; 1062 1071 1063 1072 Neighbors.Count := Length(NeighborsId); -
trunk/Player.pas
r391 r398 209 209 210 210 const 211 PlayerColors: array[0..11] of TColor = (clBlue, clRed, clGreen, clYellow, 211 clDarkYellow = $00C0C0; 212 PlayerColors: array[0..11] of TColor = (clBlue, clRed, clGreen, clDarkYellow, 212 213 clFuchsia, clAqua, clOlive, clMaroon, clNavy, clPurple, clTeal, clGray); 213 214 -
trunk/Units.pas
r376 r398 188 188 procedure TUnit.FixRefId; 189 189 begin 190 Player := TGame(Game).Players.FindById(PlayerId); 191 Kind := TGame(Game).GameSystem.UnitKinds.FindById(KindId); 190 if PlayerId <> 0 then begin 191 Player := TGame(Game).Players.FindById(PlayerId); 192 if not Assigned(Player) then 193 raise Exception.Create('Referenced player id ' + IntToStr(PlayerId) + ' not found.'); 194 end else Player := nil; 195 196 if KindId <> 0 then begin 197 Kind := TGame(Game).GameSystem.UnitKinds.FindById(KindId); 198 if not Assigned(Kind) then 199 raise Exception.Create('Referenced unit kind id ' + IntToStr(KindId) + ' not found.'); 200 end else Kind := nil; 192 201 end; 193 202
Note:
See TracChangeset
for help on using the changeset viewer.