Changeset 618 for trunk/GameServer.pas


Ignore:
Timestamp:
Sep 15, 2024, 1:51:10 PM (2 months ago)
Author:
chronos
Message:
  • Modified: Generate random resources in editor filled map.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r614 r618  
    7575  MovieMode: Boolean): Boolean;
    7676procedure EditMap(const AMapFileName: string; Newlx, Newly, NewLandMass: Integer);
    77 procedure FillMap(TerrainType: Cardinal);
     77procedure FillMap(TerrainType: Cardinal; SpecialResources: Boolean);
    7878procedure DirectHelp(Command: Integer);
    7979function ToAutoSaveFileName(FileName: string): string;
     
    13671367end;
    13681368
    1369 procedure FillMap(TerrainType: Cardinal);
     1369procedure FillMap(TerrainType: Cardinal; SpecialResources: Boolean);
    13701370var
    13711371  Loc1: Integer;
    13721372begin
    1373   for Loc1 := 0 to MapSize - 1 do
    1374     RealMap[Loc1] := TerrainType or ($F shl 27);
     1373  if SpecialResources then begin
     1374    for Loc1 := 0 to MapSize - 1 do
     1375      EditTile(Loc1, TerrainType or ($F shl 27));
     1376  end else begin
     1377    for Loc1 := 0 to MapSize - 1 do
     1378      RealMap[Loc1] := TerrainType or ($F shl 27);
     1379  end;
    13751380end;
    13761381
     
    14111416    FreeAndNil(Map);
    14121417  end else begin
    1413     FillMap(fOcean);
     1418    FillMap(fOcean, False);
    14141419  end;
    14151420  CL := nil;
     
    30873092    sFillMap:
    30883093      if Player = 0 then begin
    3089         FillMap(TFillMapData(Data).Tile);
     3094        FillMap(TFillMapData(Data).Tile, True);
    30903095        FillChar(ObserveLevel, MapSize * 4, 0);
    30913096        DiscoverAll(Player, lObserveSuper);
Note: See TracChangeset for help on using the changeset viewer.