Changeset 297 for trunk/UBuilding.pas
- Timestamp:
- Mar 29, 2019, 2:11:34 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UBuilding.pas
r296 r297 16 16 Cost: Integer; 17 17 SpecialType: TBuildingSpecialType; 18 BonusAttack: Integer; 19 BonusDefense: Integer; 20 BonusViewRange: Integer; 21 BonusGrow: Integer; 18 22 class function GetFields: TItemFields; override; 19 23 procedure GetValue(Index: Integer; out Value); override; … … 54 58 SNone = 'None'; 55 59 SCity = 'City'; 60 SBonusAttack = 'Unit attack bonus'; 61 SBonusDefense = 'Unit defense bonus'; 62 SBonusViewRange = 'Unit view range bonus'; 63 SBonusGrow = 'Unit grow bonus'; 56 64 57 65 … … 93 101 Field.EnumStates.Add(SNone); 94 102 Field.EnumStates.Add(SCity); 103 Result.AddField(4, 'BonusAttack', SBonusAttack, dtInteger); 104 Result.AddField(5, 'BonusDefense', SBonusDefense, dtInteger); 105 Result.AddField(6, 'BonusViewRange', SBonusViewRange, dtInteger); 106 Result.AddField(7, 'BonusGrow', SBonusGrow, dtInteger); 95 107 end; 96 108 … … 100 112 else if Index = 2 then Integer(Value) := Cost 101 113 else if Index = 3 then TBuildingSpecialType(Value) := SpecialType 114 else if Index = 4 then Integer(Value) := BonusAttack 115 else if Index = 5 then Integer(Value) := BonusDefense 116 else if Index = 6 then Integer(Value) := BonusViewRange 117 else if Index = 7 then Integer(Value) := BonusGrow 102 118 else inherited; 103 119 end; … … 108 124 else if Index = 2 then Cost := Integer(Value) 109 125 else if Index = 3 then SpecialType := TBuildingSpecialType(Value) 126 else if Index = 4 then BonusAttack := Integer(Value) 127 else if Index = 5 then BonusDefense := Integer(Value) 128 else if Index = 6 then BonusViewRange := Integer(Value) 129 else if Index = 7 then BonusGrow := Integer(Value) 110 130 else inherited; 111 131 end;
Note:
See TracChangeset
for help on using the changeset viewer.