Changeset 337
- Timestamp:
- Sep 8, 2024, 10:29:37 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ClientAI.pas
r317 r337 340 340 end; 341 341 342 343 342 end. 344 343 -
trunk/Core.lfm
r336 r337 126 126 Caption = 'Tests' 127 127 OnExecute = ATestsExecute 128 end 129 object AGameSystems: TAction 130 Category = 'Tools' 131 Caption = 'Game systems' 132 OnExecute = AGameSystemsExecute 128 133 end 129 134 end -
trunk/Core.lrj
r336 r337 23 23 {"hash":108810549,"name":"tcore.afullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110,32,109,111,100,101],"value":"Full screen mode"}, 24 24 {"hash":5950131,"name":"tcore.atests.caption","sourcebytes":[84,101,115,116,115],"value":"Tests"}, 25 {"hash":265461043,"name":"tcore.agamesystems.caption","sourcebytes":[71,97,109,101,32,115,121,115,116,101,109,115],"value":"Game systems"}, 25 26 {"hash":160200403,"name":"tcore.savedialog1.title","sourcebytes":[83,97,118,101,32,97,115],"value":"Save as"}, 26 27 {"hash":131198430,"name":"tcore.applicationinfo.description","sourcebytes":[65,32,116,117,114,110,45,98,97,115,101,100,32,115,116,114,97,116,101,103,121,32,103,97,109,101,32,105,110,115,112,105,114,101,100,32,98,121,32,99,108,97,115,115,105,99,32,82,105,115,107,32,98,111,97,114,100,32,103,97,109,101,46,32,84,104,101,32,103,97,109,101,32,105,115,32,104,105,103,104,108,121,32,99,111,110,102,105,103,117,114,97,98,108,101,32,116,111,32,97,108,108,111,119,32,116,111,32,97,100,106,117,115,116,32,98,97,116,116,108,101,32,102,105,101,108,100,32,97,110,100,32,103,97,109,101,32,114,117,108,101,115,46],"value":"A turn-based strategy game inspired by classic Risk board game. The game is highly configurable to allow to adjust battle field and game rules."} -
trunk/Core.pas
r336 r337 16 16 TCore = class(TDataModule) 17 17 AAbout: TAction; 18 AGameSystems: TAction; 18 19 ATests: TAction; 19 20 AFullscreen: TAction; … … 54 55 procedure AGameSaveAsExecute(Sender: TObject); 55 56 procedure AGameSaveExecute(Sender: TObject); 57 procedure AGameSystemsExecute(Sender: TObject); 56 58 procedure AHelpExecute(Sender: TObject); 57 59 procedure ANewSpectatorClientExecute(Sender: TObject); … … 130 132 uses 131 133 FormNew, FormSettings, ClientAI, FormKeyShortcuts, Common, FormEx, FormTests, 132 FormHelp, FormUnitMoves, FormPlayersStats, ClientGUI, FormAbout, Tests; 134 FormHelp, FormUnitMoves, FormPlayersStats, ClientGUI, FormAbout, Tests, 135 FormGameSystems; 133 136 134 137 const … … 406 409 Game.SaveToFile(Game.FileName) 407 410 else AGameSaveAs.Execute; 411 end; 412 413 procedure TCore.AGameSystemsExecute(Sender: TObject); 414 var 415 FormGameSystems: TFormGameSystems; 416 begin 417 FormGameSystems := TFormGameSystems.Create(nil); 418 try 419 FormGameSystems.GameSystems := GameSystems; 420 FormGameSystems.ShowModal; 421 finally 422 FreeAndNil(FormGameSystems); 423 end; 408 424 end; 409 425 -
trunk/Forms/FormMain.lfm
r336 r337 178 178 Action = Core.ASettings 179 179 end 180 object MenuItem37: TMenuItem 181 Action = Core.AGameSystems 182 end 183 object Separator1: TMenuItem 184 Caption = '-' 185 end 180 186 object MenuItem24: TMenuItem 181 187 Action = Core.AShowCharts -
trunk/Forms/FormMain.pas
r336 r337 52 52 MenuItem35: TMenuItem; 53 53 MenuItem36: TMenuItem; 54 MenuItem37: TMenuItem; 54 55 MenuItemDebug: TMenuItem; 55 56 MenuItem31: TMenuItem; … … 64 65 PanelMain: TPanel; 65 66 PopupMenuToolbar: TPopupMenu; 67 Separator1: TMenuItem; 66 68 Timer1: TTimer; 67 69 ToolBar1: TToolBar; -
trunk/Game.pas
r336 r337 126 126 implementation 127 127 128 uses 129 TurnStats; 130 128 131 resourcestring 129 132 SMinimumPlayers = 'You need at least one player'; -
trunk/Languages/xtactics.cs.po
r336 r337 563 563 msgstr "Uložit jako..." 564 564 565 #: tcore.agamesystems.caption 566 msgctxt "tcore.agamesystems.caption" 567 msgid "Game systems" 568 msgstr "Herní systémy" 569 565 570 #: tcore.ahelp.caption 566 571 msgctxt "tcore.ahelp.caption" … … 767 772 768 773 #: tformgamesystems.caption 774 msgctxt "tformgamesystems.caption" 769 775 msgid "Game systems" 770 776 msgstr "Herní systémy" -
trunk/Languages/xtactics.pot
r336 r337 541 541 msgstr "" 542 542 543 #: tcore.agamesystems.caption 544 msgctxt "tcore.agamesystems.caption" 545 msgid "Game systems" 546 msgstr "" 547 543 548 #: tcore.ahelp.caption 544 549 msgctxt "tcore.ahelp.caption" … … 743 748 744 749 #: tformgamesystems.caption 750 msgctxt "tformgamesystems.caption" 745 751 msgid "Game systems" 746 752 msgstr "" -
trunk/MapType.pas
r330 r337 771 771 end; 772 772 773 774 773 end. 775 774 -
trunk/Player.pas
r336 r337 5 5 uses 6 6 Classes, SysUtils, Graphics, Map, DOM, Generics.Collections, Generics.Defaults, 7 XMLConf, XML, Math, Geometry, &Unit, Nation, ItemList ;7 XMLConf, XML, Math, Geometry, &Unit, Nation, ItemList, TurnStats; 8 8 9 9 type … … 67 67 Update: Boolean; var Confirm: Boolean) of object; 68 68 TMoveUpdatedEvent = procedure(UnitMove: TUnitMove) of object; 69 70 { TGameTurnStat }71 72 TGameTurnStat = class73 OccupiedCells: Integer;74 Units: Integer;75 DiscoveredCells: Integer;76 Cities: Integer;77 WinObjectiveCells: Integer;78 procedure LoadFromNode(Node: TDOMNode);79 procedure SaveToNode(Node: TDOMNode);80 end;81 82 { TGameTurnStats }83 84 TGameTurnStats = class(TObjectList<TGameTurnStat>)85 procedure LoadFromNode(Node: TDOMNode);86 procedure SaveToNode(Node: TDOMNode);87 end;88 69 89 70 { TPlayer } … … 1320 1301 end; 1321 1302 1322 { TGameTurnStat }1323 1324 procedure TGameTurnStat.LoadFromNode(Node: TDOMNode);1325 begin1326 OccupiedCells := ReadInteger(Node, 'OccupiedCells', 0);1327 Units := ReadInteger(Node, 'Units', 0);1328 DiscoveredCells := ReadInteger(Node, 'DiscoveredCells', 0);1329 Cities := ReadInteger(Node, 'Cities', 0);1330 WinObjectiveCells := ReadInteger(Node, 'WinObjectiveCells', 0);1331 end;1332 1333 procedure TGameTurnStat.SaveToNode(Node: TDOMNode);1334 begin1335 WriteInteger(Node, 'OccupiedCells', OccupiedCells);1336 WriteInteger(Node, 'Units', Units);1337 WriteInteger(Node, 'DiscoveredCells', DiscoveredCells);1338 WriteInteger(Node, 'Cities', Cities);1339 WriteInteger(Node, 'WinObjectiveCells', WinObjectiveCells);1340 end;1341 1342 { TGameTurnStats }1343 1344 procedure TGameTurnStats.LoadFromNode(Node: TDOMNode);1345 var1346 Node2: TDOMNode;1347 NewTurnStat: TGameTurnStat;1348 begin1349 Count := 0;1350 Node2 := Node.FirstChild;1351 while Assigned(Node2) and (Node2.NodeName = 'TurnStat') do begin1352 NewTurnStat := TGameTurnStat.Create;1353 NewTurnStat.LoadFromNode(Node2);1354 Add(NewTurnStat);1355 Node2 := Node2.NextSibling;1356 end;1357 end;1358 1359 procedure TGameTurnStats.SaveToNode(Node: TDOMNode);1360 var1361 I: Integer;1362 NewNode: TDOMNode;1363 begin1364 for I := 0 to Count - 1 do begin;1365 NewNode := Node.OwnerDocument.CreateElement('TurnStat');1366 Node.AppendChild(NewNode);1367 Items[I].SaveToNode(NewNode);1368 end;1369 end;1370 1371 1303 end. 1372 1304 -
trunk/xtactics.lpi
r336 r337 110 110 </Item6> 111 111 </RequiredPackages> 112 <Units Count="4 0">112 <Units Count="41"> 113 113 <Unit0> 114 114 <Filename Value="xtactics.lpr"/> … … 320 320 <IsPartOfProject Value="True"/> 321 321 </Unit39> 322 <Unit40> 323 <Filename Value="TurnStats.pas"/> 324 <IsPartOfProject Value="True"/> 325 </Unit40> 322 326 </Units> 323 327 </ProjectOptions> -
trunk/xtactics.lpr
r336 r337 8 8 Forms, tachartlazaruspkg, Game, Core, Common, TemplateGenerics 9 9 { you can add units after this }, 10 SysUtils, FormMain, CoolStreaming, Tests ;10 SysUtils, FormMain, CoolStreaming, Tests, TurnStats; 11 11 12 12 {$R *.res}
Note:
See TracChangeset
for help on using the changeset viewer.