Changeset 282 for trunk/UGameSystem.pas
- Timestamp:
- Mar 10, 2019, 4:48:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGameSystem.pas
r281 r282 7 7 uses 8 8 Classes, SysUtils, fgl, UUnit, DOM, XMLRead, XMLWrite, UXMLUtils, XMLConf, 9 FileUtil, UMapType ;9 FileUtil, UMapType, UNation; 10 10 11 11 type … … 22 22 UnitsMoveImmediately: Boolean; 23 23 PreferedMapType: TMapType; 24 Nations: TNations; 24 25 constructor Create; 25 26 destructor Destroy; override; … … 75 76 begin 76 77 UnitKinds := TUnitKinds.Create; 78 Nations := TNations.Create; 77 79 end; 78 80 79 81 destructor TGameSystem.Destroy; 80 82 begin 83 Nations.Free; 81 84 UnitKinds.Free; 82 85 inherited Destroy; … … 86 89 begin 87 90 UnitKinds.Clear; 91 Nations.Clear; 88 92 end; 89 93 … … 102 106 PreferedMapType := Source.PreferedMapType; 103 107 UnitKinds.Assign(Source.UnitKinds); 108 Nations.Assign(Source.Nations); 104 109 end; 105 110 … … 116 121 if Assigned(NewNode) then 117 122 UnitKinds.LoadFromNode(NewNode); 123 NewNode := Node.FindNode('Nations'); 124 if Assigned(NewNode) then 125 Nations.LoadFromNode(NewNode); 118 126 end; 119 127 … … 130 138 Node.AppendChild(NewNode); 131 139 UnitKinds.SaveToNode(NewNode); 140 NewNode := Node.OwnerDocument.CreateElement('Nations'); 141 Node.AppendChild(NewNode); 142 Nations.SaveToNode(NewNode); 132 143 end; 133 144
Note:
See TracChangeset
for help on using the changeset viewer.