Changeset 208


Ignore:
Timestamp:
May 22, 2018, 10:10:54 AM (7 years ago)
Author:
chronos
Message:
  • Added: Show number of captured win objective cells in players stats and graphs.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormCharts.lfm

    r189 r208  
    77  ClientHeight = 709
    88  ClientWidth = 944
     9  DesignTimePPI = 120
    910  OnClose = FormClose
    1011  OnShow = FormShow
    11   LCLVersion = '1.8.0.4'
     12  LCLVersion = '1.8.2.0'
    1213  object Chart1: TChart
    1314    Left = 8
     
    1718    AxisList = <   
    1819      item
     20        Marks.LabelBrush.Style = bsClear
    1921        Minors = <>
    2022        Title.LabelFont.Orientation = 900
     23        Title.LabelBrush.Style = bsClear
    2124      end   
    2225      item
    2326        Alignment = calBottom
     27        Marks.LabelBrush.Style = bsClear
    2428        Minors = <>
     29        Title.LabelBrush.Style = bsClear
    2530      end>
    2631    Foot.Brush.Color = clBtnFace
     
    3540  object ComboBox1: TComboBox
    3641    Left = 24
    37     Height = 36
     42    Height = 28
    3843    Top = 8
    3944    Width = 392
    40     ItemHeight = 0
     45    ItemHeight = 20
    4146    ItemIndex = 0
    4247    Items.Strings = (
  • trunk/Forms/UFormCharts.pas

    r189 r208  
    4141  SDiscoveredCells = 'Discovered cells';
    4242  SCitiesCount = 'Cities count';
     43  SWinObjectiveCells = 'Win objective cells';
    4344
    4445
     
    7980      else if ComboBox1.ItemIndex = 1 then NewSeries.AddXY(X, TGameTurnStat(TurnStats[X]).Units)
    8081      else if ComboBox1.ItemIndex = 2 then NewSeries.AddXY(X, TGameTurnStat(TurnStats[X]).DiscoveredCells)
    81       else if ComboBox1.ItemIndex = 3 then NewSeries.AddXY(X, TGameTurnStat(TurnStats[X]).Cities);
     82      else if ComboBox1.ItemIndex = 3 then NewSeries.AddXY(X, TGameTurnStat(TurnStats[X]).Cities)
     83      else if ComboBox1.ItemIndex = 4 then NewSeries.AddXY(X, TGameTurnStat(TurnStats[X]).WinObjectiveCells);
    8284    end;
    8385    Chart1.AddSeries(NewSeries);
     
    9799    Items.Add(SDiscoveredCells);
    98100    Items.Add(SCitiesCount);
     101    Items.Add(SWinObjectiveCells);
    99102    ItemIndex := LastIndex;
    100103  end;
  • trunk/Forms/UFormPlayersStats.lfm

    r190 r208  
    33  Height = 300
    44  Top = 637
    5   Width = 697
     5  Width = 746
    66  Caption = 'Players stats'
    77  ClientHeight = 300
    8   ClientWidth = 697
     8  ClientWidth = 746
     9  DesignTimePPI = 120
    910  OnClose = FormClose
    1011  OnShow = FormShow
    11   LCLVersion = '1.8.0.4'
     12  LCLVersion = '1.8.2.0'
    1213  object ListView1: TListView
    1314    Left = 4
    1415    Height = 292
    1516    Top = 4
    16     Width = 689
     17    Width = 738
    1718    Align = alClient
    1819    BorderSpacing.Around = 4
     
    4041      item
    4142        Caption = 'Units'
    42         Width = 169
     43        Width = 100
     44      end   
     45      item
     46        Caption = 'Win objective cells'
     47        Width = 100
    4348      end>
    4449    OwnerData = True
  • trunk/Forms/UFormPlayersStats.pas

    r190 r208  
    5757    Item.SubItems.Add(IntToStr(TotalCities));
    5858    Item.SubItems.Add(IntToStr(TotalUnits));
     59    Item.SubItems.Add(IntToStr(TotalWinObjectiveCells));
    5960  end;
    6061end;
     
    7374      4: Result := CompareInteger(TPlayer(Item1).TotalCities, TPlayer(Item2).TotalCities);
    7475      5: Result := CompareInteger(TPlayer(Item1).TotalUnits, TPlayer(Item2).TotalUnits);
     76      6: Result := CompareInteger(TPlayer(Item1).TotalWinObjectiveCells, TPlayer(Item2).TotalWinObjectiveCells);
    7577    end;
    7678    if ListViewSort1.Order = soDown then Result := -Result;
  • trunk/Languages/xtactics.cs.po

    r207 r208  
    619619msgstr "Jednotky"
    620620
     621#: tformplayersstats.listview1.columns[6].caption
     622msgctxt "tformplayersstats.listview1.columns[6].caption"
     623msgid "Win objective cells"
     624msgstr "Buňky cíle vítězství"
     625
    621626#: tformserver.buttoncancel.caption
    622627msgctxt "tformserver.buttoncancel.caption"
     
    794799msgid "Occupied cells"
    795800msgstr "Obsazené buňky"
     801
     802#: uformcharts.swinobjectivecells
     803msgctxt "uformcharts.swinobjectivecells"
     804msgid "Win objective cells"
     805msgstr "Buňky cíle vítězství"
    796806
    797807#: uformclient.sturn
  • trunk/Languages/xtactics.po

    r207 r208  
    604604msgstr ""
    605605
     606#: tformplayersstats.listview1.columns[6].caption
     607msgctxt "tformplayersstats.listview1.columns[6].caption"
     608msgid "Win objective cells"
     609msgstr ""
     610
    606611#: tformserver.buttoncancel.caption
    607612msgctxt "tformserver.buttoncancel.caption"
     
    778783msgctxt "uformcharts.soccupiedcells"
    779784msgid "Occupied cells"
     785msgstr ""
     786
     787#: uformcharts.swinobjectivecells
     788msgctxt "uformcharts.swinobjectivecells"
     789msgid "Win objective cells"
    780790msgstr ""
    781791
  • trunk/UGame.pas

    r205 r208  
    278278    DiscoveredCells: Integer;
    279279    Cities: Integer;
     280    WinObjectiveCells: Integer;
    280281    procedure LoadFromNode(Node: TDOMNode);
    281282    procedure SaveToNode(Node: TDOMNode);
     
    320321    TotalCities: Integer;
    321322    TotalDiscovered: Integer;
     323    TotalWinObjectiveCells: Integer;
    322324    StartUnits: Integer;
    323325    StartCell: TCell;
     
    541543  DiscoveredCells := ReadInteger(Node, 'DiscoveredCells', 0);
    542544  Cities := ReadInteger(Node, 'Cities', 0);
     545  WinObjectiveCells := ReadInteger(Node, 'WinObjectiveCells', 0);
    543546end;
    544547
     
    549552  WriteInteger(Node, 'DiscoveredCells', DiscoveredCells);
    550553  WriteInteger(Node, 'Cities', Cities);
     554  WriteInteger(Node, 'WinObjectiveCells', WinObjectiveCells);
    551555end;
    552556
     
    15561560  with Cell do begin
    15571561    if Assigned(Player) then begin
    1558       Player.TotalCells := Player.TotalCells + 1;
    1559       Player.TotalUnits := Player.TotalUnits + Power;
     1562      Inc(Player.TotalCells);
     1563      Inc(Player.TotalUnits, Power);
    15601564      if Terrain = ttCity then
    1561         Player.TotalCities := Player.TotalCities + 1;
     1565        Inc(Player.TotalCities);
     1566      if Extra = etObjectiveTarget then
     1567        Inc(Player.TotalWinObjectiveCells);
    15621568    end;
    15631569  end;
     
    25052511  TotalCities := 0;
    25062512  TotalDiscovered := 0;
     2513  TotalWinObjectiveCells := 0;
    25072514  TurnStats.Clear;
    25082515  StartCell := nil;
     
    31183125    TotalCells := 0;
    31193126    TotalCities := 0;
    3120 
     3127    TotalWinObjectiveCells := 0;
    31213128    TotalDiscovered := 0;
    31223129    for J := 0 to PlayerMap.Cells.Count - 1 do
     
    31413148    NewStat.Units := TotalUnits;
    31423149    NewStat.Cities := TotalCities;
     3150    NewStat.WinObjectiveCells := TotalWinObjectiveCells;
    31433151    TurnStats.Add(NewStat);
    31443152  end;
Note: See TracChangeset for help on using the changeset viewer.