Changeset 330 for trunk/Core.pas


Ignore:
Timestamp:
Jul 19, 2024, 9:46:33 PM (4 months ago)
Author:
chronos
Message:
  • Fixed: New game symetric map units calcualtion.
  • Fixed: Map preview with cell and unit borders.
  • Fixed: Allow to set preferred game system grid type.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r328 r330  
    610610procedure TCore.UpdateOtherForms;
    611611begin
    612   if Assigned(FormMain.FormCharts) and FormMain.FormCharts.Visible then FormMain.FormCharts.Redraw;
    613   if Assigned(FormMain.FormUnitMoves) and FormMain.FormUnitMoves.Visible then FormMain.FormUnitMoves.ReloadList;
    614   if Assigned(FormMain.FormPlayersStats) and FormMain.FormPlayersStats.Visible then FormMain.FormPlayersStats.ReloadList;
     612  if Assigned(FormMain.FormCharts) and FormMain.FormCharts.Visible then
     613    FormMain.FormCharts.Redraw;
     614  if Assigned(FormMain.FormUnitMoves) and FormMain.FormUnitMoves.Visible then
     615    FormMain.FormUnitMoves.ReloadList;
     616  if Assigned(FormMain.FormPlayersStats) and FormMain.FormPlayersStats.Visible then
     617    FormMain.FormPlayersStats.ReloadList;
    615618end;
    616619
     
    633636  NewUnitKind: TUnitKind;
    634637  SystemsDir: string;
     638const
     639  GameSystemsDirName = 'Systems';
     640  DefaultGameSystemName = 'Default';
    635641begin
    636642  if GameFilesDir <> '' then
    637     SystemsDir := GameFilesDir + DirectorySeparator + 'Systems'
    638     else SystemsDir := 'Systems';
     643    SystemsDir := GameFilesDir + DirectorySeparator + GameSystemsDirName
     644    else SystemsDir := GameSystemsDirName;
    639645  if DirectoryExists(SystemsDir) then begin
    640646    GameSystems.LoadFromDir(SystemsDir);
     
    642648    // Create default game system if the directory with definitions was not found
    643649    NewGameSystem := TGameSystem.Create;
    644     NewGameSystem.FileName := 'HexWars';
     650    NewGameSystem.FileName := DefaultGameSystemName;
    645651    NewUnitKind := TUnitKind.Create;
    646652    NewUnitKind.Name := 'Unit';
Note: See TracChangeset for help on using the changeset viewer.