Changeset 281 for trunk/UGameSystem.pas
- Timestamp:
- Feb 21, 2019, 10:45:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGameSystem.pas
r277 r281 7 7 uses 8 8 Classes, SysUtils, fgl, UUnit, DOM, XMLRead, XMLWrite, UXMLUtils, XMLConf, 9 FileUtil ;9 FileUtil, UMapType; 10 10 11 11 type … … 21 21 EmptyCellsNeutral: Boolean; 22 22 UnitsMoveImmediately: Boolean; 23 PreferedMapType: TMapType; 23 24 constructor Create; 24 25 destructor Destroy; override; … … 99 100 UnitsSplitMerge := Source.UnitsSplitMerge; 100 101 EmptyCellsNeutral := Source.EmptyCellsNeutral; 102 PreferedMapType := Source.PreferedMapType; 101 103 UnitKinds.Assign(Source.UnitKinds); 102 104 end; … … 109 111 EmptyCellsNeutral := ReadBoolean(Node, 'EmptyCellsNeutral', False); 110 112 UnitsMoveImmediately := ReadBoolean(Node, 'UnitsMoveImmediately', False); 113 PreferedMapType := TMapType(ReadInteger(Node, 'PreferedMapType', Integer(mtNone))); 111 114 112 115 NewNode := Node.FindNode('UnitKinds'); … … 122 125 WriteBoolean(Node, 'EmptyCellsNeutral', EmptyCellsNeutral); 123 126 WriteBoolean(Node, 'UnitsMoveImmediately', UnitsMoveImmediately); 127 WriteInteger(Node, 'PreferedMapType', Integer(PreferedMapType)); 124 128 125 129 NewNode := Node.OwnerDocument.CreateElement('UnitKinds'); … … 171 175 EmptyCellsNeutral := GetValue(DOMString(Path + '/EmptyCellsNeutral'), False); 172 176 UnitsMoveImmediately := GetValue(DOMString(Path + '/UnitsMoveImmediately'), False); 177 PreferedMapType := TMapType(GetValue(DOMString(Path + '/PreferedMapType'), Integer(mtNone))); 173 178 end; 174 179 end; … … 180 185 SetValue(DOMString(Path + '/EmptyCellsNeutral'), EmptyCellsNeutral); 181 186 SetValue(DOMString(Path + '/UnitsMoveImmediately'), UnitsMoveImmediately); 187 SetValue(DOMString(Path + '/PreferedMapType'), Integer(PreferedMapType)); 182 188 end; 183 189 end;
Note:
See TracChangeset
for help on using the changeset viewer.