Mercurial > repos > IBBoard.WarFoundry.API
diff api/Commands/ReplaceUnitEquipmentCommand.cs @ 54:3a90f70dac73
Re #61 - Complete structure of WarFoundry API objects
* Remove min/max from EquipmentItem and add description
* Add min/max numbers and percentages to UnitEquipmentItem
* Make Race schema define min/max number without the ratio (which is the percentage)
* Replace use of EquipmentItem with UnitEquipmentItem because of increased use of UnitEquipmentItem for unit-specific data
* Use doubles instead of floats for equipment amounts
* Distinguish between ratio and absolute limits
* Delete UnitEquipmentItemObj helper class that was purely used for UI
Re #9 - Use smaller methods
* Deprecate long Race and EquipmentItem constructors and ensure all getters/setters exist
Also:
* Migrate Unit to using genericed collections
* Always use GameSystem object for Race, not ID string
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 05 Apr 2009 13:45:23 +0000 |
parents | 306558904c2a |
children | 3ea0ab04352b |
line wrap: on
line diff
--- a/api/Commands/ReplaceUnitEquipmentCommand.cs Wed Apr 01 19:20:27 2009 +0000 +++ b/api/Commands/ReplaceUnitEquipmentCommand.cs Sun Apr 05 13:45:23 2009 +0000 @@ -15,11 +15,8 @@ public class ReplaceUnitEquipmentCommand : Command { private SetUnitEquipmentAmountCommand removeOldCommand, addNewCommand; - //private Unit unit; - //private EquipmentItem oldEquip, newEquip; - //private float newAmount, oldAmount; - public ReplaceUnitEquipmentCommand(Unit unit, EquipmentItem oldItem, EquipmentItem newItem, float amount) + public ReplaceUnitEquipmentCommand(Unit unit, UnitEquipmentItem oldItem, UnitEquipmentItem newItem, double amount) { removeOldCommand = new SetUnitEquipmentAmountCommand(unit, oldItem, 0); addNewCommand = new SetUnitEquipmentAmountCommand(unit, newItem, amount);